refactor(edit) rm unused vars

This commit is contained in:
coderaiser 2014-04-04 06:23:37 -04:00
parent c79e785ae4
commit 0bfd0ad2e6

View file

@ -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();