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) {
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,
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');
}
}
}
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();
}
}
);
<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>
<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>
<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>