add pic and js for permission checkbox and filter
This commit is contained in:
parent
c7c3af91dd
commit
0eab9ca8fa
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
|
@ -0,0 +1,31 @@
|
||||||
|
// JavaScript Document
|
||||||
|
|
||||||
|
// can copy code to any of ur desired javascsript
|
||||||
|
|
||||||
|
//extended jquery to search fast.
|
||||||
|
$.extend($.expr[':'], {
|
||||||
|
'containsi': function (elem, i, match, array) {
|
||||||
|
return (elem.textContent || elem.innerText || '').toLowerCase().indexOf((match[3] || "").toLowerCase()) >= 0;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$(document).ready(function(){
|
||||||
|
$("#user_filter").keyup(function(){
|
||||||
|
if($(this).val()){
|
||||||
|
var totalfoundbyname = $("div#users_checkbox_ary label.member-name:containsi("+$(this).val()+")").length
|
||||||
|
if(totalfoundbyname!=0){
|
||||||
|
$("div#users_checkbox_ary label.member-name:not(:containsi("+$(this).val()+"))").parent().parent().slideUp();
|
||||||
|
//$("div#users_checkbox_ary label.member-name:not(:containsi("+$(this).val()+"))").parent().popover('hide');
|
||||||
|
$("div#users_checkbox_ary label.member-name:containsi("+$(this).val()+")").parent().parent().slideDown();
|
||||||
|
$("div#users_checkbox_ary label.member-name:containsi("+$(this).val()+")").parent().popover('toggle');
|
||||||
|
}else if(totalfoundbyname==0){
|
||||||
|
$("div#users_checkbox_ary div.for_unit:not(:containsi("+$(this).val()+"))").parent().slideUp();
|
||||||
|
//$("div#users_checkbox_ary div.for_unit:not(:containsi("+$(this).val()+"))").popover('hide');
|
||||||
|
$("div#users_checkbox_ary div.for_unit:containsi("+$(this).val()+")").parent().slideDown();
|
||||||
|
$("div#users_checkbox_ary div.for_unit:containsi("+$(this).val()+")").popover('toggle');
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$(".checkbox").popover('hide');
|
||||||
|
$("div.checkblock").slideDown();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
Loading…
Reference in New Issue