mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 01:47:35 +00:00
refactor(edward) Diff -> daffy
This commit is contained in:
parent
71b6ba02a1
commit
302b7fa13e
1 changed files with 4 additions and 9 deletions
|
|
@ -1,4 +1,4 @@
|
|||
var join, ace, load, Util, DOM, Diff, io, Format, restafary;
|
||||
var join, ace, load, Util, DOM, io, daffy, Format, restafary;
|
||||
|
||||
(function(global, join, DOM, exec, loadRemote) {
|
||||
'use strict';
|
||||
|
|
@ -357,7 +357,7 @@ var join, ace, load, Util, DOM, Diff, io, Format, restafary;
|
|||
alert(error);
|
||||
} else {
|
||||
exec.if(!isAllowed, function() {
|
||||
patch = Diff.createPatch(Value, newValue);
|
||||
patch = daffy.createPatch(Value, newValue);
|
||||
exec(callback, patch);
|
||||
}, function(func) {
|
||||
DOM.getDataFromStorage(FileName, function(error, data) {
|
||||
|
|
@ -379,12 +379,7 @@ var join, ace, load, Util, DOM, Diff, io, Format, restafary;
|
|||
return DIR + name;
|
||||
}));
|
||||
|
||||
DOM.load.js(url, function(error) {
|
||||
if (!error && !Diff)
|
||||
Diff = window.daffy;
|
||||
|
||||
callback(error);
|
||||
});
|
||||
DOM.load.js(url, callback);
|
||||
}
|
||||
|
||||
function zip(value, callback) {
|
||||
|
|
@ -494,7 +489,7 @@ var join, ace, load, Util, DOM, Diff, io, Format, restafary;
|
|||
if (hash === hashLocal) {
|
||||
cursor = edward.getCursor(),
|
||||
value = edward.getValue();
|
||||
value = Diff.applyPatch(value, data);
|
||||
value = daffy.applyPatch(value, data);
|
||||
|
||||
edward.setValue(value);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue