aboutsummaryrefslogtreecommitdiff
path: root/js/panels/css-panel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/css-panel')
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js23
-rw-r--r--js/panels/css-panel/rule-list.reel/rule-list.js2
2 files changed, 24 insertions, 1 deletions
diff --git a/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js b/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js
index ac714bfa..71fe8470 100644
--- a/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js
+++ b/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js
@@ -115,6 +115,8 @@ exports.CssStyleRule = Montage.create(Component, {
115 }, 115 },
116 prepareForDraw : { 116 prepareForDraw : {
117 value: function() { 117 value: function() {
118 this.selectorField.keyActions = this.keyActions;
119
118 if(this.rule.type === 'inline') { 120 if(this.rule.type === 'inline') {
119 this.selectorField.readOnly = true; 121 this.selectorField.readOnly = true;
120 this.declarationComponent.type = 'inline'; 122 this.declarationComponent.type = 'inline';
@@ -144,5 +146,26 @@ exports.CssStyleRule = Montage.create(Component, {
144 this.element.classList.add(this.unappliedClass); 146 this.element.classList.add(this.unappliedClass);
145 } 147 }
146 } 148 }
149 },
150
151 keyActions : {
152 value : {
153 hint : {
154 accept : [9,13], // accept hint
155 stop : [27], // stop editing
156 next : [40], // cycle to next hint
157 prev : [38], // cycle to prev hint
158 revert : [27], // revert value
159 backsp : [8] // backspace hit
160 },
161 noHint : {
162 stop : [27,9,13],
163 next : [40],
164 prev : [38],
165 revert : [27],
166 backsp : [8]
167 }
168 },
169 distinct: true
147 } 170 }
148}); 171});
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 b7244a2c..2cd5ac5c 100644
--- a/js/panels/css-panel/rule-list.reel/rule-list.js
+++ b/js/panels/css-panel/rule-list.reel/rule-list.js
@@ -61,7 +61,7 @@ exports.RuleList = Montage.create(Component, {
61 // found rule in our component list, or it's the inline rule 61 // found rule in our component list, or it's the inline rule
62 ruleComponent.update(); 62 ruleComponent.update();
63 foundIndices.push(index); 63 foundIndices.push(index);
64 } else { 64 } else if(!rule.applied) { /// remove rule (unless unapplied)
65 this.rulesToRemove.push(ruleComponent); 65 this.rulesToRemove.push(ruleComponent);
66 } 66 }
67 }, this); 67 }, this);