[open-ils-commits] r12881 - 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 Apr 15 12:08:50 EDT 2009
Author: erickson
Date: 2009-04-15 12:08:48 -0400 (Wed, 15 Apr 2009)
New Revision: 12881
Modified:
trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2
Log:
option to skip asset creation at po create time with existing picklist. similar update clues added to po/asset create that are in upload
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 2009-04-15 16:07:47 UTC (rev 12880)
+++ trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js 2009-04-15 16:08:48 UTC (rev 12881)
@@ -234,6 +234,14 @@
dojo.query('[name=value]', row)[0].appendChild(document.createTextNode(attr.attr_value()));
this.infoTbody.appendChild(row);
}
+
+ 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];
+ link.setAttribute('href', link.getAttribute('href') + li.eg_bib_id());
+ } else {
+ openils.Util.hide('acq-lit-info-cat-link');
+ }
};
this.drawMarcHTML = function(li) {
@@ -486,7 +494,8 @@
this.createAssets = function() {
if(!this.isPO) return;
if(!confirm(localeStrings.CREATE_PO_ASSETS_CONFIRM)) return;
- progressDialog.show();
+ this.show('acq-lit-create-po-progress');
+ var self = this;
fieldmapper.standardRequest(
['open-ils.acq', 'open-ils.acq.purchase_order.assets.create'],
{ async: true,
@@ -494,10 +503,15 @@
onresponse: function(r) {
var resp = openils.Util.readResponse(r);
if(!resp) return;
+ dojo.byId('acq-pl-lit-li-processed').innerHTML = resp.li;
+ dojo.byId('acq-pl-lit-lid-processed').innerHTML = resp.lid;
+ dojo.byId('acq-pl-lit-debits-processed').innerHTML = resp.debits_accrued;
+ dojo.byId('acq-pl-lit-bibs-processed').innerHTML = resp.bibs;
+ dojo.byId('acq-pl-lit-indexed-processed').innerHTML = resp.indexed;
+ dojo.byId('acq-pl-lit-copies-processed').innerHTML = resp.copies;
if(resp.complete) {
- progressDialog.hide();
- } else {
- progressDialog.update({maximum:resp.total, progress:resp.progress});
+ openils.Util.hide('acq-lit-create-po-progress');
+ self.show('list');
}
}
}
@@ -570,18 +584,21 @@
po,
{
lineitems : selected.map(function(li) { return li.id() }),
- create_assets : true,
- create_debits : true,
- circ_modifier : 'book', /* XXX */
+ create_assets : fields.create_assets[0],
}
],
+
onresponse : function(r) {
var resp = openils.Util.readResponse(r);
- openils.Util.appendClear('acq-lit-po-encumbered', document.createTextNode(resp.total_debits));
- openils.Util.appendClear('acq-lit-po-copies', document.createTextNode(resp.total_copies));
- litPoTotalProgress.update({maximum:max, progress:resp.progress});
+ if(!resp) return;
+ dojo.byId('acq-pl-lit-li-processed').innerHTML = resp.li;
+ dojo.byId('acq-pl-lit-lid-processed').innerHTML = resp.lid;
+ dojo.byId('acq-pl-lit-debits-processed').innerHTML = resp.debits_accrued;
+ dojo.byId('acq-pl-lit-bibs-processed').innerHTML = resp.bibs;
+ dojo.byId('acq-pl-lit-indexed-processed').innerHTML = resp.indexed;
+ dojo.byId('acq-pl-lit-copies-processed').innerHTML = resp.copies;
if(resp.complete)
- location.href = oilsBasePath + '/eg/acq/po/view/' + resp.purchase_order;
+ location.href = oilsBasePath + '/eg/acq/po/view/' + resp.purchase_order.id();
}
}
);
Modified: trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2 2009-04-15 16:07:47 UTC (rev 12880)
+++ trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2 2009-04-15 16:08:48 UTC (rev 12881)
@@ -97,6 +97,9 @@
<tr id='acq-lit-info-row'><td name='label'/><td name='value'/></tr>
</tbody>
</table>
+ <div style='margin-top:10px;' class='hidden' id='acq-lit-info-cat-link'>
+ View in the <a href='/opac/en-US/skin/default/xml/rdetail.xml?r='>Catalog</a>
+ </div>
<div style='margin-top:40px;'>
<h3>MARC Record</h3>
<div>
@@ -185,18 +188,32 @@
<div class='hidden' id='acq-lit-create-po-progress'>
<table class='oils-generic-table'>
- <tr>
- <td>Encumbered Funds:</td>
- <td><span id='acq-lit-po-encumbered'></span></td>
- </tr>
- <tr>
- <td>Copies Created:</td>
- <td><span id='acq-lit-po-copies'></span></td>
- </tr>
- <tr>
- <td>Total Progress: </td>
- <td><span dojoType="dijit.ProgressBar" style="width:300px" jsId="litPoTotalProgress"></span></td>
- </tr>
+ <tbody>
+ <tr>
+ <td>Lineitems Processed</td>
+ <td><span id='acq-pl-lit-li-processed'>0</span></td>
+ </tr>
+ <tr>
+ <td>Items Processed</td>
+ <td><span id='acq-pl-lit-lid-processed'>0</span></td>
+ </tr>
+ <tr>
+ <td>Debits Encumbered</td>
+ <td><span id='acq-pl-lit-debits-processed'>0</span></td>
+ </tr>
+ <tr>
+ <td>Bib Records Imported</td>
+ <td><span id='acq-pl-lit-bibs-processed'>0</span></td>
+ </tr>
+ <tr>
+ <td>Bib Records Indexed</td>
+ <td><span id='acq-pl-lit-indexed-processed'>0</span></td>
+ </tr>
+ <tr>
+ <td>Copies Created</td>
+ <td><span id='acq-pl-lit-copies-processed'>0</span></td>
+ </tr>
+ </tbody>
</table>
</div>
@@ -216,6 +233,10 @@
<td><input name='create_from' value='selected' dojoType='dijit.form.RadioButton'/></td>
</tr>
<tr>
+ <td>Import Bibs and Create Copies</td>
+ <td><input name='create_assets' dojoType='dijit.form.CheckBox'/></td>
+ </tr>
+ <tr>
<td colspan='2'>
<div dojoType='dijit.form.Button' type='submit' jsId='acqLitCreatePoSubmit'>Submit</div>
</td>
More information about the open-ils-commits
mailing list