From: senator Date: Tue, 1 Feb 2011 21:39:37 +0000 (+0000) Subject: Backport r19355 from trunk X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7cf6cac6d8f2dd15d41fcbcb5ce68ea2c1c201e7;p=evergreen%2Fequinox.git 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. git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@19356 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js b/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js index aceff7e2c2..94f24bfa4b 100644 --- a/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js +++ b/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js @@ -46,6 +46,7 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) { 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 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) { }, 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();