[open-ils-commits] r19355 - trunk/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:11 EST 2011


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

Modified:
   trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
Log:
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: trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js	2011-02-01 21:23:29 UTC (rev 19354)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js	2011-02-01 21:39:06 UTC (rev 19355)
@@ -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