refactor(edward) Diff -> daffy

This commit is contained in:
coderaiser 2015-01-23 08:05:58 -05:00
parent 71b6ba02a1
commit 302b7fa13e

View file

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