[open-ils-commits] r19356 - branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget (senator)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Feb 1 16:39:42 EST 2011


Author: senator
Date: 2011-02-01 16:39:37 -0500 (Tue, 01 Feb 2011)
New Revision: 19356

Modified:
   branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
Log:
Backport r19355 from trunk

Acq: Improving on r19351, don't let showCreatePane() be issued repeatedly to
fill the window with redundant dialogs, since a) it looks silly, and b) the
dialogs don't work when there are more than one of them. Thanks again Dan.


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	2011-02-01 21:39:06 UTC (rev 19355)
+++ branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js	2011-02-01 21:39:37 UTC (rev 19356)
@@ -46,6 +46,7 @@
                 this.attr('structure', this._compileStructure());
                 this.setStore(this.buildAutoStore());
                 this.cachedQueryOpts = {};
+                this._showing_create_pane = false;
 
                 if(this.showColumnPicker) {
                     if(!this.columnPickerPrefix) {
@@ -527,8 +528,15 @@
             },
 
             showCreatePane : function() {
+                if (this._showing_create_pane)
+                    return;
+                this._showing_create_pane = true;
+
                 var self = this;
-                var done = function() { self.hidePane(); };
+                var done = function() {
+                    self._showing_create_pane = false;
+                    self.hidePane();
+                };
                 dojo.style(this.domNode, 'display', 'none');
                 this.editPane = this._makeCreatePane(done, done);
                 this.editPane.startup();



More information about the open-ils-commits mailing list