partkeepr

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

commit d0b8cf57e8b5076db4c4590e6cc830bd001b7682
parent 48028c0f2de0abd76e1699ba5667089295b9e218
Author: Felicia Hummel <felicia@partkeepr.com>
Date:   Tue, 17 Jan 2017 18:10:52 +0100

Fixed error where a QuickTip wasn't unregistered

Diffstat:
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditor.js | 6+++---
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js | 7++++---
2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditor.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditor.js @@ -330,14 +330,14 @@ Ext.define('PartKeepr.PartEditor', { this.callParent(); this.on("itemSave", this.onItemSave, this); - this.on("beforedestroy", this.onBeforeDestroy, this); + this.down("#idField").on("beforedestroy", this.onBeforeDestroy, this.down("#idField")); }, /** * Unregisters the quick tip immediately prior destroying */ - onBeforeDestroy: function () { - Ext.QuickTips.unregister(this.down("#idField").getEl()); + onBeforeDestroy: function (field) { + Ext.QuickTips.unregister(field.getEl()); }, /** * Cleans up the record prior saving. diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js @@ -145,8 +145,9 @@ Ext.define('PartKeepr.PartFilterPanel', { ]; this.store.getFilters().on("endupdate", this._onFilterRemove, this); - this.on("beforedestroy", this.onBeforeDestroy, this); this.callParent(); + + this.down("#idField").on("beforedestroy", this.onBeforeIdFieldDestroy, this.down("#idField")); }, _onFilterRemove: function () { @@ -1149,8 +1150,8 @@ Ext.define('PartKeepr.PartFilterPanel', { /** * Unregisters the quick tip immediately prior destroying */ - onBeforeDestroy: function () + onBeforeIdFieldDestroy: function (field) { - Ext.QuickTips.unregister(this.down("#idField").getEl()); + Ext.QuickTips.unregister(field.getEl()); } });