|
|
|
@ -1,10 +1,12 @@
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
$(document).off('click',searchmsg).on('click','.search-button',searchmsg);
|
|
|
|
|
$(document).off('keydown',searchmsg).on('keydown','.search-input',KDsearchmsg);
|
|
|
|
|
$(document).off('click',searchStuMsg).on('click','.search-button.teacher',searchStuMsg);
|
|
|
|
|
$(document).off('click',searchTeaMsg).on('click','.search-button.student',searchTeaMsg);
|
|
|
|
|
$(document).off('keydown',KDsearchSmsg).on('keydown','.search-button.teacher',KDsearchSmsg);
|
|
|
|
|
$(document).off('keydown',KDsearchTmsg).on('keydown','.search-button.student',KDsearchTmsg);
|
|
|
|
|
$(document).off('click',teacherSelect).on('click','.select-it.teacher',teacherSelect);
|
|
|
|
|
$(document).off('click',studentSelect).on('click','.select-it.student',studentSelect);
|
|
|
|
|
})
|
|
|
|
|
function searchmsg(e) {
|
|
|
|
|
function searchStuMsg(e) {
|
|
|
|
|
if($('.search-input').val()=='')
|
|
|
|
|
{
|
|
|
|
|
e.preventDefault();
|
|
|
|
@ -12,15 +14,36 @@ function searchmsg(e) {
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
var id=$('.search-input').val();
|
|
|
|
|
var rqDate={"id":id};
|
|
|
|
|
var searchType='teacher';
|
|
|
|
|
var rqDate={"id":id,"searchType":searchType};
|
|
|
|
|
var Url1='result_list.jsp';
|
|
|
|
|
$('.list-frame').load(Url1,rqDate);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function KDsearchmsg(e) {
|
|
|
|
|
function searchTeaMsg(e) {
|
|
|
|
|
if($('.search-input').val()=='')
|
|
|
|
|
{
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
alert('请输入学号');
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
var id=$('.search-input').val();
|
|
|
|
|
var searchType='student';
|
|
|
|
|
var rqDate={"id":id,"searchType":searchType};
|
|
|
|
|
var Url1='result_list.jsp';
|
|
|
|
|
$('.list-frame').load(Url1,rqDate);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function KDsearchSmsg(e) {
|
|
|
|
|
if(e.keyCode==13)
|
|
|
|
|
{
|
|
|
|
|
searchStuMsg(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function KDsearchTmsg(e) {
|
|
|
|
|
if(e.keyCode==13)
|
|
|
|
|
{
|
|
|
|
|
searchmsg(e);
|
|
|
|
|
searchTeaMsg(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function select_one(Url2,button) {
|
|
|
|
|