aboutsummaryrefslogtreecommitdiff
path: root/js/panels/css-panel
diff options
context:
space:
mode:
authorEric Guzman2012-07-20 11:23:39 -0700
committerEric Guzman2012-07-20 11:23:39 -0700
commit8fdf2fc8aefee68aec4c7b5891e0375f704cbf26 (patch)
treed59bc1f1461a19f8a29f7ea7a07726e4875c3967 /js/panels/css-panel
parent36be3f52a0eaf176213f4d46056e684e0a1b7653 (diff)
downloadninja-8fdf2fc8aefee68aec4c7b5891e0375f704cbf26.tar.gz
CSS Panel - Fix updating when media changes, sheets are deleted.
Diffstat (limited to 'js/panels/css-panel')
-rw-r--r--js/panels/css-panel/rule-list.reel/rule-list.js2
-rw-r--r--js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js1
-rw-r--r--js/panels/css-panel/styles-view-container.reel/styles-view-container.js6
3 files changed, 7 insertions, 2 deletions
diff --git a/js/panels/css-panel/rule-list.reel/rule-list.js b/js/panels/css-panel/rule-list.reel/rule-list.js
index ae0c4611..b9dc2b95 100644
--- a/js/panels/css-panel/rule-list.reel/rule-list.js
+++ b/js/panels/css-panel/rule-list.reel/rule-list.js
@@ -106,7 +106,7 @@ exports.RuleList = Montage.create(Component, {
106 // found rule in our component list, or it's the inline rule 106 // found rule in our component list, or it's the inline rule
107 ruleComponent.update(); 107 ruleComponent.update();
108 foundIndices.push(index); 108 foundIndices.push(index);
109 } else if(!ruleComponent.applied) { /// remove rule (unless unapplied) 109 } else if(ruleComponent.applied) { /// remove rule (unless unapplied)
110 this.rulesToRemove.push(ruleComponent); 110 this.rulesToRemove.push(ruleComponent);
111 } 111 }
112 }, this); 112 }, this);
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 a328cb65..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
@@ -144,7 +144,6 @@ exports.StyleSheetsView = Montage.create(Component, {
144 handleDeleteAction : { 144 handleDeleteAction : {
145 value: function(sheetComponent) { 145 value: function(sheetComponent) {
146 this.stylesController.removeStyleSheet(sheetComponent.source); 146 this.stylesController.removeStyleSheet(sheetComponent.source);
147 this.stylesController._clearCache();
148 this._dispatchChange(); 147 this._dispatchChange();
149 } 148 }
150 }, 149 },
diff --git a/js/panels/css-panel/styles-view-container.reel/styles-view-container.js b/js/panels/css-panel/styles-view-container.reel/styles-view-container.js
index bba178f2..94abb4b0 100644
--- a/js/panels/css-panel/styles-view-container.reel/styles-view-container.js
+++ b/js/panels/css-panel/styles-view-container.reel/styles-view-container.js
@@ -141,6 +141,12 @@ exports.StylesViewContainer = Montage.create(Component, {
141 value: function() { 141 value: function() {
142 this.eventManager.addEventListener('styleSheetsReady', this, false); 142 this.eventManager.addEventListener('styleSheetsReady', this, false);
143 this.eventManager.addEventListener('elementChange', this, false); 143 this.eventManager.addEventListener('elementChange', this, false);
144 this.eventManager.addEventListener('mediaChange', this, false);
145 }
146 },
147 handleMediaChange : {
148 value: function(e) {
149 this.ruleListContainer.update();
144 } 150 }
145 }, 151 },
146 handleStyleSheetsReady: { 152 handleStyleSheetsReady: {