TPAC: Strip inline styles from bookbags page
authorDan Scott <dscott@laurentian.ca>
Thu, 20 Oct 2011 02:19:20 +0000 (22:19 -0400)
committerDan Scott <dscott@laurentian.ca>
Thu, 20 Oct 2011 02:19:20 +0000 (22:19 -0400)
Also use a margin instead of width percentage to keep bookbag action
buttons closer to the bookbag title; with a full-width layout the
buttons were almost disassociated from the bookbag title.

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

index c852364..67ce963 100644 (file)
         <table class="bookbag-specific" cellpadding='0' cellspacing='0' border='0'>
             <thead id="acct_list_header">
                 <tr>
-                    <td width="1%" style="padding-left: 10px;">
+                    <td class="list_checkbox">
                     <input type="checkbox" onclick="
                         var inputs=document.getElementsByTagName('input'); 
                         for (i = 0; i < inputs.length; i++) { 
                                 inputs[i].checked = this.checked;}"/>
 
                     </td>
-                    <td width="32%" style="padding-left: 5px;">
+                    <td class="list_entry">
                         <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=> (CGI.param('sort') == 'titlesort' ? 'titlesort.descending' : 'titlesort')}) %]">[% l('Title') %]</a>
                     </td>
-                    <td width="33%">
+                    <td class="list_entry">
                         <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {sort=>(CGI.param('sort') == 'authorsort' ? 'authorsort.descending' : 'authorsort')}) %]">[% l('Author(s)') %]</a>
                     </td>
-                    <td width="32%">
+                    <td class="list_entry">
                         [% l('Notes') %]
                         [% IF CGI.param("edit_notes") != bbag.id %]
                         | <a href="[% mkurl(ctx.opac_root _ '/myopac/lists', {edit_notes=> bbag.id}) %]">[% l('Edit') %]</a>
                         [% END %]
                     </td>
-                    <td width="1%" class="nowrap">
+                    <td class="list_actions">
                         <select name="action">
                             <option disabled="disabled">[% l('-- Actions for these items --') %]</option>
                             <option value="place_hold">[% l('Place hold') %]</option>
                     attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
                     PROCESS get_marc_attrs args=attrs %]
                 <tr class="bookbag-item-row">
-                    <td class="item_list_padding" style="padding-left: 10px;">
+                    <td class="list_checkbox">
                         <input type="checkbox" name="selected_item" value="[% item.id %]" bbag='[% bbag.id %]'/>
                     </td>
-                    <td class="item_list_padding" style="padding-left: 5px;">
+                    <td class="list_entry">
                         <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec_id, {}, ['edit_notes', 'id']) %]">[% attrs.title | html %]</a>
                     </td>
-                    <td class="item_list_padding">
+                    <td class="list_entry">
                         <a href="[%- 
                             authorquery = attrs.author | replace('[,\.:;]', '');
                             mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page', 'id', 'edit_notes'])
                             -%]">[% attrs.author | html %]</a>
                     [% IF CGI.param("edit_notes") == bbag.id %]
-                    <td class="opac-auto-097b">
+                    <td class="list_entry">
                         [% FOR note IN item.notes %]
                         <input type="text" name="note-[% note.id %]" value="[% note.note | html %]" />
                         [% END %]
                         <input type="text" name="item-[% item.id %]" />
                     </td>
                     [% ELSE %]
-                    <td class="opac-auto-097b">
+                    <td class="list_entry">
                         [% FOR note IN item.notes %]
                         <div>[% note.note | html %]</div>
                         [% END %]
index 586cf9c..b124496 100644 (file)
@@ -1155,7 +1155,10 @@ a.opac-button {
 .bookbag-controls-holder { width: 100%; }
 .bookbag-controls-holder:nth-child(odd) { background-color: #d7d7d7; }
 .bookbag-controls-holder:nth-child(even) { background-color: #e3e3e3; }
-.bookbag-controls-holder .most { padding-left: 0; width: 55%; }
+.bookbag-controls-holder .most {
+    padding-left: 0;
+    margin-right: 5em;
+}
 h2.bookbag-name { margin-bottom: 0em; padding-bottom: 0em; }
 .bookbag-share .fixed { min-width: 4em; }
 .bookbag-specific { margin-left: 1em; }
@@ -1177,6 +1180,16 @@ table.bookbag-specific {
     padding: 5px 0px 0px 10px;
 }
 
+.bookbag-specific td.list_checkbox {
+    padding-left: 10px !important;
+}
+.bookbag-specific td.list_entry {
+    min-width: 10em;
+    padding-left: 5px !important;
+}
+.bookbag-specific td.list_actions {
+    white-space: nowrap !important;
+}
 .save-notes { padding-bottom: 1.5ex; }
 
 /* Moved from semiauto.css */