diff options
author | John Mayhew | 2012-07-24 15:46:16 -0700 |
---|---|---|
committer | John Mayhew | 2012-07-24 15:46:16 -0700 |
commit | 9f240b8b9b1f5fb0f145c343ca5e533e25e81374 (patch) | |
tree | 407564eaa6466e8d4cf2eeee0c56dc623243586f /js/mediators/keyboard-mediator.js | |
parent | d25359c75089215ee48838db081fd3d51cbbd85f (diff) | |
parent | 21d74af1e9fc57cc25cea8aa7408beabf79ff2f3 (diff) | |
download | ninja-9f240b8b9b1f5fb0f145c343ca5e533e25e81374.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja
Diffstat (limited to 'js/mediators/keyboard-mediator.js')
-rwxr-xr-x | js/mediators/keyboard-mediator.js | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js index 36bc86fd..a323b9c3 100755 --- a/js/mediators/keyboard-mediator.js +++ b/js/mediators/keyboard-mediator.js | |||
@@ -98,20 +98,6 @@ exports.KeyboardMediator = Montage.create(Component, { | |||
98 | value: function() { | 98 | value: function() { |
99 | document.addEventListener("keydown", this, false); | 99 | document.addEventListener("keydown", this, false); |
100 | document.addEventListener("keyup", this, false); | 100 | document.addEventListener("keyup", this, false); |
101 | |||
102 | this.addPropertyChangeListener("appModel.livePreview", this.handleLivePreview, false); | ||
103 | } | ||
104 | }, | ||
105 | |||
106 | handleLivePreview: { | ||
107 | value: function() { | ||
108 | if(this.appModel.livePreview) { | ||
109 | document.removeEventListener("keydown", this, false); | ||
110 | document.removeEventListener("keyup", this, false); | ||
111 | } else { | ||
112 | document.addEventListener("keydown", this, false); | ||
113 | document.addEventListener("keyup", this, false); | ||
114 | } | ||
115 | } | 101 | } |
116 | }, | 102 | }, |
117 | 103 | ||
@@ -264,7 +250,7 @@ exports.KeyboardMediator = Montage.create(Component, { | |||
264 | 250 | ||
265 | 251 | ||
266 | if((evt.keyCode == Keyboard.ENTER) && (evt.ctrlKey || evt.metaKey)) { | 252 | if((evt.keyCode == Keyboard.ENTER) && (evt.ctrlKey || evt.metaKey)) { |
267 | this.application.ninja.executeChromePreview(); | 253 | this.application.ninja.handleExecutePreview(); |
268 | return; | 254 | return; |
269 | } | 255 | } |
270 | 256 | ||