[open-ils-commits] r17458 - in branches/rel_2_0/Open-ILS/web/js/dojo: fieldmapper openils openils/widget (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Sep 2 17:08:38 EDT 2010
Author: erickson
Date: 2010-09-02 17:08:33 -0400 (Thu, 02 Sep 2010)
New Revision: 17458
Modified:
branches/rel_2_0/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js
branches/rel_2_0/Open-ILS/web/js/dojo/openils/PermaCrud.js
branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
Log:
back-porting: r17391 17397 17398; pcrud/fieldmapper bug fixes; autogrid suppress edit fields option
Modified: branches/rel_2_0/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js
===================================================================
--- branches/rel_2_0/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js 2010-09-02 21:06:14 UTC (rev 17457)
+++ branches/rel_2_0/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js 2010-09-02 21:08:33 UTC (rev 17458)
@@ -53,7 +53,7 @@
obj.a[i] = thing.clone();
} else {
- if(instanceOf(thing, Array)) {
+ if(dojo.isArray(thing)) {
obj.a[i] = new Array();
for( var j in thing ) {
Modified: branches/rel_2_0/Open-ILS/web/js/dojo/openils/PermaCrud.js
===================================================================
--- branches/rel_2_0/Open-ILS/web/js/dojo/openils/PermaCrud.js 2010-09-02 21:06:14 UTC (rev 17457)
+++ branches/rel_2_0/Open-ILS/web/js/dojo/openils/PermaCrud.js 2010-09-02 21:08:33 UTC (rev 17458)
@@ -366,7 +366,9 @@
if (obj.ischanged()) method = 'update';
if (obj.isnew()) method = 'create';
if (obj.isdeleted()) method = 'delete';
- if (!method) throw 'No action detected';
+ if (!method) {
+ return _auto_CUD_recursive(obj_list, pos+1, final_complete, final_error);
+ }
var req_hash = {
method : 'open-ils.pcrud.' + method + '.' + obj.classname,
@@ -393,16 +395,15 @@
oncomplete : function (r) {
var res = r.recv();
if ( res && res.content() ) {
- _auto_CUD_recursive( list, 0 );
+ if (r._final_complete)
+ req._final_complete(req, _return_list);
+ _pcrud.disconnect();
} else {
_pcrud.disconnect();
throw 'Transaction commit error';
}
},
}).send();
-
- if (r._final_complete) r._final_complete(r);
- _pcrud.disconnect();
};
req.onerror = function (r) {
Modified: branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
===================================================================
--- branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js 2010-09-02 21:06:14 UTC (rev 17457)
+++ branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js 2010-09-02 21:08:33 UTC (rev 17458)
@@ -20,6 +20,7 @@
editStyle : 'dialog',
editReadOnly : false,
suppressFields : null,
+ suppressEditFields : null,
hideSelector : false,
selectorWidth : '1.5',
showColumnPicker : false,
@@ -384,6 +385,7 @@
overrideWidgetArgs : this.overrideWidgetArgs,
disableWidgetTest : this.disableWidgetTest,
requiredFields : this.requiredFields,
+ suppressFields : this.suppressEditFields,
onPostSubmit : function() {
for(var i in fmObject._fields) {
var field = fmObject._fields[i];
@@ -424,6 +426,7 @@
overrideWidgetArgs : this.overrideWidgetArgs,
disableWidgetTest : this.disableWidgetTest,
requiredFields : this.requiredFields,
+ suppressFields : this.suppressEditFields,
onPostSubmit : function(req, cudResults) {
var fmObject = cudResults[0];
if(grid.onPostCreate)
More information about the open-ils-commits
mailing list