Mobile TPAC: Better styling for facet/results buttons
authorDan Scott <dscott@laurentian.ca>
Mon, 23 Sep 2013 18:59:04 +0000 (14:59 -0400)
committerDan Wells <dbw2@calvin.edu>
Wed, 25 Sep 2013 22:45:12 +0000 (18:45 -0400)
Adopt the OPAC button style and move the buttons into the search bar to
consolidate result-specific actions into a single contextual area.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/templates/opac/css/style.css.tt2
Open-ILS/src/templates/opac/parts/result/table.tt2
Open-ILS/src/templates/opac/results.tt2

index cdc6071..50087b4 100644 (file)
@@ -1681,11 +1681,7 @@ a.preflib_change {
         display: none;
     }
     .facet_sidebar_visible, .result_block_visible {
-        display: inline;
-    }
-    #refine_hits, #return_to_hits {
-        display: block;
-        padding-left: 15px;
+        display: inline ! important;
     }
 }
 
index 4c7f7ed..b0419c3 100644 (file)
 [% END %]
 <div id="result_table_div">
     <div class="facet_sidebar_hidden" id="facet_sidebar">
-        <div id="return_to_hits"><a onclick="getResulty();">[% l('Back to results') %]</a></div>
     [% INCLUDE "opac/parts/staff_saved_searches.tt2" %]
     [% INCLUDE 'opac/parts/result/facets.tt2' %]
     </div>
             <div id="result_block" class="result_block_visible">
-                <div id="refine_hits"><a onclick="getFacety();">[% l('Refine these results') %]</a></div>
                 <table cellpadding="0" cellspacing="0"
                     border="0" style="margin-top:10px;">
                     <tbody id="result_table">
@@ -365,15 +363,21 @@ END;
 </div>
 <script>
 resultBlock = document.querySelector('#result_block');
+resultButton = document.querySelector('#return_to_hits');
 facetSidebar = document.querySelector('#facet_sidebar');
+facetButton =  document.querySelector('#refine_hits');
 function getFacety() {
     resultBlock.setAttribute('class', 'result_block_hidden');
+    resultButton.setAttribute('class', 'results_header_btns result_block_visible');
     facetSidebar.setAttribute('class', 'facet_sidebar_visible');
+    facetButton.setAttribute('class', 'result_block_hidden');
     window.location.hash = 'facet_sidebar';
 }
 function getResulty() {
     resultBlock.setAttribute('class', 'result_block_visible');
+    resultButton.setAttribute('class', 'result_block_hidden');
     facetSidebar.setAttribute('class', 'facet_sidebar_hidden');
+    facetButton.setAttribute('class', 'results_header_btns result_block_visible');
     window.location.hash = 'result_block';
 }
 </script>
index 39b40ad..3862355 100644 (file)
@@ -24,6 +24,8 @@
                 <div class="results_header_btns">
                     <a href="[% mkurl(ctx.opac_root _ '/home', {$loc_name => loc_value}, 1) %]">[% l('Another Search') %]</a>
                 </div>
+                <div id="refine_hits" class="results_header_btns result_block_visible"><a onclick="getFacety();">[% l('Refine these results') %]</a></div>
+                <div id="return_to_hits" class="results_header_btns"><a onclick="getResulty();">[% l('Back to results') %]</a></div>
                 <div class="results_header_btns">
                     <a href="[% mkurl(ctx.opac_root _ '/advanced') %]">[% l('Advanced Search') %]</a>
                 </div>