Skip to content

Commit

Permalink
feature:3049
Browse files Browse the repository at this point in the history
Add filter box to narrow plugin list, thx to msakik

git-svn-id: http://piwigo.org/svn/trunk@29263 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
flop25 committed Aug 24, 2014
1 parent 0433f2e commit c656cfa
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions admin/themes/default/template/plugins_new.tpl
Expand Up @@ -31,11 +31,33 @@ jQuery(document).ready(function(){
$('.pluginBox').sortElements(sortPlugins);
$.get("admin.php?plugins_new_order="+sortOrder);
});

jQuery('#filter').keyup(function(){
var filter = $(this).val();
if (filter.length>2) {
$('.pluginBox').hide();
$('#availablePlugins .pluginBox input[name="name"]').each(function(){
if ($(this).val().toUpperCase().indexOf(filter.toUpperCase()) != -1) {
$(this).parents('div').show();
}
});
}
else {
$('.pluginBox').show();
}
});
jQuery("#filter").focus();
jQuery(".titrePage input[name='Clear']").click(function(){
$("#filter").val('');
$(".pluginBox").show();
});
});
{/literal}{/footer_script}

<div class="titrePage">
<span class="sort">
{'Filter'|@translate} : <input type="text" id="filter">
<input type="button" name="Clear" Value="{'Clear'|@translate}"> |
{'Sort order'|@translate} :
{html_options name="selectOrder" options=$order_options selected=$order_selected}
</span>
Expand Down

0 comments on commit c656cfa

Please sign in to comment.