From 0bfd0ad2e677d9fb8e3b3fea9137549c80d8376b Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 4 Apr 2014 06:23:37 -0400 Subject: [PATCH] refactor(edit) rm unused vars --- lib/client/edit.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/client/edit.js b/lib/client/edit.js index 63aa206b..8b157663 100644 --- a/lib/client/edit.js +++ b/lib/client/edit.js @@ -4,7 +4,7 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch, Zip; CloudCmd.Edit = EditProto; - function EditProto(CallBack) { + function EditProto() { var Name = 'Edit', Loading = false, DIR = CloudCmd.LIBDIRCLIENT + 'edit/', @@ -37,7 +37,11 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch, Zip; isStr = Util.isString(value), name = Info.name, isDir = Info.isDir, - lExt = Info.ext; + focus = function() { + Ace.focus(); + Ace.clearSelection(); + Ace.moveCursorTo(0, 0); + }; if (!Loading) { Images.showLoad(); @@ -125,12 +129,6 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch, Zip; Ace.gotoLine(number); }; - function focus() { - Ace.focus(); - Ace.clearSelection(); - Ace.moveCursorTo(0, 0); - } - function initAce() { Ace = ace.edit(Element); Session = Ace.getSession(); @@ -344,7 +342,7 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch, Zip; this.showMessage = function(text) { var parent, - TWO_SECONDS = 2000; + HIDE_TIME = 2000; if (!Msg) { DOM.cssSet({ @@ -372,7 +370,7 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch, Zip; Msg.innerHTML = text; DOM.show(Msg); - setTimeout(Util.retExec(DOM.hide, Msg), 2000); + setTimeout(Util.retExec(DOM.hide, Msg), HIDE_TIME); }; init();