[open-ils-commits] r13088 - trunk/Open-ILS/web/js/ui/default/acq/common (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed May 6 10:46:02 EDT 2009
Author: erickson
Date: 2009-05-06 10:46:00 -0400 (Wed, 06 May 2009)
New Revision: 13088
Modified:
trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
Log:
make sure we build widgets for bacode/note in item list. force sync on batch widget draw to make subsequent widgets load faster
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-06 14:35:01 UTC (rev 13087)
+++ trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js 2009-05-06 14:46:00 UTC (rev 13088)
@@ -25,7 +25,8 @@
}
-var liDetailFields = ['fund', 'owning_lib', 'location', 'collection_code', 'circ_modifier', 'cn_label'];
+var liDetailBatchFields = ['fund', 'owning_lib', 'location', 'collection_code', 'circ_modifier', 'cn_label'];
+var liDetailFields = liDetailBatchFields.concat(['barcode', 'note']);
function AcqLiTable() {
@@ -517,7 +518,7 @@
this._drawBatchCopyWidgets = function() {
var row = this.copyBatchRow;
- dojo.forEach(liDetailFields,
+ dojo.forEach(liDetailBatchFields,
function(field) {
if(self.copyBatchRowDrawn) {
self.copyBatchWidgets[field].attr('value', null);
@@ -527,7 +528,8 @@
fmClass : 'acqlid',
parentNode : dojo.query('[name='+field+']', row)[0],
orgLimitPerms : ['CREATE_PICKLIST'],
- dijitArgs : {required:false}
+ dijitArgs : {required:false},
+ forceSync : true
});
widget.build(
function(w, ww) {
@@ -544,7 +546,7 @@
var self = this;
for(var k in this.copyWidgetCache) {
var cache = this.copyWidgetCache[k];
- dojo.forEach(liDetailFields, function(f) {
+ dojo.forEach(liDetailBatchFields, function(f) {
var newval = self.copyBatchWidgets[f].attr('value');
if(newval) cache[f].attr('value', newval);
});
@@ -587,17 +589,19 @@
dojo.forEach(liDetailFields,
function(field) {
+ console.log("adding widget for " + field);
var widget = new openils.widget.AutoFieldWidget({
fmObject : copy,
fmField : field,
fmClass : 'acqlid',
parentNode : dojo.query('[name='+field+']', row)[0],
orgLimitPerms : ['CREATE_PICKLIST', 'CREATE_PURCHASE_ORDER'],
- readOnly : self.isPO
+ readOnly : Boolean(copy.eg_copy_id())
});
widget.build(
// make sure we capture the value from any async widgets
function(w, ww) {
+ console.log("built widget for " + field + ' : readonly = ' + ww.readOnly);
copy[field](ww.getFormattedValue())
self.copyWidgetCache[copy.id()][field] = w;
}
More information about the open-ils-commits
mailing list