[open-ils-commits] r12707 - 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
Fri Mar 27 16:00:37 EDT 2009
Author: erickson
Date: 2009-03-27 16:00:33 -0400 (Fri, 27 Mar 2009)
New Revision: 12707
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:
adding some initial readonly parts
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-03-27 19:59:57 UTC (rev 12706)
+++ trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js 2009-03-27 20:00:33 UTC (rev 12707)
@@ -154,9 +154,9 @@
this._fetchLineitem = function(liId, handler) {
- if(this.liCache[liId] && this.liCache[liId].marc()) {
- return handler(this.liCache[liId]);
- }
+ var li = this.liCache[liId];
+ if(li && li.marc() && li.lineitem_details())
+ return handler(li);
fieldmapper.standardRequest(
['open-ils.acq', 'open-ils.acq.lineitem.retrieve'],
@@ -338,6 +338,7 @@
fmClass : 'acqlid',
parentNode : dojo.query('[name='+field+']', row)[0],
orgLimitPerms : ['CREATE_PICKLIST'],
+ readOnly : self.isPO
});
widget.build();
dojo.connect(widget.widget, 'onChange',
@@ -353,8 +354,12 @@
}
);
- dojo.query('[name=delete]', row)[0].onclick =
- function() { self.deleteCopy(row) };
+ if(this.isPO) {
+ openils.Util.hide(dojo.query('[name=delete]', row)[0].parentNode);
+ } else {
+ dojo.query('[name=delete]', row)[0].onclick =
+ function() { self.deleteCopy(row) };
+ }
};
this.deleteCopy = function(row) {
Modified: trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2 2009-03-27 19:59:57 UTC (rev 12706)
+++ trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2 2009-03-27 20:00:33 UTC (rev 12707)
@@ -3,7 +3,7 @@
<div id='acq-lit-table-div' class='hidden'>
<!-- Lineitem (bib record) list -->
- <table id='acq-lit-table'>
+ <table id='acq-lit-table' class='oils-generic-table'>
<thead>
<tr>
<th style='border:1px solid #aaa;' colspan='0'>
@@ -17,6 +17,7 @@
<option value='selector_ready'>Mark Ready for Selector</option>
<option value='order_ready'>Mark Ready for Order</option>
<option value='create_order'>Create Purchase Order</option>
+ <option value='print_po'>Print Purchase Order</option>
</select>
</span>
</td>
More information about the open-ils-commits
mailing list