diff options
Diffstat (limited to 'js/panels/css-panel/declaration.reel')
-rw-r--r-- | js/panels/css-panel/declaration.reel/declaration.html | 5 | ||||
-rw-r--r-- | js/panels/css-panel/declaration.reel/declaration.js | 19 |
2 files changed, 18 insertions, 6 deletions
diff --git a/js/panels/css-panel/declaration.reel/declaration.html b/js/panels/css-panel/declaration.reel/declaration.html index 3a513871..3ff41e0c 100644 --- a/js/panels/css-panel/declaration.reel/declaration.html +++ b/js/panels/css-panel/declaration.reel/declaration.html | |||
@@ -15,7 +15,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
15 | "name" : "Declaration", | 15 | "name" : "Declaration", |
16 | "properties" : { | 16 | "properties" : { |
17 | "element" : {"#" : "container"}, | 17 | "element" : {"#" : "container"}, |
18 | "treeController": {"@": "treeController"} | 18 | "treeController": {"@": "treeController"}, |
19 | "treeView" : {"@": "treeView"} | ||
19 | } | 20 | } |
20 | }, | 21 | }, |
21 | "styleShorthand": { | 22 | "styleShorthand": { |
@@ -23,7 +24,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
23 | "name": "StyleShorthand" | 24 | "name": "StyleShorthand" |
24 | }, | 25 | }, |
25 | "treeController": { | 26 | "treeController": { |
26 | "module": "js/controllers/tree-controller", | 27 | "module": "js/components/controllers/tree-controller", |
27 | "name": "TreeController", | 28 | "name": "TreeController", |
28 | "properties" : { | 29 | "properties" : { |
29 | "branchKey" : "properties", | 30 | "branchKey" : "properties", |
diff --git a/js/panels/css-panel/declaration.reel/declaration.js b/js/panels/css-panel/declaration.reel/declaration.js index 9685510b..873d2ce4 100644 --- a/js/panels/css-panel/declaration.reel/declaration.js +++ b/js/panels/css-panel/declaration.reel/declaration.js | |||
@@ -18,7 +18,10 @@ exports.Declaration = Montage.create(Component, { | |||
18 | templateDidLoad : { | 18 | templateDidLoad : { |
19 | value: function() { | 19 | value: function() { |
20 | console.log("declaration - template did load"); | 20 | console.log("declaration - template did load"); |
21 | this.treeController.delegate = this.focusDelegate || this; | 21 | |
22 | if(this.focusDelegate) { | ||
23 | this.treeController.delegate = this.focusDelegate; | ||
24 | } | ||
22 | } | 25 | } |
23 | }, | 26 | }, |
24 | prepareForDraw : { | 27 | prepareForDraw : { |
@@ -119,9 +122,17 @@ exports.Declaration = Montage.create(Component, { | |||
119 | distinct: true | 122 | distinct: true |
120 | }, | 123 | }, |
121 | 124 | ||
122 | addNewStyle : { | 125 | addNewStyleAfter : { |
123 | value: function() { | 126 | value: function(style) { |
124 | debugger; | 127 | //this.treeController.branchControllers[0].addObjects({ |
128 | foo1 = style.parentComponent.parentComponent; | ||
129 | style.parentComponent.parentComponent.contentController.addObjects({ | ||
130 | name: 'property', | ||
131 | value: 'value', | ||
132 | isEmpty: true, | ||
133 | treeNodeType: 'leaf' | ||
134 | }); | ||
135 | style.parentComponent.parentComponent.needsDraw = true; | ||
125 | } | 136 | } |
126 | }, | 137 | }, |
127 | 138 | ||