|
|
|
@ -27,6 +27,7 @@ define([
|
|
|
|
|
TextPatcher: TextPatcher,
|
|
|
|
|
Slide: Slide,
|
|
|
|
|
};
|
|
|
|
|
var APP = window.APP;
|
|
|
|
|
|
|
|
|
|
Cryptpad.styleAlerts();
|
|
|
|
|
|
|
|
|
@ -180,6 +181,11 @@ define([
|
|
|
|
|
|
|
|
|
|
var canonicalize = function (t) { return t.replace(/\r\n/g, '\n'); };
|
|
|
|
|
|
|
|
|
|
var isDefaultTitle = function () {
|
|
|
|
|
var parsed = Cryptpad.parsePadUrl(window.location.href);
|
|
|
|
|
return Cryptpad.isDefaultName(parsed, APP.title);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var initializing = true;
|
|
|
|
|
|
|
|
|
|
var onLocal = config.onLocal = function () {
|
|
|
|
@ -254,10 +260,6 @@ define([
|
|
|
|
|
return text.trim();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var isDefaultTitle = function () {
|
|
|
|
|
var parsed = Cryptpad.parsePadUrl(window.location.href);
|
|
|
|
|
return Cryptpad.isDefaultName(parsed, APP.title);
|
|
|
|
|
};
|
|
|
|
|
var suggestName = function () {
|
|
|
|
|
var parsed = Cryptpad.parsePadUrl(window.location.href);
|
|
|
|
|
var name = Cryptpad.getDefaultName(parsed, []);
|
|
|
|
@ -348,15 +350,16 @@ define([
|
|
|
|
|
var $import = Cryptpad.createButton('import', true, {}, importText);
|
|
|
|
|
$rightside.append($import);
|
|
|
|
|
|
|
|
|
|
/* add a rename button */
|
|
|
|
|
var renameCb = function (err, title) {
|
|
|
|
|
if (err) { return; }
|
|
|
|
|
APP.title = title;
|
|
|
|
|
setTabTitle();
|
|
|
|
|
onLocal();
|
|
|
|
|
};
|
|
|
|
|
var $setTitle = Cryptpad.createButton('rename', true, {suggestName: suggestName}, renameCb);
|
|
|
|
|
$rightside.append($setTitle);
|
|
|
|
|
/* add a rename button */
|
|
|
|
|
var renameCb = function (err, title) {
|
|
|
|
|
if (err) { return; }
|
|
|
|
|
APP.title = title;
|
|
|
|
|
setTabTitle();
|
|
|
|
|
onLocal();
|
|
|
|
|
};
|
|
|
|
|
var $setTitle = Cryptpad.createButton('rename', true, {suggestName: suggestName}, renameCb);
|
|
|
|
|
$rightside.append($setTitle);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* add a forget button */
|
|
|
|
|
var forgetCb = function (err, title) {
|
|
|
|
@ -389,7 +392,7 @@ define([
|
|
|
|
|
}
|
|
|
|
|
$rightside.append($leavePresent);
|
|
|
|
|
|
|
|
|
|
$language = $('<span>', {
|
|
|
|
|
var $language = $('<span>', {
|
|
|
|
|
'style': "margin-right: 10px;"
|
|
|
|
|
}).text(Messages.type.slide + " (Markdown)");
|
|
|
|
|
$rightside.append($language);
|
|
|
|
|