Merge branch 'master' into staging
This commit is contained in:
@@ -439,7 +439,12 @@ define([
|
|||||||
console.log(doc);
|
console.log(doc);
|
||||||
};
|
};
|
||||||
|
|
||||||
config.onLocal = function () { };
|
var toRestore;
|
||||||
|
|
||||||
|
config.onLocal = function (a, restore) {
|
||||||
|
if (!toRestore || !restore) { return; }
|
||||||
|
cpNfInner.chainpad.contentUpdate(toRestore);
|
||||||
|
};
|
||||||
|
|
||||||
config.onInit = function (info) {
|
config.onInit = function (info) {
|
||||||
Title = common.createTitle({});
|
Title = common.createTitle({});
|
||||||
@@ -459,10 +464,13 @@ define([
|
|||||||
|
|
||||||
/* add a history button */
|
/* add a history button */
|
||||||
var histConfig = {
|
var histConfig = {
|
||||||
onLocal: config.onLocal,
|
onLocal: function () {
|
||||||
|
config.onLocal(null, true);
|
||||||
|
},
|
||||||
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,
|
||||||
|
|||||||
Reference in New Issue
Block a user