From 4903341c669fa968d27d42031a3c988b35513ca0 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Tue, 17 Sep 2013 15:16:49 -0400 Subject: [PATCH] Facets after results, then DOMinate them into place We can use a media query in JavaScript to detect a given width and then drop the facets into their left-hand column if needed; if the browser window resizes, then potentially put the facets back on the bottom. Also add a rudimentary "Refine these results" link at the top of the page that is only visible when the facets are at the bottom to facilitate navigation. Signed-off-by: Dan Scott Signed-off-by: Lebbeous Fogle-Weekley Signed-off-by: Dan Wells --- Open-ILS/src/templates/opac/css/style.css.tt2 | 25 ++++++++++++--- .../src/templates/opac/parts/result/table.tt2 | 31 +++++++++++++++---- 2 files changed, 46 insertions(+), 10 deletions(-) diff --git a/Open-ILS/src/templates/opac/css/style.css.tt2 b/Open-ILS/src/templates/opac/css/style.css.tt2 index 39c523bd87..cb552fa311 100644 --- a/Open-ILS/src/templates/opac/css/style.css.tt2 +++ b/Open-ILS/src/templates/opac/css/style.css.tt2 @@ -1612,7 +1612,11 @@ a.preflib_change { padding-right: 10px; } -.small_view_only { +.result_footer_nav1 { + clear: both; +} + +.small_view_only, #refine_hits { display: none; } @@ -1772,9 +1776,6 @@ a.preflib_change { .results_header_nav1 span.h1 { display: none; } - .facet_sidebar { - display: none; - } .preflib { display: none; } @@ -1852,4 +1853,20 @@ a.preflib_change { padding: 0px; margin: 0px; } + /* Make use of full width in mobile mode */ + .facet_box_wrapper .box_wrapper .box, + .facet_template .facet, + .facet_box_temp { + width: inherit; + } + .facet_template .count { + padding-left: 1em; + } + .facet_sidebar { + margin-top: 0.5em; + } + #refine_hits { + display: block; + padding-left: 15px; + } } diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2 index 65b475c095..ca6939fa52 100644 --- a/Open-ILS/src/templates/opac/parts/result/table.tt2 +++ b/Open-ILS/src/templates/opac/parts/result/table.tt2 @@ -10,10 +10,11 @@ %] + + [% PROCESS "opac/parts/result/paginate.tt2" %] [% ctx.results_count_header = PROCESS results_count_header; ctx.results_count_header %] - [% IF ctx.bookbag %]
[% ctx.bookbag.name | html %]
@@ -21,10 +22,6 @@
[% END %]
-
- [% INCLUDE "opac/parts/staff_saved_searches.tt2" %] - [% INCLUDE 'opac/parts/result/facets.tt2' %] -
@@ -359,7 +356,29 @@ END;
+
+ [% INCLUDE "opac/parts/staff_saved_searches.tt2" %] + [% INCLUDE 'opac/parts/result/facets.tt2' %] +
+
-
+ -- 2.43.2