aboutsummaryrefslogtreecommitdiff
path: root/js/panels/css-panel/rule-components
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/css-panel/rule-components')
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js16
1 files changed, 14 insertions, 2 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 ac22878e..d2c81b93 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
@@ -86,6 +86,15 @@ exports.CssStyleRule = Montage.create(Component, {
86 } 86 }
87 }, 87 },
88 88
89 update: {
90 value: function() {
91 if(this.cssText !== this.rule.cssText) {
92 // TODO: add update for selector and stylesheet name
93 this.declarationComponent.update();
94 }
95 }
96 },
97
89 templateDidLoad : { 98 templateDidLoad : {
90 value: function() { 99 value: function() {
91 //console.log("css style rule : template did load"); 100 //console.log("css style rule : template did load");
@@ -93,8 +102,11 @@ exports.CssStyleRule = Montage.create(Component, {
93 }, 102 },
94 prepareForDraw : { 103 prepareForDraw : {
95 value: function() { 104 value: function() {
96 this.selectorField.addEventListener('change', this, false); 105 if(this.rule.type === 'inline') {
97 106 this.selectorField.readOnly = true;
107 } else {
108 this.selectorField.addEventListener('change', this, false);
109 }
98 //console.log("css style rule : prepare for draw"); 110 //console.log("css style rule : prepare for draw");
99 111
100 } 112 }