From 6725150bcbd291defda846fadeb0e4751a71bdc1 Mon Sep 17 00:00:00 2001 From: senator Date: Tue, 1 Feb 2011 21:39:06 +0000 Subject: [PATCH] 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/trunk@19355 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/openils/widget/AutoGrid.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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(); -- 2.11.0