From 3a28934c978d25c750e89115458e4459b4e7413f Mon Sep 17 00:00:00 2001 From: Stephen Beaver Date: Wed, 21 Oct 2015 13:33:13 -0400 Subject: package search functionality completed --- src/usr/local/www/pkg_mgr.php | 47 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) (limited to 'src/usr/local/www/pkg_mgr.php') diff --git a/src/usr/local/www/pkg_mgr.php b/src/usr/local/www/pkg_mgr.php index 6b8f5d1..9c448f3 100644 --- a/src/usr/local/www/pkg_mgr.php +++ b/src/usr/local/www/pkg_mgr.php @@ -155,7 +155,15 @@ if(!$pkg_info || !is_array($pkg_info)):?> Search term
-
" class="btn btn-default btn-sm">
+
+ +
+
" class="btn btn-primary btn-sm"> + " class="btn btn-default btn-sm">
Enter a search string or *nix regular expression to seach package names and descriptions.
@@ -166,7 +174,7 @@ if(!$pkg_info || !is_array($pkg_info)):?>

- +
@@ -239,6 +247,7 @@ endif;?> // 0) { + if( !(regexp.test(shortname) && ((where == 0) || (where == 2))) && !(regexp.test(descr) && (( where == 1) || (where == 2)))) { + $(this).hide(); + } else { + $(this).show(); + } + } else { + $(this).show(); // A blank search string shows all + } + }); + }); + + $("#btnclear").click(function() { + var table = $("table tbody"); + + table.find('tr').each(function (i) { + $(this).show(); + $('#searchstr').val(""); + }); + }); }); //]]> -- cgit v1.1