partkeepr

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

commit 1c10db22ac21e12c422b9ff43b51ae46bb939ac4
parent 785422b12d94170082192f21b094e86502b6b2eb
Author: Felicitus <felicitus@felicitus.org>
Date:   Fri, 24 Jul 2015 20:19:27 +0200

Delay grid reload until the footprint has been saved

Diffstat:
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Footprint/FootprintTree.js | 12+++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Footprint/FootprintTree.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Footprint/FootprintTree.js @@ -26,11 +26,13 @@ Ext.define("PartKeepr.FootprintTree", { listeners: { "foreignModelDrop": function (record, target) { record.setCategory(target); - record.save(); - - if (record.store && record.store.reload) { - record.store.reload(); - } + record.save({ + success: function() { + if (record.store && record.store.reload) { + record.store.reload(); + } + } + }); } } }); \ No newline at end of file