[open-ils-commits] r13239 - trunk/Open-ILS/web/js/dojo/openils/widget (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue May 26 16:52:38 EDT 2009


Author: erickson
Date: 2009-05-26 16:52:34 -0400 (Tue, 26 May 2009)
New Revision: 13239

Modified:
   trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
Log:
added onEditPane callback for munging edit/create panes

Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js	2009-05-26 20:51:59 UTC (rev 13238)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js	2009-05-26 20:52:34 UTC (rev 13239)
@@ -196,6 +196,21 @@
                 }
             },
 
+            getAllObjects : function() {
+                var objs = [];
+                var self = this;
+                this.store.fetch({
+                    onComplete : function(list) {
+                        dojo.forEach(list, 
+                            function(item) {
+                                objs.push(new fieldmapper[self.fmClass]().fromStoreItem(item));
+                            }
+                        )
+                    }
+                });
+                return objs;
+            },
+
             deleteSelected : function() {
                 var items = this.getSelectedItems();
                 var total = items.length;
@@ -367,6 +382,7 @@
                 this.editPane = this._makeEditPane(storeItem, rowIndex, done, done);
                 this.editPane.startup();
                 this.domNode.parentNode.insertBefore(this.editPane.domNode, this.domNode);
+                if(this.onEditPane) this.onEditPane(this.editPane);
             },
 
             showClonePane : function() {
@@ -377,6 +393,7 @@
                 dojo.style(this.domNode, 'display', 'none');
                 this.editPane = this._makeClonePane(this.getItem(row), row, done, done);
                 this.domNode.parentNode.insertBefore(this.editPane.domNode, this.domNode);
+                if(this.onEditPane) this.onEditPane(this.editPane);
             },
 
             showCreatePane : function() {
@@ -386,6 +403,7 @@
                 this.editPane = this._makeCreatePane(done, done);
                 this.editPane.startup();
                 this.domNode.parentNode.insertBefore(this.editPane.domNode, this.domNode);
+                if(this.onEditPane) this.onEditPane(this.editPane);
             },
 
             hideDialog : function() {



More information about the open-ils-commits mailing list