harry's js fix
This commit is contained in:
parent
e67ca84282
commit
67bd68d492
|
@ -22,12 +22,24 @@ $(document).ready(function(){
|
||||||
})
|
})
|
||||||
var waitForSearch = function(){
|
var waitForSearch = function(){
|
||||||
if(sval){
|
if(sval){
|
||||||
|
var re1 = new RegExp("^[\u4E00-\uFA29]*$"); //Chinese character range
|
||||||
|
var re2 = new RegExp("^[\uE7C7-\uE7F3]*$");
|
||||||
|
if ((re1.test(sval) && (re2.test(sval)))){
|
||||||
|
|
||||||
|
var totalfoundbyname = $("div#users_checkbox_ary label.member-name:contains("+sval+")").length
|
||||||
|
if(totalfoundbyname!=0){
|
||||||
|
$("div#users_checkbox_ary label.member-name:contains("+sval+")").parent().parent().show();
|
||||||
|
}else if(totalfoundbyname==0){
|
||||||
|
$("div#users_checkbox_ary div.for_unit:contains("+sval+")").parent().show();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
var totalfoundbyname = $("div#users_checkbox_ary label.member-name:containsi("+sval+")").length
|
var totalfoundbyname = $("div#users_checkbox_ary label.member-name:containsi("+sval+")").length
|
||||||
if(totalfoundbyname!=0){
|
if(totalfoundbyname!=0){
|
||||||
$("div#users_checkbox_ary label.member-name:containsi("+sval+")").parent().parent().show();
|
$("div#users_checkbox_ary label.member-name:containsi("+sval+")").parent().parent().show();
|
||||||
}else if(totalfoundbyname==0){
|
}else if(totalfoundbyname==0){
|
||||||
$("div#users_checkbox_ary div.for_unit:containsi("+sval+")").parent().show();
|
$("div#users_checkbox_ary div.for_unit:containsi("+sval+")").parent().show();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
$(".checkbox").popover('hide');
|
$(".checkbox").popover('hide');
|
||||||
$("div.checkblock").show();
|
$("div.checkblock").show();
|
||||||
|
|
Loading…
Reference in New Issue