mirror of
https://github.com/nasa/openmct.git
synced 2025-06-13 04:38:15 +00:00
[Edit Mode] Visual indication of object being edited #278
This commit is contained in:
@ -80,6 +80,7 @@ define(
|
||||
EditorCapability.prototype.save = function (nonrecursive) {
|
||||
var domainObject = this.domainObject,
|
||||
editableObject = this.editableObject,
|
||||
self = this,
|
||||
cache = this.cache;
|
||||
|
||||
// Update the underlying, "real" domain object's model
|
||||
@ -95,8 +96,10 @@ define(
|
||||
return domainObject.getCapability('persistence').persist();
|
||||
}
|
||||
|
||||
editableObject.getCapability("status").set("editing", false);
|
||||
|
||||
return nonrecursive ?
|
||||
resolvePromise(doMutate()).then(doPersist) :
|
||||
resolvePromise(doMutate()).then(doPersist).then(function(){self.cancel()}) :
|
||||
resolvePromise(cache.saveAll());
|
||||
};
|
||||
|
||||
@ -109,6 +112,8 @@ define(
|
||||
* @memberof platform/commonUI/edit.EditorCapability#
|
||||
*/
|
||||
EditorCapability.prototype.cancel = function () {
|
||||
this.editableObject.getCapability("status").set("editing", false);
|
||||
//TODO: Reset the cache as well here.
|
||||
return resolvePromise(undefined);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user