Fix the forget pad button

This commit is contained in:
yflory
2017-02-24 15:22:26 +01:00
parent 54b0a86c2e
commit e15a6a347f
8 changed files with 58 additions and 17 deletions

View File

@@ -660,6 +660,11 @@ define([
});
};
var disconnect = function (info) {
//setEditable(false); // TODO
Cryptpad.alert(Messages.common_connectionLost);
};
var create = function (info) {
var realtime = APP.realtime = info.realtime;
var myID = APP.myID = info.myID;
@@ -702,7 +707,7 @@ define([
/* add a forget button */
var forgetCb = function (err, title) {
if (err) { return; }
document.title = title;
disconnect();
};
var $forgetPad = Cryptpad.createButton('forget', true, {}, forgetCb);
$rightside.append($forgetPad);
@@ -733,11 +738,6 @@ define([
});
};
var disconnect = function (info) {
//setEditable(false); // TODO
Cryptpad.alert(Messages.common_connectionLost);
};
// don't initialize until the store is ready.
Cryptpad.ready(function () {
var config = {