From a8ddc63b4bce58630fc3bdd6565e45bb0e87326a Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 26 May 2009 20:52:34 +0000 Subject: [PATCH] added onEditPane callback for munging edit/create panes git-svn-id: svn://svn.open-ils.org/ILS/trunk@13239 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/openils/widget/AutoGrid.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js b/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js index 9908e4eee4..975917f0db 100644 --- a/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js +++ b/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js @@ -196,6 +196,21 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) { } }, + 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 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) { 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 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) { 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 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) { 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() { -- 2.11.0