mirror of
https://github.com/nasa/openmct.git
synced 2025-05-13 22:13:18 +00:00
[Tree] Begin using mct-tree for tree representation
This commit is contained in:
parent
cbd9509260
commit
d4b15525ca
@ -49,6 +49,7 @@ define([
|
|||||||
"./src/directives/MCTScroll",
|
"./src/directives/MCTScroll",
|
||||||
"./src/directives/MCTSplitPane",
|
"./src/directives/MCTSplitPane",
|
||||||
"./src/directives/MCTSplitter",
|
"./src/directives/MCTSplitter",
|
||||||
|
"./src/directives/MCTTree",
|
||||||
"text!./res/templates/bottombar.html",
|
"text!./res/templates/bottombar.html",
|
||||||
"text!./res/templates/controls/action-button.html",
|
"text!./res/templates/controls/action-button.html",
|
||||||
"text!./res/templates/controls/input-filter.html",
|
"text!./res/templates/controls/input-filter.html",
|
||||||
@ -97,6 +98,7 @@ define([
|
|||||||
MCTScroll,
|
MCTScroll,
|
||||||
MCTSplitPane,
|
MCTSplitPane,
|
||||||
MCTSplitter,
|
MCTSplitter,
|
||||||
|
MCTTree,
|
||||||
bottombarTemplate,
|
bottombarTemplate,
|
||||||
actionButtonTemplate,
|
actionButtonTemplate,
|
||||||
inputFilterTemplate,
|
inputFilterTemplate,
|
||||||
@ -389,6 +391,10 @@ define([
|
|||||||
{
|
{
|
||||||
"key": "mctSplitter",
|
"key": "mctSplitter",
|
||||||
"implementation": MCTSplitter
|
"implementation": MCTSplitter
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "mctTree",
|
||||||
|
"implementation": MCTTree
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"constants": [
|
"constants": [
|
||||||
|
@ -19,18 +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.
|
||||||
-->
|
-->
|
||||||
<ul class="tree">
|
<mct-tree mct-object="domainObject">
|
||||||
<li ng-if="!composition">
|
</mct-tree>
|
||||||
<span class="tree-item">
|
|
||||||
<span class="icon wait-spinner"></span>
|
|
||||||
<span class="title-label">Loading...</span>
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
<li ng-repeat="child in composition">
|
|
||||||
<mct-representation key="'tree-node'"
|
|
||||||
mct-object="child"
|
|
||||||
parameters="parameters"
|
|
||||||
ng-model="ngModel">
|
|
||||||
</mct-representation>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
@ -37,9 +37,7 @@ define([
|
|||||||
return {
|
return {
|
||||||
restrict: "E",
|
restrict: "E",
|
||||||
link: link,
|
link: link,
|
||||||
require: [ "mctTree" ],
|
scope: { mctObject: "=" }
|
||||||
scope: { mctObject: "=" },
|
|
||||||
template: ""
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'text!../../res/templates/ui/toggle.html'
|
'text!../../res/templates/tree/toggle.html'
|
||||||
], function (angular, toggleTemplate) {
|
], function (angular, toggleTemplate) {
|
||||||
function ToggleView(state) {
|
function ToggleView(state) {
|
||||||
this.expanded = !!state;
|
this.expanded = !!state;
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
define([
|
define([
|
||||||
'zepto',
|
'zepto',
|
||||||
'text!../../res/templates/ui/tree-label.html'
|
'text!../../res/templates/tree/tree-label.html'
|
||||||
], function ($, labelTemplate) {
|
], function ($, labelTemplate) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'text!../../res/templates/ui/node.html',
|
'text!../../res/templates/tree/node.html',
|
||||||
'./ToggleView'
|
'./ToggleView'
|
||||||
], function (angular, nodeTemplate, ToggleView) {
|
], function (angular, nodeTemplate, ToggleView) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -30,8 +30,7 @@ define([
|
|||||||
var $ = angular.element.bind(angular);
|
var $ = angular.element.bind(angular);
|
||||||
|
|
||||||
function TreeView() {
|
function TreeView() {
|
||||||
this.ul = $('<ul>');
|
this.ul = $('<ul class="tree"></ul>');
|
||||||
this.ul.addClass('tree');
|
|
||||||
this.nodeViews = [];
|
this.nodeViews = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user