From b5a84eb5ccb367dda0b2d4bfb9a5112de95dccc6 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 3 Jun 2014 11:20:17 -0400 Subject: [PATCH] refactor(key) switchKey: rm Util.exec --- lib/client/key.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/client/key.js b/lib/client/key.js index 91661a87..c4eca97e 100644 --- a/lib/client/key.js +++ b/lib/client/key.js @@ -206,7 +206,7 @@ var CloudCmd, Util, DOM; break; case Key.F1: - Util.exec(CloudCmd.Help.show); + CloudCmd.Help.show(); Events.preventDefault(event); break; @@ -216,14 +216,15 @@ var CloudCmd, Util, DOM; case Key.F3: if (shift) - Util.exec(CloudCmd.Markdown.show, path); + CloudCmd.Markdown.show(path); else - Util.exec(CloudCmd.View.show); + CloudCmd.View.show(); + Events.preventDefault(event); break; case Key.F4: - Util.exec(CloudCmd.Edit.show); + CloudCmd.Edit.show(); Events.preventDefault(event); break; @@ -249,13 +250,13 @@ var CloudCmd, Util, DOM; break; case Key.F9: - Util.exec(CloudCmd.Menu); + CloudCmd.Menu.show(); Events.preventDefault(event); break; case Key.F10: - Util.exec(CloudCmd.Config.show); + CloudCmd.Config.show(); Events.preventDefault(event); break; @@ -268,7 +269,7 @@ var CloudCmd, Util, DOM; else obj = CloudCmd.Console; - Util.exec(obj.show); + obj.show(); Events.preventDefault(event); break;