diff options
Diffstat (limited to 'js/panels/css-panel')
-rw-r--r-- | js/panels/css-panel/style-sheet.reel/style-sheet.js | 2 | ||||
-rw-r--r-- | js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/js/panels/css-panel/style-sheet.reel/style-sheet.js b/js/panels/css-panel/style-sheet.reel/style-sheet.js index 8a8e7dbf..3a0060b2 100644 --- a/js/panels/css-panel/style-sheet.reel/style-sheet.js +++ b/js/panels/css-panel/style-sheet.reel/style-sheet.js | |||
@@ -202,7 +202,7 @@ exports.StyleSheet = Montage.create(Component, { | |||
202 | set : function(value) { | 202 | set : function(value) { |
203 | if(value === this._mediaText) { return; } | 203 | if(value === this._mediaText) { return; } |
204 | 204 | ||
205 | this._source.ownerNode.setAttribute('media', value); | 205 | this.application.ninja.stylesController.setMediaAttribute(this._source, value); |
206 | 206 | ||
207 | this._mediaText = value; | 207 | this._mediaText = value; |
208 | 208 | ||
diff --git a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js index e2193ba0..a328cb65 100644 --- a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js +++ b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js | |||
@@ -96,13 +96,16 @@ exports.StyleSheetsView = Montage.create(Component, { | |||
96 | 96 | ||
97 | var sheetComponent, oldDefaultSheet; | 97 | var sheetComponent, oldDefaultSheet; |
98 | 98 | ||
99 | ///// Mark the appropriate component as the default, un-mark the previous default | ||
99 | if(this.styleSheetList) { | 100 | if(this.styleSheetList) { |
100 | sheetComponent = this.styleSheetList.childComponents[this.styleSheets.indexOf(sheet)]; | 101 | sheetComponent = this.styleSheetList.childComponents[this.styleSheets.indexOf(sheet)]; |
101 | if(sheetComponent) { | 102 | if(sheetComponent) { |
102 | sheetComponent['default'] = true; | 103 | sheetComponent['default'] = true; |
103 | if(this._defaultStyleSheet) { | 104 | if(this._defaultStyleSheet) { |
104 | oldDefaultSheet = this.styleSheetList.childComponents[this.styleSheets.indexOf(this._defaultStyleSheet)]; | 105 | oldDefaultSheet = this.styleSheetList.childComponents[this.styleSheets.indexOf(this._defaultStyleSheet)]; |
105 | oldDefaultSheet['default'] = false; | 106 | if(oldDefaultSheet) { |
107 | oldDefaultSheet['default'] = false; | ||
108 | } | ||
106 | } | 109 | } |
107 | } | 110 | } |
108 | } | 111 | } |