aboutsummaryrefslogtreecommitdiff
path: root/js/mediators
diff options
context:
space:
mode:
authorAnanya Sen2012-03-22 14:49:17 -0700
committerAnanya Sen2012-03-22 14:49:17 -0700
commit80ceeffeb3dd3227008714b8b56383f9556ff409 (patch)
treee3c385228659997ee36770d7c5ee6987442aec6b /js/mediators
parent87cf1d7d899bb60581d5e5c6c7ba678620c7148e (diff)
downloadninja-80ceeffeb3dd3227008714b8b56383f9556ff409.tar.gz
KNINJA-1302 : refactored fixed as per request
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/mediators')
-rwxr-xr-xjs/mediators/keyboard-mediator.js31
1 files changed, 0 insertions, 31 deletions
diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js
index 63dcfa88..fc0d0f6a 100755
--- a/js/mediators/keyboard-mediator.js
+++ b/js/mediators/keyboard-mediator.js
@@ -245,37 +245,6 @@ exports.KeyboardMediator = Montage.create(Component, {
245 //menuViewManagerModule.MenuViewManager.closeMenu("mainMenuBar"); 245 //menuViewManagerModule.MenuViewManager.closeMenu("mainMenuBar");
246 return; 246 return;
247 } 247 }
248
249 // check for ENTER key
250 if((evt.keyCode == Keyboard.ENTER) && !(evt.ctrlKey || evt.metaKey)) {
251 //new file
252 if((this.application.ninja.newFileController.newFileOptionsNav !== null)
253 && !this.application.ninja.newFileController.newFileOptionsNav.okButton.hasAttribute("disabled")){
254
255 this.application.ninja.newFileController.newFileOptionsNav.handleOkButtonAction();
256 }
257 //save as
258 if((this.application.ninja.newFileController.saveAsDialog !== null)
259 && !this.application.ninja.newFileController.saveAsDialog.okButton.hasAttribute("disabled")){
260
261 this.application.ninja.newFileController.saveAsDialog.handleOkButtonAction();
262 }
263 return;
264 }
265 //ESC key
266 if(evt.keyCode === Keyboard.ESCAPE){
267 if(this.application.ninja.filePickerController.pickerNavChoices !== null){
268 this.application.ninja.filePickerController.pickerNavChoices.handleCancelButtonAction();
269 }
270 if(this.application.ninja.newFileController.newFileOptionsNav !== null){
271 this.application.ninja.newFileController.newFileOptionsNav.handleCancelButtonAction();
272 }
273 if(this.application.ninja.newFileController.saveAsDialog !== null){
274 this.application.ninja.newFileController.saveAsDialog.handleCancelButtonAction();
275 }
276 return;
277 }
278
279 } 248 }
280 }, 249 },
281 250