From: senator Date: Fri, 7 May 2010 15:27:22 +0000 (+0000) Subject: Acq: bugfixes, improvements to lineitem + bib search X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d465fe07e9f9fd55e31679090a0678d0e9d85f3c;p=evergreen%2Ftadl.git 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 git-svn-id: svn://svn.open-ils.org/ILS/trunk@16403 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/css/skin/default/acq.css b/Open-ILS/web/css/skin/default/acq.css index 01c5c57826..74d7e16ea3 100644 --- a/Open-ILS/web/css/skin/default/acq.css +++ b/Open-ILS/web/css/skin/default/acq.css @@ -231,6 +231,7 @@ option[disabled="disabled"] { font-style: italic; } .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; } diff --git a/Open-ILS/web/js/dojo/openils/widget/XULTermLoader.js b/Open-ILS/web/js/dojo/openils/widget/XULTermLoader.js index fb4770d4ef..50f2d27352 100644 --- a/Open-ILS/web/js/dojo/openils/widget/XULTermLoader.js +++ b/Open-ILS/web/js/dojo/openils/widget/XULTermLoader.js @@ -84,7 +84,8 @@ if (!dojo._hasResource["openils.widget.XULTermLoader"]) { } }, "parseUnimaginatively": function(data) { - return data.split(/[\n, ]/).filter( + if (!data) return []; + else return data.split(/[\n, ]/).filter( function(o) { return o.length > 0; } ); } diff --git a/Open-ILS/web/js/ui/default/acq/common/li_table.js b/Open-ILS/web/js/ui/default/acq/common/li_table.js index aefc83799b..19a8754a13 100644 --- a/Open-ILS/web/js/ui/default/acq/common/li_table.js +++ b/Open-ILS/web/js/ui/default/acq/common/li_table.js @@ -298,14 +298,17 @@ function AcqLiTable() { } // 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()); diff --git a/Open-ILS/web/js/ui/default/acq/search/unified.js b/Open-ILS/web/js/ui/default/acq/search/unified.js index 0518559d42..c65834cd83 100644 --- a/Open-ILS/web/js/ui/default/acq/search/unified.js +++ b/Open-ILS/web/js/ui/default/acq/search/unified.js @@ -288,7 +288,7 @@ function TermManager() { 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 @@ function TermManager() { 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 @@ function ResultManager(liTable, poGrid, plGrid, invGrid) { var self = this; this.liTable = liTable; + this.liTable.isUni = true; + this.poGrid = poGrid; this.plGrid = plGrid; this.invGrid = invGrid; diff --git a/Open-ILS/web/templates/default/acq/common/li_table.tt2 b/Open-ILS/web/templates/default/acq/common/li_table.tt2 index 955eaaa356..36039a4c99 100644 --- a/Open-ILS/web/templates/default/acq/common/li_table.tt2 +++ b/Open-ILS/web/templates/default/acq/common/li_table.tt2 @@ -79,7 +79,9 @@ - + ()