Apply patch from ldap
This commit is contained in:
parent
72efdbd742
commit
2f279c53ff
|
@ -8,24 +8,27 @@ $.extend($.expr[':'], {
|
|||
return (elem.textContent || elem.innerText || '').toLowerCase().indexOf((match[3] || "").toLowerCase()) >= 0;
|
||||
}
|
||||
});
|
||||
var interval,sval;
|
||||
$(document).ready(function(){
|
||||
$("#user_filter").keyup(function(){
|
||||
if($(this).val()){
|
||||
var totalfoundbyname = $("div#users_checkbox_ary label.member-name:containsi("+$(this).val()+")").length
|
||||
sval = $(this).val();
|
||||
$(".checkbox").popover("hide");
|
||||
$("div.checkblock").hide();
|
||||
clearInterval(interval);
|
||||
interval = setInterval(waitForSearch,1000);
|
||||
})
|
||||
})
|
||||
var waitForSearch = function(){
|
||||
if(sval){
|
||||
var totalfoundbyname = $("div#users_checkbox_ary label.member-name:containsi("+sval+")").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');
|
||||
$("div#users_checkbox_ary label.member-name:containsi("+sval+")").parent().parent().show();
|
||||
}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');
|
||||
$("div#users_checkbox_ary div.for_unit:containsi("+sval+")").parent().show();
|
||||
}
|
||||
}else{
|
||||
$(".checkbox").popover('hide');
|
||||
$("div.checkblock").slideDown();
|
||||
$("div.checkblock").show();
|
||||
}
|
||||
clearInterval(interval);
|
||||
}
|
||||
})
|
||||
})
|
|
@ -5,10 +5,10 @@
|
|||
<%= content_tag :li, :class => active_for_controllers('bulletins', 'tags', 'bulletin_categorys', 'fact_checks') do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-announcement') + t('admin.announcement'), panel_announcement_back_end_bulletins_path %>
|
||||
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('bulletins', 'tags', 'bulletin_categorys', 'fact_checks')) do -%>
|
||||
<%= content_tag :li, link_to(t('admin.all_articles'), panel_announcement_back_end_bulletins_path), :class => active_for_action('bulletins', 'index') %>
|
||||
<%= content_tag :li, link_to(t('admin.add_new'), new_panel_announcement_back_end_bulletin_path), :class => active_for_action('bulletins', 'new') %>
|
||||
<%= content_tag :li, link_to(t('admin.categories'), panel_announcement_back_end_bulletin_categorys_path), :class => active_for_action('bulletin_categorys', 'index') %>
|
||||
<%= content_tag :li, link_to(t('admin.tags'), panel_announcement_back_end_tags_path), :class => active_for_action('panel/bulletin/back_end/tags', 'index') %>
|
||||
<%= content_tag :li, link_to(t('announcement.all_articles'), panel_announcement_back_end_bulletins_path), :class => active_for_action('bulletins', 'index') %>
|
||||
<%= content_tag :li, link_to(t('announcement.add_new'), new_panel_announcement_back_end_bulletin_path), :class => active_for_action('bulletins', 'new') %>
|
||||
<%= content_tag :li, link_to(t('announcement.categories'), panel_announcement_back_end_bulletin_categorys_path), :class => active_for_action('bulletin_categorys', 'index') %>
|
||||
<%= content_tag :li, link_to(t('announcement.tags'), panel_announcement_back_end_tags_path), :class => active_for_action('panel/bulletin/back_end/tags', 'index') %>
|
||||
<%= content_tag :li, link_to(t('announcement.bulletin.fact_check_setting'), panel_announcement_back_end_fact_checks_setting_path), :class => active_for_action('fact_checks', 'setting') if (is_manager? rescue nil) %>
|
||||
<% end -%>
|
||||
|
||||
|
@ -41,10 +41,10 @@
|
|||
<%= content_tag :li, :class => active_for_controllers('web_links', 'tags', 'web_link_categorys') do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-link') + t('admin.link'), panel_web_resource_back_end_web_links_path %>
|
||||
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('web_links', 'tags', 'web_link_categorys')) do -%>
|
||||
<%= content_tag :li, link_to(t('admin.all_articles'), panel_web_resource_back_end_web_links_path), :class => active_for_action('web_link', 'index') %>
|
||||
<%= content_tag :li, link_to(t('admin.add_new'), new_panel_web_resource_back_end_web_link_path), :class => active_for_action('web_link', 'new') %>
|
||||
<%= content_tag :li, link_to(t('admin.categories'), panel_web_resource_back_end_web_link_categorys_path), :class => active_for_action('web_link_categorys', 'index') %>
|
||||
<%= content_tag :li, link_to(t('admin.tags'), panel_web_resource_back_end_tags_path), :class => active_for_action('panel/web_resource/back_end/tags', 'index') %>
|
||||
<%= content_tag :li, link_to(t('admin.announcement.all_articles'), panel_web_resource_back_end_web_links_path), :class => active_for_action('web_link', 'index') %>
|
||||
<%= content_tag :li, link_to(t('admin.announcement.add_new'), new_panel_web_resource_back_end_web_link_path), :class => active_for_action('web_link', 'new') %>
|
||||
<%= content_tag :li, link_to(t('admin.announcement.categories'), panel_web_resource_back_end_web_link_categorys_path), :class => active_for_action('web_link_categorys', 'index') %>
|
||||
<%= content_tag :li, link_to(t('admin.announcement.tags'), panel_web_resource_back_end_tags_path), :class => active_for_action('panel/web_resource/back_end/tags', 'index') %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
||||
|
|
Loading…
Reference in New Issue