[Tree] Begin using mct-tree for tree representation

This commit is contained in:
Victor Woeltjen 2016-03-11 14:23:08 -08:00
parent cbd9509260
commit d4b15525ca
7 changed files with 14 additions and 23 deletions

View File

@ -49,6 +49,7 @@ define([
"./src/directives/MCTScroll",
"./src/directives/MCTSplitPane",
"./src/directives/MCTSplitter",
"./src/directives/MCTTree",
"text!./res/templates/bottombar.html",
"text!./res/templates/controls/action-button.html",
"text!./res/templates/controls/input-filter.html",
@ -97,6 +98,7 @@ define([
MCTScroll,
MCTSplitPane,
MCTSplitter,
MCTTree,
bottombarTemplate,
actionButtonTemplate,
inputFilterTemplate,
@ -389,6 +391,10 @@ define([
{
"key": "mctSplitter",
"implementation": MCTSplitter
},
{
"key": "mctTree",
"implementation": MCTTree
}
],
"constants": [

View File

@ -19,18 +19,6 @@
this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information.
-->
<ul class="tree">
<li ng-if="!composition">
<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>
<mct-tree mct-object="domainObject">
</mct-tree>

View File

@ -37,9 +37,7 @@ define([
return {
restrict: "E",
link: link,
require: [ "mctTree" ],
scope: { mctObject: "=" },
template: ""
scope: { mctObject: "=" }
};
}

View File

@ -23,7 +23,7 @@
define([
'angular',
'text!../../res/templates/ui/toggle.html'
'text!../../res/templates/tree/toggle.html'
], function (angular, toggleTemplate) {
function ToggleView(state) {
this.expanded = !!state;

View File

@ -23,7 +23,7 @@
define([
'zepto',
'text!../../res/templates/ui/tree-label.html'
'text!../../res/templates/tree/tree-label.html'
], function ($, labelTemplate) {
'use strict';

View File

@ -23,7 +23,7 @@
define([
'angular',
'text!../../res/templates/ui/node.html',
'text!../../res/templates/tree/node.html',
'./ToggleView'
], function (angular, nodeTemplate, ToggleView) {
'use strict';

View File

@ -30,8 +30,7 @@ define([
var $ = angular.element.bind(angular);
function TreeView() {
this.ul = $('<ul>');
this.ul.addClass('tree');
this.ul = $('<ul class="tree"></ul>');
this.nodeViews = [];
}