diff options
author | Jose Antonio Marquez | 2012-07-23 15:54:59 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-07-23 15:54:59 -0700 |
commit | afc7ad4f240fdf7890a79c2d4d7f8eb2e7c30a34 (patch) | |
tree | dfaa3a21f256846f0dca9dfd7a610ab738b738a7 /js/panels/css-panel/style-sheets-view.reel | |
parent | b3869f66ac77b31cbc0bd36ef360c3fa79c8d365 (diff) | |
parent | faa78ac6b0f9944dd406bed3c8170714ca02e3f9 (diff) | |
download | ninja-afc7ad4f240fdf7890a79c2d4d7f8eb2e7c30a34.tar.gz |
Merge branch 'refs/heads/Ninja-Master' into Document
Diffstat (limited to 'js/panels/css-panel/style-sheets-view.reel')
-rw-r--r-- | js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js | 10 |
1 files changed, 6 insertions, 4 deletions
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 cd86261c..fd559b24 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 | } |
@@ -141,7 +144,6 @@ exports.StyleSheetsView = Montage.create(Component, { | |||
141 | handleDeleteAction : { | 144 | handleDeleteAction : { |
142 | value: function(sheetComponent) { | 145 | value: function(sheetComponent) { |
143 | this.stylesController.removeStyleSheet(sheetComponent.source); | 146 | this.stylesController.removeStyleSheet(sheetComponent.source); |
144 | this.stylesController._clearCache(); | ||
145 | this._dispatchChange(); | 147 | this._dispatchChange(); |
146 | } | 148 | } |
147 | }, | 149 | }, |
@@ -176,7 +178,7 @@ exports.StyleSheetsView = Montage.create(Component, { | |||
176 | } | 178 | } |
177 | }, | 179 | }, |
178 | 180 | ||
179 | handleStyleSheetModified : { | 181 | handleStyleSheetDirty : { |
180 | value: function(e) { | 182 | value: function(e) { |
181 | this.needsDraw = true; | 183 | this.needsDraw = true; |
182 | } | 184 | } |
@@ -193,7 +195,7 @@ exports.StyleSheetsView = Montage.create(Component, { | |||
193 | prepareForDraw : { | 195 | prepareForDraw : { |
194 | value: function() { | 196 | value: function() { |
195 | this.eventManager.addEventListener("styleSheetsReady", this, false); | 197 | this.eventManager.addEventListener("styleSheetsReady", this, false); |
196 | this.eventManager.addEventListener("styleSheetModified", this, false); | 198 | this.eventManager.addEventListener("styleSheetDirty", this, false); |
197 | } | 199 | } |
198 | }, | 200 | }, |
199 | draw : { | 201 | draw : { |