Commit 93ed8524 authored by Boris Kocherov's avatar Boris Kocherov

simplify selfRemove

parent 64584dbb
......@@ -696,16 +696,14 @@
event.srcElement.focus();
});
})
.declareAcquiredMethod("deleteChildrenParent", "deleteChildren")
.allowPublicAcquisition("deleteChildren", function (scope) {
.declareAcquiredMethod("selfRemove", "deleteChildren")
.allowPublicAcquisition("deleteChildren", function (arr, scope) {
var g = this,
key,
objects = this.props.objects,
element = getSubGadgetElement(this, scope),
element = getSubGadgetElement(g, scope),
parent = element.getAttribute("data-json-parent"),
tasks = [];
// TODO strange rjs behavior
scope = scope[0];
if (objects.hasOwnProperty(parent)) {
parent = objects[parent];
for (key in parent) {
......@@ -724,9 +722,6 @@
}
return RSVP.All(tasks);
})
.declareMethod("selfRemove", function () {
return this.deleteChildrenParent(this.element.getAttribute('data-gadget-scope'));
})
.declareAcquiredMethod("processValidationParent", "processValidation")
.allowPublicAcquisition("processValidation", function (json_dict) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment