mirror of
https://github.com/nasa/openmct.git
synced 2025-02-22 02:06:49 +00:00
[New Edit Mode] Add Elements pool to New Edit Mode #279
This commit is contained in:
parent
7849803a5d
commit
c211f413aa
@ -73,7 +73,7 @@
|
|||||||
|
|
||||||
<div class="split-pane-component t-inspect pane right mobile-hide">
|
<div class="split-pane-component t-inspect pane right mobile-hide">
|
||||||
<mct-representation key="'object-inspector'"
|
<mct-representation key="'object-inspector'"
|
||||||
mct-object="domainObject"
|
mct-object="navigatedObject"
|
||||||
ng-model="treeModel">
|
ng-model="treeModel">
|
||||||
</mct-representation>
|
</mct-representation>
|
||||||
<a class="mini-tab-icon anchor-right mobile-hide toggle-pane toggle-inspect"
|
<a class="mini-tab-icon anchor-right mobile-hide toggle-pane toggle-inspect"
|
||||||
|
@ -50,7 +50,8 @@ define(
|
|||||||
((domainObject && domainObject.useCapability('view')) || [])
|
((domainObject && domainObject.useCapability('view')) || [])
|
||||||
.forEach(selectViewIfMatching);
|
.forEach(selectViewIfMatching);
|
||||||
}
|
}
|
||||||
$scope.editMode = domainObject.hasCapability('editor') ? true : false;
|
//$scope.editMode = domainObject.hasCapability('editor') ?
|
||||||
|
// true : false;
|
||||||
navigatedObject = domainObject;
|
navigatedObject = domainObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,6 +48,8 @@ define(
|
|||||||
function EditRepresenter($q, $log, scope) {
|
function EditRepresenter($q, $log, scope) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
this.scope = scope;
|
||||||
|
|
||||||
// Mutate and persist a new version of a domain object's model.
|
// Mutate and persist a new version of a domain object's model.
|
||||||
function doPersist(model) {
|
function doPersist(model) {
|
||||||
var domainObject = self.domainObject;
|
var domainObject = self.domainObject;
|
||||||
@ -100,6 +102,8 @@ define(
|
|||||||
this.key = (representation || {}).key;
|
this.key = (representation || {}).key;
|
||||||
// Track the represented object
|
// Track the represented object
|
||||||
this.domainObject = representedObject;
|
this.domainObject = representedObject;
|
||||||
|
this.scope.editMode = representedObject.hasCapability("editor");
|
||||||
|
|
||||||
// Ensure existing watches are released
|
// Ensure existing watches are released
|
||||||
this.destroy();
|
this.destroy();
|
||||||
};
|
};
|
||||||
|
@ -19,8 +19,6 @@
|
|||||||
this source code distribution or the Licensing information page available
|
this source code distribution or the Licensing information page available
|
||||||
at runtime from the About dialog for additional information.
|
at runtime from the About dialog for additional information.
|
||||||
-->
|
-->
|
||||||
<!-- TO-DO: get rid of this ng-init and replace with a live state value -->
|
|
||||||
<div ng-init="editMode = true;"></div>
|
|
||||||
|
|
||||||
<span class="l-inspect" ng-controller="ObjectInspectorController as controller">
|
<span class="l-inspect" ng-controller="ObjectInspectorController as controller">
|
||||||
<div ng-controller="PaneController as modelPaneEdit">
|
<div ng-controller="PaneController as modelPaneEdit">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user