[open-ils-commits] r13056 - 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
Mon May 4 15:50:46 EDT 2009
Author: erickson
Date: 2009-05-04 15:50:42 -0400 (Mon, 04 May 2009)
New Revision: 13056
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:
added ordering agency field to create-po dialog
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-05-04 19:50:04 UTC (rev 13055)
+++ trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js 2009-05-04 19:50:42 UTC (rev 13056)
@@ -338,6 +338,7 @@
this.removeLineitem = function(liId) {
this.tbody.removeChild(dojo.query('[li='+liId+']', this.tbody)[0]);
delete this.liCache[liId];
+ //selected.push(self.liCache[i.parentNode.parentNode.getAttribute('li')]);
}
this.drawInfo = function(liId) {
@@ -678,12 +679,24 @@
fmField : 'provider',
fmClass : 'acqpo',
parentNode : dojo.byId('acq-lit-po-provider'),
- orgLimitPerms : ['CREATE_PURCHASE_ORDER'],
});
widget.build(
function(w) { self.createPoProviderSelector = w; }
);
}
+
+ if(!this.createPoAgencySelector) {
+ var widget = new openils.widget.AutoFieldWidget({
+ fmField : 'ordering_agency',
+ fmClass : 'acqpo',
+ parentNode : dojo.byId('acq-lit-po-agency'),
+ orgLimitPerms : ['CREATE_PURCHASE_ORDER'],
+ });
+ widget.build(
+ function(w) { self.createPoAgencySelector = w; }
+ );
+ }
+
acqLitPoCreateDialog.show();
break;
@@ -834,6 +847,7 @@
this.show('acq-lit-progress-numbers');
var po = new fieldmapper.acqpo();
po.provider(this.createPoProviderSelector.attr('value'));
+ po.ordering_agency(this.createPoAgencySelector.attr('value'));
var selected = this.getSelected( (fields.create_from == 'all') );
if(selected.length == 0) return;
Modified: trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2 2009-05-04 19:50:04 UTC (rev 13055)
+++ trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2 2009-05-04 19:50:42 UTC (rev 13056)
@@ -320,6 +320,10 @@
<div dojoType='dijit.Dialog' jsId='acqLitPoCreateDialog'>
<table class='oils-generic-table'>
<tr>
+ <td>Ordering Agency</td>
+ <td><div name='ordering_agency' id='acq-lit-po-agency'/></td>
+ </tr>
+ <tr>
<td>Provider</td>
<td><div name='provider' id='acq-lit-po-provider'/></td>
</tr>
More information about the open-ils-commits
mailing list