[open-ils-commits] r17004 - in trunk/Open-ILS/web: js/ui/default/acq/common templates/default/acq/common (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Jul 21 17:17:05 EDT 2010


Author: erickson
Date: 2010-07-21 17:16:59 -0400 (Wed, 21 Jul 2010)
New Revision: 17004

Modified:
   trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
   trunk/Open-ILS/web/templates/default/acq/common/info.tt2
   trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2
Log:
pushed view-in-catalog link up to the main lineitem display.
moved pl/po/worksheet/catalog links to a row of their own for a more consistent location (visually).
replaced 'PO:' 'PL:' with small icons to easier catch the eye;
added 'worksheet' tag to the worksheet icon for clarity
TODO: plug in bib discovery and linking mechanism for freerange lineitems

Modified: trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js	2010-07-21 20:35:37 UTC (rev 17003)
+++ trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js	2010-07-21 21:16:59 UTC (rev 17004)
@@ -274,6 +274,14 @@
             );
         }
 
+        if(li.eg_bib_id()) {
+            openils.Util.show(nodeByName('catalog', row), 'inline');
+            nodeByName("catalog_link", row).onclick = this.generateMakeRecTab(li.eg_bib_id());
+        } else {
+            // TODO: Add discovery mechanism for bib linking
+            openils.Util.show(nodeByName('link_to_catalog', row), 'inline');
+        }
+
         nodeByName("worksheet_link", row).href =
             oilsBasePath + "/acq/lineitem/worksheet/" + li.id();
 
@@ -305,7 +313,7 @@
                 openils.Util.show(nodeByName('po', row), 'inline');
                 var link = nodeByName('po_link', row);
                 link.setAttribute('href', oilsBasePath + '/acq/po/view/' + li.purchase_order());
-                link.innerHTML = 'PO: ' + po.name(); // TODO i18n
+                link.innerHTML += po.name();
             }
         }
 
@@ -318,13 +326,16 @@
                     ['open-ils.acq', 'open-ils.acq.picklist.retrieve'],
                     {params: [this.authtoken, li.picklist()]});
             if (pl) {
-                if (pl.name() == "")
+                if (pl.name() == "") {
                     openils.Util.show(nodeByName("bib_origin", row), "inline");
 
-                openils.Util.show(nodeByName('pl', row), 'inline');
-                var link = nodeByName('pl_link', row);
-                link.setAttribute('href', oilsBasePath + '/acq/picklist/view/' + li.picklist());
-                link.innerHTML = 'PL: '+pl.name(); // TODO i18n
+                } else {
+
+                    openils.Util.show(nodeByName('pl', row), 'inline');
+                    var link = nodeByName('pl_link', row);
+                    link.setAttribute('href', oilsBasePath + '/acq/picklist/view/' + li.picklist());
+                    link.innerHTML += pl.name();
+                }
             }
         }
 
@@ -839,24 +850,6 @@
                 oilsBasePath + "/acq/lineitem/related/" + li.id();
         }
 
-        if(li.eg_bib_id()) {
-
-            openils.Util.show('acq-lit-info-cat-link');
-            var link = dojo.byId('acq-lit-info-cat-link').getElementsByTagName('a')[0];
-
-            if(openils.XUL.isXUL()) {
-
-                link.setAttribute('href', 'javascript:void(0);');
-                link.onclick = this.generateMakeRecTab( li.eg_bib_id() );
-
-            } else {
-                var href = link.getAttribute('href');
-                if(href.match(/=$/))
-                    link.setAttribute('href',  href + li.eg_bib_id());
-            }
-        } else {
-            openils.Util.hide('acq-lit-info-cat-link');
-        }
     };
 
     this.generateMakeRecTab = function(bib_id,default_view, row) {

Modified: trunk/Open-ILS/web/templates/default/acq/common/info.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/common/info.tt2	2010-07-21 20:35:37 UTC (rev 17003)
+++ trunk/Open-ILS/web/templates/default/acq/common/info.tt2	2010-07-21 21:16:59 UTC (rev 17004)
@@ -8,9 +8,6 @@
                 <tr id="acq-[% which_lc %]-info-row"><td name="label"/><td name="value"/></tr>
             </tbody>
         </table>
-        <div style="margin-top:10px;" class="hidden" id="acq-[% which_lc %]-info-cat-link">
-            View in the <a href="/opac/en-US/skin/default/xml/rdetail.xml?r=">Catalog</a>
-        </div>
 [% IF which == "Lit" %]
         <div class="hidden" id="acq-[% which_lc %]-info-related">
             Show the <a name="rel_link" href="#"><span name="related_number"></span> lineitem(s)</a> related to the same bibliographic record.

Modified: trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2	2010-07-21 20:35:37 UTC (rev 17003)
+++ trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2	2010-07-21 21:16:59 UTC (rev 17004)
@@ -77,14 +77,11 @@
                         <table style='width:100%;'>
                             <tbody>
                                 <tr>
-                                    <td rowspan='2' style='width:43px;'><img style='width:40px;height:65px;' name='jacket'></td>
+                                    <td rowspan='3' style='width:43px;'><img style='width:40px;height:65px;' name='jacket'></td>
                                     <td style='width:70%;font-weight:bold;'>
                                         <span name="bib_origin" class="hidden">
                                             <img src="/opac/images/book-icon.png" />
                                         </span><a attr='title' href='javascript:void(0);'></a>
-                                        <span name="worksheet">(<a name="worksheet_link" href="javascript:void(0);">&#x270D;</a>)</span>
-                                        <span name='pl' class='hidden'>(<a name='pl_link' href='javascript:void(0);'></a>)</span>
-                                        <span name='po' class='hidden'>(<a name='po_link' href='javascript:void(0);'>PO</a>)</span>
                                     </td>
                                     <td rowspan='2' style='text-align:right'>
                                     </td>
@@ -100,10 +97,19 @@
                                         <span name='source_label'></span>
                                     </td>
                                 </tr>
+                                <tr>
+                                    <td colspan='0'>
+                                        <span name="catalog" class='hidden'><a title='Show In Catalog' name="catalog_link" href="javascript:void(0);">&#x279F; catalog</a></span> 
+                                        <span name="link_to_catalog" class='hidden'><a title='Link To Catalog Record' name="link_to_catalog_link" href="javascript:void(0);">&#x27BE; link to catalog</a></span> 
+                                        <span name="worksheet"> | <a title='Generate Worksheet' name="worksheet_link" href="javascript:void(0);">&#x270D; worksheet</a></span>
+                                        <span name='pl' class='hidden'> | <a title='Select List' name='pl_link' href='javascript:void(0);'>&#x2756; </a></span>
+                                        <span name='po' class='hidden'> | <a title='Purchase Order' name='po_link' href='javascript:void(0);'>&#x2318; </a></span>
+                                    </td>
+                                </tr>
                             </tbody>
                         </table>
                     </td>
-                    <td><a name='copieslink' href='javascript:void(0);'>Copies(<span name='count'>0</span>)</a></td>
+                    <td><a title='FOOOBAR' name='copieslink' href='javascript:void(0);'>Copies(<span name='count'>0</span>)</a></td>
                     <td>
                         <a name='noteslink' href='javascript:void(0);'>Notes(<span name='notes_count'>0</span>)</a><span name="notes_alert_flag"></span>
                     </td>



More information about the open-ils-commits mailing list