diff options
author | Eric Guzman | 2012-05-16 14:13:27 -0700 |
---|---|---|
committer | Eric Guzman | 2012-05-16 14:13:27 -0700 |
commit | 73e98aef1ffa370c196c9c752d58dd4ed5f4faff (patch) | |
tree | 5c38add56eff4486ea5601437b6f0801e8c5996c /js | |
parent | ac76f688b392f3c5959ec8d651ec35fe311c7a53 (diff) | |
download | ninja-73e98aef1ffa370c196c9c752d58dd4ed5f4faff.tar.gz |
CSS Panel - Fix issue with adding new style and activating property field
Diffstat (limited to 'js')
-rw-r--r-- | js/panels/css-panel/styles-view-delegate.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/js/panels/css-panel/styles-view-delegate.js b/js/panels/css-panel/styles-view-delegate.js index 1b21f460..0b09f2a6 100644 --- a/js/panels/css-panel/styles-view-delegate.js +++ b/js/panels/css-panel/styles-view-delegate.js | |||
@@ -78,6 +78,7 @@ exports.StylesViewMediator = Montage.create(Component, { | |||
78 | ///// Enable/Disable Style when checkbox is clicked | 78 | ///// Enable/Disable Style when checkbox is clicked |
79 | handleStyleToggle : { | 79 | handleStyleToggle : { |
80 | value: function(rule, enable, style) { | 80 | value: function(rule, enable, style) { |
81 | debugger; | ||
81 | if(enable) { | 82 | if(enable) { |
82 | this.stylesController.setStyle(rule, style.propertyText, style.browserValue, style.priority); | 83 | this.stylesController.setStyle(rule, style.propertyText, style.browserValue, style.priority); |
83 | } else { | 84 | } else { |
@@ -112,7 +113,7 @@ exports.StylesViewMediator = Montage.create(Component, { | |||
112 | }, | 113 | }, |
113 | handleValueStop: { | 114 | handleValueStop: { |
114 | value: function(e, style) { | 115 | value: function(e, style) { |
115 | var key, nextFocus | 116 | var key, nextFocus; |
116 | console.log("Handle Value Stop"); | 117 | console.log("Handle Value Stop"); |
117 | console.log("Editing new style: ", style.editingNewStyle); | 118 | console.log("Editing new style: ", style.editingNewStyle); |
118 | 119 | ||
@@ -125,11 +126,11 @@ exports.StylesViewMediator = Montage.create(Component, { | |||
125 | if(e._event.detail.shiftKey) { | 126 | if(e._event.detail.shiftKey) { |
126 | style.propertyField.start(); | 127 | style.propertyField.start(); |
127 | } else { | 128 | } else { |
129 | |||
128 | nextFocus = style.getSiblingStyle('next'); | 130 | nextFocus = style.getSiblingStyle('next'); |
129 | if(nextFocus) { | 131 | if(nextFocus) { |
130 | nextFocus.propertyField.start(); | 132 | nextFocus.propertyField.start(); |
131 | } else { | 133 | } else { |
132 | //style.parentComponent.parentComponent.addNewStyleAfter(style); | ||
133 | style.parentComponent.parentComponent.addNewStyle(); | 134 | style.parentComponent.parentComponent.addNewStyle(); |
134 | style.editingNewStyle = false; | 135 | style.editingNewStyle = false; |
135 | setTimeout(function() { | 136 | setTimeout(function() { |
@@ -247,7 +248,11 @@ exports.StylesViewMediator = Montage.create(Component, { | |||
247 | 248 | ||
248 | ///// Add rule directly to the rule list | 249 | ///// Add rule directly to the rule list |
249 | this.ruleListContainer.displayedList.component.addRule(newRule, null, applies, function(ruleComponent) { | 250 | this.ruleListContainer.displayedList.component.addRule(newRule, null, applies, function(ruleComponent) { |
250 | ruleComponent.selectorField.start(); | 251 | var rC = ruleComponent; |
252 | setTimeout(function() { | ||
253 | rC.selectorField.start(); | ||
254 | },50); | ||
255 | |||
251 | }); | 256 | }); |
252 | 257 | ||
253 | } | 258 | } |