(js) Delete an event or a task

This commit is contained in:
Francis Lachapelle
2015-09-28 11:27:20 -04:00
parent 5496dd97d9
commit b27cfc2bd8
4 changed files with 102 additions and 19 deletions
@@ -872,6 +872,21 @@
});
};
/**
* @function $delete
* @memberof Component.prototype
* @desc Delete the component from the server.
* @param {boolean} occurrenceOnly - delete this occurrence only
*/
Component.prototype.remove = function(occurrenceOnly) {
var _this = this, path = [this.pid, this.id];
if (occurrenceOnly && this.occurrenceId)
path.push(this.occurrenceId);
return Component.$$resource.remove(path.join('/'));
};
/**
* @function $unwrap
* @memberof Component.prototype