partkeepr

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

commit 5e12c5a28dabb51ff9906ec973680bcf71203d20
parent 12ee2d2c9ef50337694c29d810b440580645ffb8
Author: Felicitus <felicitus@felicitus.org>
Date:   Mon, 16 Nov 2015 23:41:39 +0100

Reload grid when a new part was added or duplicated

Diffstat:
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsManager.js | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsManager.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsManager.js @@ -285,7 +285,7 @@ Ext.define('PartKeepr.PartManager', { partMode: 'create' }); - j.editor.on("partSaved", this.onPartSaved, this); + j.editor.on("partSaved", this.onNewPartSaved, this); j.editor.editItem(copy); j.show(); }, @@ -305,7 +305,7 @@ Ext.define('PartKeepr.PartManager', { partMode: 'create' }); - j.editor.on("partSaved", this.onPartSaved, this); + j.editor.on("partSaved", this.onNewPartSaved, this); j.editor.editItem(newItem); j.show(); }, @@ -348,6 +348,7 @@ Ext.define('PartKeepr.PartManager', { record.setPartUnit(defaultPartUnit); j.editor.editItem(record); + j.editor.on("partSaved", this.onNewPartSaved, this); j.show(); return j; @@ -362,6 +363,9 @@ Ext.define('PartKeepr.PartManager', { j.editor.editItem(part); j.show(); }, + onNewPartSaved: function (record) { + this.grid.getStore().reload(); + }, onPartSaved: function (record) { this.detail.setValues(record);