From c656cfa362ff8b9a7b696c8ee64d694d4c794bf1 Mon Sep 17 00:00:00 2001 From: flop25 Date: Sun, 24 Aug 2014 20:40:19 +0000 Subject: feature:3049 Add filter box to narrow plugin list, thx to msakik git-svn-id: http://piwigo.org/svn/trunk@29263 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/themes/default/template/plugins_new.tpl | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/admin/themes/default/template/plugins_new.tpl b/admin/themes/default/template/plugins_new.tpl index 3ccfcaeec..97633a8cc 100644 --- a/admin/themes/default/template/plugins_new.tpl +++ b/admin/themes/default/template/plugins_new.tpl @@ -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}
+{'Filter'|@translate} : + | {'Sort order'|@translate} : {html_options name="selectOrder" options=$order_options selected=$order_selected} -- cgit v1.2.3