aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorEric Guzman2012-05-01 16:24:03 -0700
committerEric Guzman2012-05-01 16:24:03 -0700
commit0f56430673fa2e008f9b1c17fca8627251866935 (patch)
treea67efd9e63fcb88b6cb64c5a0ed65b403c83ec7c /js
parent9617e4d3870c9872dc1837a67a6f927fd2680476 (diff)
downloadninja-0f56430673fa2e008f9b1c17fca8627251866935.tar.gz
CSS Panel - Inline style editing
Diffstat (limited to 'js')
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js1
-rw-r--r--js/panels/css-panel/style.reel/style.js11
2 files changed, 11 insertions, 1 deletions
diff --git a/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js b/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js
index d2c81b93..7b5a736f 100644
--- a/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js
+++ b/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js
@@ -104,6 +104,7 @@ exports.CssStyleRule = Montage.create(Component, {
104 value: function() { 104 value: function() {
105 if(this.rule.type === 'inline') { 105 if(this.rule.type === 'inline') {
106 this.selectorField.readOnly = true; 106 this.selectorField.readOnly = true;
107 this.declarationComponent.type = 'inline';
107 } else { 108 } else {
108 this.selectorField.addEventListener('change', this, false); 109 this.selectorField.addEventListener('change', this, false);
109 } 110 }
diff --git a/js/panels/css-panel/style.reel/style.js b/js/panels/css-panel/style.reel/style.js
index b079bc73..c73da6e5 100644
--- a/js/panels/css-panel/style.reel/style.js
+++ b/js/panels/css-panel/style.reel/style.js
@@ -145,7 +145,16 @@ exports.Style = Montage.create(TreeNode, {
145 145
146 getRule : { 146 getRule : {
147 value: function() { 147 value: function() {
148 return this.treeView.parentComponent.declaration.parentRule; 148 var declarationComponent = this.treeView.parentComponent,
149 rule;
150
151 if(declarationComponent.type === 'inline') {
152 rule = { style : declarationComponent.declaration }
153 } else {
154 rule = this.treeView.parentComponent.declaration.parentRule;
155 }
156
157 return rule;
149 } 158 }
150 }, 159 },
151 160