aboutsummaryrefslogtreecommitdiff
path: root/js/panels/css-panel
diff options
context:
space:
mode:
authorEric Guzman2012-07-18 17:11:40 -0700
committerEric Guzman2012-07-18 17:11:40 -0700
commit36be3f52a0eaf176213f4d46056e684e0a1b7653 (patch)
tree64468600712fdad6657727b19b3908ddc4b898a6 /js/panels/css-panel
parent693d9cd24e9eeee084614925c2a4a8e757f0a82f (diff)
downloadninja-36be3f52a0eaf176213f4d46056e684e0a1b7653.tar.gz
Style Sheets - Show dirty marker when editing media attribute
Diffstat (limited to 'js/panels/css-panel')
-rw-r--r--js/panels/css-panel/style-sheet.reel/style-sheet.js2
-rw-r--r--js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js5
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 }