aboutsummaryrefslogtreecommitdiff
path: root/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js
diff options
context:
space:
mode:
authorJohn Mayhew2012-07-24 15:46:16 -0700
committerJohn Mayhew2012-07-24 15:46:16 -0700
commit9f240b8b9b1f5fb0f145c343ca5e533e25e81374 (patch)
tree407564eaa6466e8d4cf2eeee0c56dc623243586f /js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js
parentd25359c75089215ee48838db081fd3d51cbbd85f (diff)
parent21d74af1e9fc57cc25cea8aa7408beabf79ff2f3 (diff)
downloadninja-9f240b8b9b1f5fb0f145c343ca5e533e25e81374.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja
Diffstat (limited to 'js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js')
-rw-r--r--js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js10
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 : {