aboutsummaryrefslogtreecommitdiff
path: root/js/components/treeview
diff options
context:
space:
mode:
Diffstat (limited to 'js/components/treeview')
-rw-r--r--js/components/treeview/ninja-branch.reel/ninja-branch.html2
-rw-r--r--js/components/treeview/ninja-branch.reel/ninja-branch.js35
-rw-r--r--js/components/treeview/treeview.reel/treeview.html2
-rw-r--r--js/components/treeview/treeview.reel/treeview.js43
4 files changed, 69 insertions, 13 deletions
diff --git a/js/components/treeview/ninja-branch.reel/ninja-branch.html b/js/components/treeview/ninja-branch.reel/ninja-branch.html
index 60894fbc..8b808488 100644
--- a/js/components/treeview/ninja-branch.reel/ninja-branch.html
+++ b/js/components/treeview/ninja-branch.reel/ninja-branch.html
@@ -105,7 +105,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
105 "properties": { 105 "properties": {
106 "element": { "#": "branchList" }, 106 "element": { "#": "branchList" },
107 "contentController": {"@": "arrayController" }, 107 "contentController": {"@": "arrayController" },
108 "selectionEnabled": true 108 "isSelectionEnabled": true
109 } 109 }
110 }, 110 },
111 111
diff --git a/js/components/treeview/ninja-branch.reel/ninja-branch.js b/js/components/treeview/ninja-branch.reel/ninja-branch.js
index 0d1a1d0e..48271c2d 100644
--- a/js/components/treeview/ninja-branch.reel/ninja-branch.js
+++ b/js/components/treeview/ninja-branch.reel/ninja-branch.js
@@ -8,12 +8,41 @@ var Montage = require("montage").Montage,
8 TreeNode = require("js/components/treeview/tree-node").TreeNode; 8 TreeNode = require("js/components/treeview/tree-node").TreeNode;
9 9
10var Branch = exports.Branch = Montage.create(TreeNode, { 10var Branch = exports.Branch = Montage.create(TreeNode, {
11 hasTemplate:{ 11 label: {
12 value:true 12 value: null,
13 serializable: true
14 },
15
16 branchList: {
17 value: null,
18 serializable: true
19 },
20
21 arrayController: {
22 value: null,
23 serializable: true
13 }, 24 },
25
14 repetition:{ 26 repetition:{
15 value: null 27 value: null,
28 serializable: true
16 }, 29 },
30
31 leafComponent: {
32 value: null,
33 serializable: true
34 },
35
36 branchComponent: {
37 value: null,
38 serializable: true
39 },
40
41 collapser: {
42 value: null,
43 serializable: true
44 },
45
17 prepareForDraw : { 46 prepareForDraw : {
18 value: function() { 47 value: function() {
19 this.collapser.removeAttribute('id'); 48 this.collapser.removeAttribute('id');
diff --git a/js/components/treeview/treeview.reel/treeview.html b/js/components/treeview/treeview.reel/treeview.html
index 1bed0f0b..9ab575c6 100644
--- a/js/components/treeview/treeview.reel/treeview.html
+++ b/js/components/treeview/treeview.reel/treeview.html
@@ -27,7 +27,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
27 "prototype" : "js/components/treeview/leaf.reel" 27 "prototype" : "js/components/treeview/leaf.reel"
28 }, 28 },
29 "scrollview": { 29 "scrollview": {
30 "prototype": "montage/ui/scrollview.reel[Scrollview]", 30 "prototype": "montage/ui/scroller.reel",
31 "properties": { 31 "properties": {
32 "element": {"#": "treeView"}, 32 "element": {"#": "treeView"},
33 "axis": "vertical" 33 "axis": "vertical"
diff --git a/js/components/treeview/treeview.reel/treeview.js b/js/components/treeview/treeview.reel/treeview.js
index 9f78d36d..03e28c93 100644
--- a/js/components/treeview/treeview.reel/treeview.js
+++ b/js/components/treeview/treeview.reel/treeview.js
@@ -13,6 +13,11 @@ exports.Treeview = Montage.create(Component, {
13 data : { value : null }, 13 data : { value : null },
14 rootBranch : { value : null }, 14 rootBranch : { value : null },
15 15
16 activationEvent: {
17 value: null,
18 serializable: true
19 },
20
16 _hasBeenDeserialized: { 21 _hasBeenDeserialized: {
17 value: false, 22 value: false,
18 enumerable: false 23 enumerable: false
@@ -27,6 +32,26 @@ exports.Treeview = Montage.create(Component, {
27 serializable: true 32 serializable: true
28 }, 33 },
29 34
35 defaultBranchComponent: {
36 value: null,
37 serializable: true
38 },
39
40 defaultLeafComponent: {
41 value: null,
42 serializable: true
43 },
44
45 scrollview: {
46 value: null,
47 serializable: true
48 },
49
50 slot: {
51 value: null,
52 serializable: true
53 },
54
30 hasTemplate: { 55 hasTemplate: {
31 value: true 56 value: true
32 }, 57 },
@@ -52,17 +77,18 @@ exports.Treeview = Montage.create(Component, {
52 rootBranch.hideLabel = !this.showRoot; 77 rootBranch.hideLabel = !this.showRoot;
53 rootBranch.treeView = this; 78 rootBranch.treeView = this;
54 79
55 this.slot.content = rootBranch; 80// this.slot.content = rootBranch;
56 rootBranch.sourceObject = this.contentController.root; 81// rootBranch.sourceObject = this.contentController.root;
57 rootBranch.needsDraw = true; 82// rootBranch.needsDraw = true;
58 this.rootBranch = rootBranch; 83// this.rootBranch = rootBranch;
59 84//
60 this.needsDraw = true; 85// this.needsDraw = true;
61 86
62 } 87 }
63 }, 88 },
64 showRoot : { 89 showRoot : {
65 value: null 90 value: null,
91 serializable: true
66 }, 92 },
67 93
68 _contentController: { 94 _contentController: {
@@ -109,7 +135,8 @@ exports.Treeview = Montage.create(Component, {
109 } 135 }
110 } 136 }
111 137
112 } 138 },
139 serializable: true
113 }, 140 },
114 141
115 deserializedFromTemplate: { 142 deserializedFromTemplate: {