From 14391d7e2e4ab36e16fb6916bdf2fdbf5878f27d Mon Sep 17 00:00:00 2001 From: Winston Date: Thu, 10 Apr 2014 22:28:22 +0800 Subject: Split search results into 'exact matches' and 'fuzzy matches'. - also refactored the javascript. --- .../middleware/templates/routes/_table.html.erb | 156 +++++++++++++-------- 1 file changed, 96 insertions(+), 60 deletions(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb b/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb index 3d9e520eba..cce0d75af4 100644 --- a/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb +++ b/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb @@ -25,12 +25,14 @@ background: #f2f2f2; } - #route_table tbody.matched_paths { + #route_table tbody.exact_matches, + #route_table tbody.fuzzy_matches { background-color: LightGoldenRodYellow; border-bottom: solid 2px SlateGrey; } - #route_table tbody.matched_paths tr { + #route_table tbody.exact_matches tr, + #route_table tbody.fuzzy_matches tr { background: none; border-bottom: none; } @@ -63,13 +65,15 @@ <%# HTTP Verb %> <%# Path %> - <%= search_field(:path, nil, id: 'path_search', placeholder: "Path Match") %> + <%= search_field(:path, nil, id: 'search', placeholder: "Path Match") %> <%# Controller#action %> - + + + <%= yield %> @@ -77,6 +81,7 @@