mirror of
https://github.com/nasa/openmct.git
synced 2025-05-11 04:52:57 +00:00
Adding support for object status
This commit is contained in:
parent
50d83eaffb
commit
4ea757faa5
@ -72,8 +72,10 @@ define(
|
|||||||
* Enter edit mode.
|
* Enter edit mode.
|
||||||
*/
|
*/
|
||||||
EditAction.prototype.perform = function () {
|
EditAction.prototype.perform = function () {
|
||||||
if (!this.domainObject.getDomainObject) {
|
var editableObject;
|
||||||
this.navigationService.setNavigation(new EditableDomainObject(this.domainObject, this.$q));
|
if (!this.domainObject.hasCapability("editor")) {
|
||||||
|
editableObject = new EditableDomainObject(this.domainObject, this.$q);
|
||||||
|
this.navigationService.setNavigation(editableObject);
|
||||||
}
|
}
|
||||||
//this.$location.path("/edit");
|
//this.$location.path("/edit");
|
||||||
};
|
};
|
||||||
|
@ -69,7 +69,8 @@ define(
|
|||||||
*/
|
*/
|
||||||
EditableDomainObjectCache.prototype.getEditableObject = function (domainObject) {
|
EditableDomainObjectCache.prototype.getEditableObject = function (domainObject) {
|
||||||
var type = domainObject.getCapability('type'),
|
var type = domainObject.getCapability('type'),
|
||||||
EditableDomainObject = this.EditableDomainObject;
|
EditableDomainObject = this.EditableDomainObject,
|
||||||
|
editableObject;
|
||||||
|
|
||||||
// Track the top-level domain object; this will have
|
// Track the top-level domain object; this will have
|
||||||
// some special behavior for its context capability.
|
// some special behavior for its context capability.
|
||||||
@ -86,10 +87,13 @@ define(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Provide an editable form of the object
|
// Provide an editable form of the object
|
||||||
return new EditableDomainObject(
|
editableObject = new EditableDomainObject(
|
||||||
domainObject,
|
domainObject,
|
||||||
this.cache.getCachedModel(domainObject)
|
this.cache.getCachedModel(domainObject)
|
||||||
);
|
);
|
||||||
|
editableObject.getCapability("status").set('editing', true);
|
||||||
|
|
||||||
|
return editableObject;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user