TPAC: results use floated DIVs instead of table layout
authorDan Scott <dscott@laurentian.ca>
Mon, 12 Dec 2011 05:06:39 +0000 (00:06 -0500)
committerDan Scott <dscott@laurentian.ca>
Mon, 12 Dec 2011 05:06:39 +0000 (00:06 -0500)
Rather than a table containing a single row for the rather gross purpose
of placing the facet sidebar on the left, a little bit of a divider
between the facets and the results, and the results on the right, just
use a floated div and a relatively positioned div for the two pertinent
chunks of content. Bonus: one touch of CSS moves the facet sidebar to
the right instead of the left.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/templates/opac/parts/result/table.tt2
Open-ILS/web/css/skin/default/opac/style.css

index fe3865a..07c7ae9 100644 (file)
@@ -9,23 +9,18 @@
     result_count = ctx.result_start;
 %]
 
-<div style="height: 10px;"></div>
-
 [% PROCESS "opac/parts/result/paginate.tt2" %] 
 [% ctx.results_count_header = PROCESS results_count_header;
     ctx.results_count_header %]
 
 <div id="result_table_div">
-    <table cellpadding="0" cellspacing="0" border="0" width="100%">
-        <tr>
-            <td valign="top" width="1">
+            <div class="facet_sidebar">
                 [% INCLUDE "opac/parts/staff_saved_searches.tt2" %]
                 [% INCLUDE 'opac/parts/result/facets.tt2' %]
-            </td>
-            <td class="facet_border" width="1"></td>
-            <td valign="top">
+            </div>
+            <div class="result_block">
                 <table cellpadding="0" cellspacing="0"
-                    border="0" width="100%" style="margin-top:10px;">
+                    border="0" style="margin-top:10px;">
                     <tbody id="result_table">
                     [%  FOR rec IN ctx.records;
                             attrs = {marc_xml => rec.marc_xml};
                                         <tr>
                                             <td/>
                                             <td colspan='5'> <!-- Chilifresh reviews panel -->
-                                                <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center" width="100%"></div>
+                                                <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center"></div>
                                             </td>
                                         </tr>
                                         [%- END %]
                     [% END %]
                     </tbody>
                 </table>
-            </td>
-        </tr>
-    </table>
+            </div>
 </div>
 <div>
     [% ctx.results_count_header %]
index 39afdff..965fc0c 100644 (file)
@@ -699,7 +699,7 @@ div.format_icon {
 }
 
 #result_table_div {
-       margin-top: 20px;
+       margin-top: 1em;
 }
 
 .result_numbers {
@@ -932,6 +932,12 @@ div.format_icon {
 .facetFieldLineValue { overflow: hidden; text-overflow: ellipsis; }
 */
 
+div.facet_sidebar {
+    float: left;
+    border-right: 1px solid #F3F3F3;
+    margin-right: 1em;
+}
+
 .facet_box_temp {
        padding-bottom:3px;
        width: 15em;