commit 9e1992a2cdea18fb7e42951b3e40d7411fe0a320 parent b7dbbdba1d1914b3ed51dc4395b2e0260cab709f Author: Felicitus <felicitus@felicitus.org> Date: Mon, 21 Sep 2015 17:42:01 +0200 Clear the part detail prior erasing the record to avoid errors Diffstat:
3 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartDisplay.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartDisplay.js @@ -151,6 +151,11 @@ Ext.define('PartKeepr.PartDisplay', { ]; this.callParent(); }, + clear: function () { + this.attachmentDisplay.bindStore(null); + this.imageDisplay.setStore(null); + + }, /** * Sets the values for the template. * diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsGrid.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsGrid.js @@ -295,6 +295,10 @@ Ext.define('PartKeepr.PartsGrid', { ]; }, + averagePriceRenderer: function () { + "use strict"; + return 0; + }, /** * Renders the storage location */ diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsManager.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsManager.js @@ -308,6 +308,7 @@ Ext.define('PartKeepr.PartManager', { if (btn == "yes") { this.detailPanel.collapse(); + this.detail.clear(); r.erase(); } },