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