partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit 3413ea7f9f79c11627f99add1cf018e16ee93073
parent da20b1017b8ea50ff1470b9ae4c31a51b7965fe0
Author: Felicitus <felicitus@felicitus.org>
Date:   Mon, 22 Jun 2015 18:02:45 +0200

Only re-enable button if it's still rendered

Diffstat:
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Editor/Editor.js | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Editor/Editor.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Editor/Editor.js @@ -104,7 +104,12 @@ Ext.define('PartKeepr.Editor', { this.saveButton.disable(); // Sanity: If the save process fails, re-enable the button after 30 seconds - Ext.defer(function () { this.saveButton.enable(); }, 30000, this); + // @todo This is quite a hack. Needs verification if that's still required + Ext.defer(function () { + if (this.saveButton.getEl()) { + this.saveButton.enable(); + } + }, 30000, this); } this.getForm().updateRecord(this.record);