View and restore the history of a pad

This commit is contained in:
yflory
2017-04-21 17:31:47 +02:00
parent 43c045721c
commit 92ea03d7d9
9 changed files with 314 additions and 71 deletions

View File

@@ -83,9 +83,7 @@ define([
common.findStronger = Hash.findStronger;
// History
common.getHistory = function (cb) {
return History.create(common, cb);
};
common.getHistory = function (config) { return History.create(common, config); };
var getStore = common.getStore = function () {
if (store) { return store; }
@@ -808,6 +806,18 @@ define([
style: 'font:'+size+' FontAwesome'
});
break;
case 'history':
button = $('<button>', {
title: Messages.historyButton,
'class': "fa fa-history",
style: 'font:'+size+' FontAwesome'
});
if (data.histConfig) {
button.click(function () {
common.getHistory(data.histConfig);
});
};
break;
default:
button = $('<button>', {
'class': "fa fa-question",