mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(edward) rm CloudFunc
This commit is contained in:
parent
c75e8ad6e1
commit
26a3769220
2 changed files with 12 additions and 3 deletions
|
|
@ -103,6 +103,8 @@ var CloudCmd, Util, DOM, CloudFunc, MenuIO, edward;
|
|||
this.create = function(element) {
|
||||
Element = element;
|
||||
|
||||
edward.setPatchMaxSize(CloudFunc.MAX_FILE_SIZE);
|
||||
|
||||
edward.addCommand({
|
||||
name : 'hide',
|
||||
bindKey : { win: 'Esc', mac: 'Esc' },
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
var join, ace, load, Util, DOM, CloudCmd, Diff, io, Zip, Format, CloudFunc, restafary;
|
||||
var join, ace, load, Util, DOM, CloudCmd, Diff, io, Zip, Format, restafary;
|
||||
|
||||
(function(global, join, DOM, exec, loadRemote) {
|
||||
'use strict';
|
||||
|
|
@ -19,6 +19,8 @@ var join, ace, load, Util, DOM, CloudCmd, Diff, io, Zip, Format, CloudFunc, rest
|
|||
Emmet,
|
||||
Config,
|
||||
|
||||
MAX_FILE_SIZE,
|
||||
|
||||
Files = DOM.Files,
|
||||
Storage = DOM.Storage,
|
||||
|
||||
|
|
@ -190,6 +192,12 @@ var join, ace, load, Util, DOM, CloudCmd, Diff, io, Zip, Format, CloudFunc, rest
|
|||
});
|
||||
};
|
||||
|
||||
edward.setPatchMaxSize = function(size) {
|
||||
MAX_FILE_SIZE = size;
|
||||
|
||||
return edward;
|
||||
};
|
||||
|
||||
edward.selectAll = function() {
|
||||
Ace.selectAll();
|
||||
};
|
||||
|
|
@ -253,10 +261,9 @@ var join, ace, load, Util, DOM, CloudCmd, Diff, io, Zip, Format, CloudFunc, rest
|
|||
|
||||
exec.if(!isDiff, function(patch) {
|
||||
var query = '',
|
||||
MAX_SIZE = CloudFunc.MAX_FILE_SIZE,
|
||||
patchLength = patch && patch.length || 0,
|
||||
length = Value.length,
|
||||
isLessMaxLength = length < MAX_SIZE,
|
||||
isLessMaxLength = length < MAX_FILE_SIZE,
|
||||
isLessLength = isLessMaxLength && patchLength < length,
|
||||
isStr = typeof patch === 'string',
|
||||
isPatch = patch && isStr && isLessLength;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue