aboutsummaryrefslogtreecommitdiff
path: root/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-07-23 14:56:31 -0700
committerValerio Virgillito2012-07-23 14:56:31 -0700
commitf16744e7a48a89fb7b951ac05e4e1711a07c61ac (patch)
treeac3b4bb6d4e2ce2c04f366b70fe361658bcd59d1 /js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js
parentc25c853fe991d4bdf3cf0b5945c574bbfd5fc597 (diff)
parent74d3af4650e549afe6cd6bf11ba0bcae89fca602 (diff)
downloadninja-f16744e7a48a89fb7b951ac05e4e1711a07c61ac.tar.gz
Merge branch 'minorFixes_7.1' of https://github.com/ericguzman/ninja into v0.7.1
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 : {