Ability to restore an old version from the debug app
This commit is contained in:
parent
2b4c3e9e90
commit
a6589d0d06
@ -439,7 +439,12 @@ define([
|
|||||||
console.log(doc);
|
console.log(doc);
|
||||||
};
|
};
|
||||||
|
|
||||||
config.onLocal = function () { };
|
var toRestore;
|
||||||
|
|
||||||
|
config.onLocal = function () {
|
||||||
|
if (!toRestore) { return; }
|
||||||
|
cpNfInner.chainpad.contentUpdate(toRestore);
|
||||||
|
};
|
||||||
|
|
||||||
config.onInit = function (info) {
|
config.onInit = function (info) {
|
||||||
Title = common.createTitle({});
|
Title = common.createTitle({});
|
||||||
@ -463,6 +468,7 @@ define([
|
|||||||
onRemote: config.onRemote,
|
onRemote: config.onRemote,
|
||||||
setHistory: setHistory,
|
setHistory: setHistory,
|
||||||
applyVal: function (val) {
|
applyVal: function (val) {
|
||||||
|
toRestore = val;
|
||||||
displayDoc(JSON.parse(val) || {});
|
displayDoc(JSON.parse(val) || {});
|
||||||
},
|
},
|
||||||
$toolbar: $bar,
|
$toolbar: $bar,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user