commit 5ce43bde2787b80ede56ea051576a662dfa6f69a
parent 3413ea7f9f79c11627f99add1cf018e16ee93073
Author: Felicitus <felicitus@felicitus.org>
Date: Mon, 22 Jun 2015 18:53:46 +0200
Implemented DELETE method for Hydra/JSON-LD
Diffstat:
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Editor/EditorComponent.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Editor/EditorComponent.js
@@ -164,7 +164,7 @@ Ext.define('PartKeepr.EditorComponent', {
},this);
},
deleteRecord: function (r) {
- var editor = this.findEditor(r.getId()("id"));
+ var editor = this.findEditor(r.getId());
if (editor !== null) {
this.editorTabPanel.remove(editor);
diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Data/RestProxy.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Data/RestProxy.js
@@ -69,6 +69,10 @@ Ext.define("PartKeepr.data.RestProxy", {
this.api.update = request.getRecords()[0].getId();
}
+ if (request.getAction() == "destroy") {
+ this.api.destroy = request.getRecords()[0].getId();
+ }
+
return this.callParent([request]);
},
getParams: function (operation) {