aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/styles-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers/styles-controller.js')
-rwxr-xr-xjs/controllers/styles-controller.js23
1 files changed, 22 insertions, 1 deletions
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js
index f6977a00..c5076771 100755
--- a/js/controllers/styles-controller.js
+++ b/js/controllers/styles-controller.js
@@ -821,7 +821,7 @@ var stylesController = exports.StylesController = Montage.create(Component, {
821 ///// method to apply/test the new value 821 ///// method to apply/test the new value
822 dec.setProperty(property, value, priority); 822 dec.setProperty(property, value, priority);
823 823
824 if(rule.parentStyleSheet) { 824 if(rule.type !== 'inline' && rule.parentStyleSheet) {
825 this.styleSheetModified(rule.parentStyleSheet); 825 this.styleSheetModified(rule.parentStyleSheet);
826 } 826 }
827 827
@@ -1289,6 +1289,27 @@ var stylesController = exports.StylesController = Montage.create(Component, {
1289 return sheet; 1289 return sheet;
1290 } 1290 }
1291 }, 1291 },
1292
1293 ///// Remove Style sheet
1294 ///// Removes style sheet from document
1295
1296 removeStyleSheet : {
1297 value: function(sheet) {
1298 var sheetEl = sheet.ownerNode;
1299
1300 if(sheetEl) {
1301 sheetEl.disabled = true;
1302 this.userStyleSheets.splice(this.userStyleSheets.indexOf(sheet), 1);
1303
1304 ///// Mark for removal for i/o
1305 sheetEl.setAttribute('data-ninja-remove', 'true');
1306
1307 NJevent('removeStyleSheet', sheet);
1308 }
1309
1310
1311 }
1312 },
1292 1313
1293 ///// Gets the stylesheet object associated with passed-in 1314 ///// Gets the stylesheet object associated with passed-in
1294 ///// element or element id, with option context (document) 1315 ///// element or element id, with option context (document)