commit b7dbbdba1d1914b3ed51dc4395b2e0260cab709f
parent eb9ad2bb818d96c1f22b04ca5150d571a86dc6c2
Author: Felicitus <felicitus@felicitus.org>
Date: Mon, 21 Sep 2015 17:25:31 +0200
Fixed DELETE REST call for parts
Diffstat:
1 file changed, 2 insertions(+), 11 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
@@ -307,17 +307,8 @@ Ext.define('PartKeepr.PartManager', {
var r = this.grid.getSelectionModel().getLastSelected();
if (btn == "yes") {
- var call = new PartKeepr.ServiceCall(
- "Part",
- "deletePart");
-
- call.setLoadMessage(sprintf(i18n("Deleting part %s"), r.get("name")));
- call.setParameter("part", r.getId());
- call.setHandler(Ext.bind(function ()
- {
- this.store.load();
- }, this));
- call.doCall();
+ this.detailPanel.collapse();
+ r.erase();
}
},
/**