[open-ils-commits] r16403 - in trunk/Open-ILS/web: css/skin/default js/dojo/openils/widget js/ui/default/acq/common js/ui/default/acq/search templates/default/acq/common (senator)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri May 7 11:27:25 EDT 2010


Author: senator
Date: 2010-05-07 11:27:22 -0400 (Fri, 07 May 2010)
New Revision: 16403

Modified:
   trunk/Open-ILS/web/css/skin/default/acq.css
   trunk/Open-ILS/web/js/dojo/openils/widget/XULTermLoader.js
   trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
   trunk/Open-ILS/web/js/ui/default/acq/search/unified.js
   trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2
Log:
Acq: bugfixes, improvements to lineitem + bib search

identify bib-results with a book icon to distinguish them from li
results; git rid of an alert() when canceling from a file upload dialog;
fix a sneaky bug that removed other match-type options once the user selecte
the "term from a file" option



Modified: trunk/Open-ILS/web/css/skin/default/acq.css
===================================================================
--- trunk/Open-ILS/web/css/skin/default/acq.css	2010-05-06 22:14:06 UTC (rev 16402)
+++ trunk/Open-ILS/web/css/skin/default/acq.css	2010-05-07 15:27:22 UTC (rev 16403)
@@ -231,6 +231,7 @@
 .acq-unified-terms-remove { width: 5%; text-align: right; }
 .acq-unified-remover { color: #c00; }
 .acq-unified-result-specific-controls { margin-bottom: 8px; }
+span[name="bib_origin"] img { vertical-align: middle; }
 
 #acq-eligible-li-table { margin: 10px 0; }
 #acq-eligible-li-table th { background-color: #ccc; border: 1px #333 inset; font-weight: bold; padding: 6px; }

Modified: trunk/Open-ILS/web/js/dojo/openils/widget/XULTermLoader.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/XULTermLoader.js	2010-05-06 22:14:06 UTC (rev 16402)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/XULTermLoader.js	2010-05-07 15:27:22 UTC (rev 16403)
@@ -84,7 +84,8 @@
                 }
             },
             "parseUnimaginatively": function(data) {
-                return data.split(/[\n, ]/).filter(
+                if (!data) return [];
+                else return data.split(/[\n, ]/).filter(
                     function(o) { return o.length > 0; }
                 );
             }

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-05-06 22:14:06 UTC (rev 16402)
+++ trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js	2010-05-07 15:27:22 UTC (rev 16403)
@@ -298,14 +298,17 @@
         }
 
         // show which picklist this lineitem is a member of
-        if(li.picklist() && (this.isPO || this.isMeta)) {
+        if(li.picklist() && (this.isPO || this.isMeta || this.isUni)) {
             var pl = 
                 this.plCache[li.picklist()] = 
                 this.plCache[li.picklist()] || 
                 fieldmapper.standardRequest(
                     ['open-ils.acq', 'open-ils.acq.picklist.retrieve'],
                     {params: [this.authtoken, li.picklist()]});
-            if(pl) {
+            if (pl) {
+                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());

Modified: trunk/Open-ILS/web/js/ui/default/acq/search/unified.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/search/unified.js	2010-05-06 22:14:06 UTC (rev 16402)
+++ trunk/Open-ILS/web/js/ui/default/acq/search/unified.js	2010-05-07 15:27:22 UTC (rev 16403)
@@ -288,7 +288,7 @@
             can_do_in = false; /* XXX might revise later */
         } else if (typeof(w.declaredClass) != "undefined") {
             can_do_fuzzy = can_do_in =
-                Boolean(w.declaredClass.match(/form\.Text/));
+                Boolean(w.declaredClass.match(/form\.Text|XULT/));
         } else {
             var type = dojo.attr(w, "type");
             if (type)
@@ -362,7 +362,7 @@
             this.allRowIds().forEach(
                 function(id) {
                     var term = self._selector(id).getTerm();
-                    if (!term ||
+                    if (term &&
                         !self.terms[term.hint][term.field].bib_friendly) {
                         self.removeRow(id);
                     }
@@ -568,6 +568,8 @@
     var self = this;
 
     this.liTable = liTable;
+    this.liTable.isUni = true;
+
     this.poGrid = poGrid;
     this.plGrid = plGrid;
     this.invGrid = invGrid;

Modified: trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2	2010-05-06 22:14:06 UTC (rev 16402)
+++ trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2	2010-05-07 15:27:22 UTC (rev 16403)
@@ -79,7 +79,9 @@
                                 <tr>
                                     <td rowspan='2' style='width:43px;'><img style='width:40px;height:65px;' name='jacket'></img></td>
                                     <td style='width:70%;font-weight:bold;'>
-                                        <a attr='title' href='javascript:void(0);'></a>
+                                        <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>



More information about the open-ils-commits mailing list