aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
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