From f086dd2f201b095bd15b38001f492f99f077ca4b Mon Sep 17 00:00:00 2001 From: senator Date: Tue, 18 May 2010 16:53:33 +0000 Subject: [PATCH] Acq: don't check claim eligibility on pseudo-LIs generated in title search git-svn-id: svn://svn.open-ils.org/ILS/trunk@16447 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/ui/default/acq/common/li_table.js | 4 +++- Open-ILS/web/js/ui/default/acq/picklist/bib_search.js | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) 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 4e029af31..c21e0a79b 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 @@ -67,6 +67,7 @@ function AcqLiTable() { this.realCopiesTbody = dojo.byId('acq-lit-real-copies-tbody'); this.realCopiesRow = this.realCopiesTbody.removeChild(dojo.byId('acq-lit-real-copies-row')); this._copy_fields_for_acqdf = ['owning_lib', 'location']; + this.skipInitialEligibilityCheck = false; this.invoiceLinkDialogManager = new InvoiceLinkDialogManager("li"); this.claimDialog = new ClaimDialogManager( liClaimDialog, finalClaimDialog, this.claimEligibleLidByLi, @@ -275,7 +276,8 @@ function AcqLiTable() { dojo.query('[name=copieslink]', row)[0].onclick = function() {self.drawCopies(li.id())}; dojo.query('[name=noteslink]', row)[0].onclick = function() {self.drawLiNotes(li)}; - this.fetchClaimInfo(li.id(), false, null, row); + if (!this.skipInitialEligibilityCheck) + this.fetchClaimInfo(li.id(), false, null, row); this.updateLiNotesCount(li, row); diff --git a/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js b/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js index de53033d8..43457289e 100644 --- a/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js +++ b/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js @@ -25,6 +25,8 @@ var liTable; function drawForm() { liTable = new AcqLiTable(); + liTable.skipInitialEligibilityCheck = true; + fieldmapper.standardRequest( ['open-ils.search', 'open-ils.search.z3950.retrieve_services'], { async: true, @@ -116,7 +118,7 @@ function doSearch(values) { ['open-ils.acq', 'open-ils.acq.picklist.search.z3950'], { async: true, params: [user.authtoken, search, null, {respond_li:1, flesh_attrs:1, clear_marc:1}], - onresponse: handleResult, + onresponse: handleResult } ); } @@ -132,13 +134,12 @@ function handleResult(r) { liTable.show('list'); dojo.style(dojo.byId('oils-acq-pl-search-results'), 'display', 'block'); var tbody = dojo.byId('plist-tbody'); - if(result.lineitem) + if(result.lineitem) liTable.addLineitem(result.lineitem); if(result.complete) // hide the loading image dojo.style('oils-acq-pl-loading','display', 'none'); } - function showDiv(div) { var divs = [ 'oils-acq-search-block', -- 2.11.0