diff options
author | Eric Guzman | 2012-03-02 10:55:51 -0800 |
---|---|---|
committer | Eric Guzman | 2012-03-02 10:55:51 -0800 |
commit | 1433f2bdf2e5b8c5c18fed5e9c17fd983ab3606d (patch) | |
tree | 885ed3352f89e124bca7261d7c0edd4c95d3fff5 /js/controllers | |
parent | 53bdb1e7773069c4cca59e88d6da91cd0f58c94a (diff) | |
download | ninja-1433f2bdf2e5b8c5c18fed5e9c17fd983ab3606d.tar.gz |
CSS Panel - Updating components, created toolbar components, and small changes to styles controller
Diffstat (limited to 'js/controllers')
-rwxr-xr-x | js/controllers/styles-controller.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js index 33084169..d36c8cb9 100755 --- a/js/controllers/styles-controller.js +++ b/js/controllers/styles-controller.js | |||
@@ -190,6 +190,7 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
190 | ///// attach specificity to rule object | 190 | ///// attach specificity to rule object |
191 | ///// if rule is css keyframes, return rule and don't attach specificity | 191 | ///// if rule is css keyframes, return rule and don't attach specificity |
192 | if (rule instanceof WebKitCSSKeyframesRule) { | 192 | if (rule instanceof WebKitCSSKeyframesRule) { |
193 | |||
193 | return rule; | 194 | return rule; |
194 | } | 195 | } |
195 | rule[this.CONST.SPECIFICITY_KEY] = this.getSpecificity(rule.selectorText); | 196 | rule[this.CONST.SPECIFICITY_KEY] = this.getSpecificity(rule.selectorText); |
@@ -1184,6 +1185,8 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
1184 | 1185 | ||
1185 | this.styleSheetModified(sheet); | 1186 | this.styleSheetModified(sheet); |
1186 | 1187 | ||
1188 | NJevent('newStyleSheet', sheet); | ||
1189 | |||
1187 | return sheet; | 1190 | return sheet; |
1188 | } | 1191 | } |
1189 | }, | 1192 | }, |
@@ -1243,11 +1246,16 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
1243 | 1246 | ||
1244 | clearDirtyStyleSheets : { | 1247 | clearDirtyStyleSheets : { |
1245 | value: function(doc) { | 1248 | value: function(doc) { |
1246 | if(!doc) { | 1249 | this.dirtyStyleSheets.length = 0; |
1250 | |||
1251 | if(doc) { | ||
1247 | this.dirtyStyleSheets = null; | 1252 | this.dirtyStyleSheets = null; |
1248 | this.dirtyStyleSheets = []; | 1253 | this.dirtyStyleSheets = this.dirtyStyleSheets.filter(function(sheet) { |
1254 | return sheet.document !== doc; | ||
1255 | }); | ||
1249 | } | 1256 | } |
1250 | 1257 | ||
1258 | |||
1251 | } | 1259 | } |
1252 | }, | 1260 | }, |
1253 | 1261 | ||