aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorEric Guzman2012-04-13 01:44:45 -0700
committerEric Guzman2012-04-13 01:44:45 -0700
commite39cc380ef2c0479f57b35dcadedccb0fb3fd22f (patch)
treef1197de61f1b9de881d3c978463930c25a561844 /js
parent602aaa5168842877286145904eb8242c659988dd (diff)
downloadninja-e39cc380ef2c0479f57b35dcadedccb0fb3fd22f.tar.gz
CSS Style Rule - Show appropriate "sheet name" for inline style
Diffstat (limited to 'js')
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js9
1 files changed, 7 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 a0ff4b4e..dd51565a 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
@@ -23,9 +23,14 @@ exports.CssStyleRule = Montage.create(Component, {
23 }, 23 },
24 set: function(rule) { 24 set: function(rule) {
25 this.cssText = rule.cssText; 25 this.cssText = rule.cssText;
26 this.sheetName = rule.href || 'Style Tag';
27 this.selector = rule.selectorText;
28 26
27 if(rule.type === 'inline') {
28 this.sheetName = 'Inline Style';
29 } else {
30 this.sheetName = rule.href || 'Style Tag';
31 }
32
33 this.selector = rule.selectorText;
29 this.declaration = rule.style; 34 this.declaration = rule.style;
30 35
31 console.log('Rule with selector "' +rule.selectorText+ '" is set on componenet.'); 36 console.log('Rule with selector "' +rule.selectorText+ '" is set on componenet.');