Resolved merge conflicts

This commit is contained in:
Henry
2016-05-12 16:03:19 -07:00
parent e5ef7c0c22
commit bd686790dc
11 changed files with 53 additions and 91 deletions

View File

@@ -50,17 +50,23 @@ define(
EditorCapability.prototype.edit = function () {
this.transactionService.startTransaction();
this.getCapability('status').set('editing', true);
this.domainObject.getCapability('status').set('editing', true);
};
EditorCapability.prototype.save = function () {
return this.transactionService.commit();
var domainObject = this.domainObject;
return this.transactionService.commit().then(function() {
domainObject.getCapability('status').set('editing', false);
});
};
EditorCapability.prototype.invoke = EditorCapability.prototype.edit;
EditorCapability.prototype.cancel = function () {
var domainObject = this.domainObject;
return this.transactionService.cancel().then(function(){
domainObject.getCapability("status").set("editing", false);
return domainObject;
});
};