commit a0ef018c10677846542609a42fb282dfcc42b35d
parent 19223a74e33957ea8cef71000a36b3f29f0dac8c
Author: Felicia Hummel <felicia@partkeepr.com>
Date: Tue, 17 Jan 2017 18:02:11 +0100
Fixed error where a QuickTip wasn't unregistered
Diffstat:
2 files changed, 17 insertions(+), 0 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
@@ -199,6 +199,7 @@ Ext.define('PartKeepr.PartEditor', {
});
}
},
+ itemId: 'idField',
name: '@id',
fieldStyle: {
color: "blue",
@@ -329,9 +330,16 @@ Ext.define('PartKeepr.PartEditor', {
this.callParent();
this.on("itemSave", this.onItemSave, this);
+ this.on("beforedestroy", this.onBeforeDestroy, this);
},
/**
+ * Unregisters the quick tip immediately prior destroying
+ */
+ onBeforeDestroy: function () {
+ Ext.QuickTips.unregister(this.down("#idField").getEl());
+ },
+ /**
* Cleans up the record prior saving.
*/
onItemSave: function ()
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,6 +145,7 @@ Ext.define('PartKeepr.PartFilterPanel', {
];
this.store.getFilters().on("endupdate", this._onFilterRemove, this);
+ this.on("beforedestroy", this.onBeforeDestroy, this);
this.callParent();
},
_onFilterRemove: function ()
@@ -1026,6 +1027,7 @@ Ext.define('PartKeepr.PartFilterPanel', {
this.internalIdFilter = Ext.create("Ext.form.field.Text", {
fieldLabel: i18n("Internal ID"),
anchor: '100%',
+ itemId: '#idField',
qtip: i18n(
"The first number is the ID in decimal, the second number is the ID in base36. To search in base36 format you need to prefix the search string with #, example: #15y"),
plugins: [
@@ -1143,5 +1145,12 @@ Ext.define('PartKeepr.PartFilterPanel', {
disableFilters: disableFilters,
enableFilters: enableFilters
};
+ },
+ /**
+ * Unregisters the quick tip immediately prior destroying
+ */
+ onBeforeDestroy: function ()
+ {
+ Ext.QuickTips.unregister(this.down("#idField").getEl());
}
});