mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-21 02:29:23 +00:00
refactor(edit) rm unused vars
This commit is contained in:
parent
c79e785ae4
commit
0bfd0ad2e6
1 changed files with 8 additions and 10 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue