From 1df5f3b6b0bb1d32b5d5aa77bd78f6da2b2bf37f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= Date: Fri, 13 Feb 2015 17:48:17 -0600 Subject: [PATCH] templates/rrs/recipes.html: Add button for search MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add button for search instead of did with keyUp function in the input this avoid overprocessing and icrements usability. Signed-off-by: Aníbal Limón --- templates/rrs/recipes.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/templates/rrs/recipes.html b/templates/rrs/recipes.html index 6c86a55..2d971b2 100644 --- a/templates/rrs/recipes.html +++ b/templates/rrs/recipes.html @@ -56,8 +56,9 @@ - @@ -222,12 +223,14 @@ $(document).ready(function() { } }); - $("#filter").keyup(function() { + $("#form-search").submit(function( event ) { upstreamStatus = 'All' maintainer = 'All' + search_text = $("#filter").val() applyFilters() - $.uiTableFilter(recipesTable, this.value); + $.uiTableFilter(recipesTable, search_text); updateRecipeCount() + event.preventDefault(); }); $("#select-status a").click(function() {