aboutsummaryrefslogtreecommitdiff
path: root/js/panels/css-panel/declaration.reel
diff options
context:
space:
mode:
authorEric Guzman2012-04-23 11:51:02 -0700
committerEric Guzman2012-04-23 11:51:02 -0700
commit0e5520008925f480d5d1bb8356220c773d1c5e37 (patch)
treeb520f21d424f32c39e5633a24219030db97c1b96 /js/panels/css-panel/declaration.reel
parent97f21076db2603a1437f8bade3d9713433d473fe (diff)
downloadninja-0e5520008925f480d5d1bb8356220c773d1c5e37.tar.gz
CSS Panel - Add editing and adding new styles in declaration and style
Diffstat (limited to 'js/panels/css-panel/declaration.reel')
-rw-r--r--js/panels/css-panel/declaration.reel/declaration.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/js/panels/css-panel/declaration.reel/declaration.js b/js/panels/css-panel/declaration.reel/declaration.js
index 0cc98951..55fe0e18 100644
--- a/js/panels/css-panel/declaration.reel/declaration.js
+++ b/js/panels/css-panel/declaration.reel/declaration.js
@@ -9,6 +9,9 @@ var Montage = require("montage/core/core").Montage,
9 ShorthandProps = require("js/panels/CSSPanel/css-shorthand-map"); 9 ShorthandProps = require("js/panels/CSSPanel/css-shorthand-map");
10 10
11exports.Declaration = Montage.create(Component, { 11exports.Declaration = Montage.create(Component, {
12 includeEmptyStyle : {
13 value: true
14 },
12 templateDidLoad : { 15 templateDidLoad : {
13 value: function() { 16 value: function() {
14 console.log("declaration - template did load"); 17 console.log("declaration - template did load");
@@ -31,10 +34,18 @@ exports.Declaration = Montage.create(Component, {
31 }, 34 },
32 set: function(dec) { 35 set: function(dec) {
33 this._declaration = dec; 36 this._declaration = dec;
34 console.log('here'); 37
35 ///// creates data structure to use with tree component 38 ///// creates data structure to use with tree component
36 this.buildStyleTree(); 39 this.buildStyleTree();
37 console.log('there'); 40
41 if(this.includeEmptyStyle) {
42 this.styleTree.properties.push({
43 "name": "property",
44 "value" : "value",
45 "isEmpty": true
46 });
47 }
48//debugger;
38 this.needsDraw = true; 49 this.needsDraw = true;
39 } 50 }
40 }, 51 },