Fix broken elements in the new toolbar
This commit is contained in:
@@ -22,9 +22,11 @@ define(['/customize/languageSelector.js',
|
|||||||
messages = $.extend(true, {}, Default, map[language]);
|
messages = $.extend(true, {}, Default, map[language]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// messages_languages return the available translations and their name in an object :
|
||||||
|
// { "en": "English", "fr": "French", ... }
|
||||||
messages._languages = {
|
messages._languages = {
|
||||||
'en': Default._languageName
|
'en': Default._languageName
|
||||||
}
|
};
|
||||||
for (var l in map) {
|
for (var l in map) {
|
||||||
messages._languages[l] = map[l]._languageName || l;
|
messages._languages[l] = map[l]._languageName || l;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,11 +152,14 @@
|
|||||||
a.cryptpad-logo {
|
a.cryptpad-logo {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
height: 3em;
|
height: 3em;
|
||||||
border: 1px solid #aaa;
|
|
||||||
border-radius: @border-radius;
|
|
||||||
padding: 0px 5px;
|
padding: 0px 5px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
|
&:hover {
|
||||||
|
span {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
}
|
||||||
img {
|
img {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
height: 3em;
|
height: 3em;
|
||||||
|
|||||||
@@ -154,12 +154,13 @@
|
|||||||
.cryptpad-toolbar-top .cryptpad-link a.cryptpad-logo {
|
.cryptpad-toolbar-top .cryptpad-link a.cryptpad-logo {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
height: 3em;
|
height: 3em;
|
||||||
border: 1px solid #aaa;
|
|
||||||
border-radius: 1px;
|
|
||||||
padding: 0px 5px;
|
padding: 0px 5px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
.cryptpad-toolbar-top .cryptpad-link a.cryptpad-logo:hover span {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
.cryptpad-toolbar-top .cryptpad-link a.cryptpad-logo img {
|
.cryptpad-toolbar-top .cryptpad-link a.cryptpad-logo img {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
height: 3em;
|
height: 3em;
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ define(function () {
|
|||||||
out.renameButtonTitle = 'Changer le titre utilisé par ce document dans la page d\'accueil de Cryptpad';
|
out.renameButtonTitle = 'Changer le titre utilisé par ce document dans la page d\'accueil de Cryptpad';
|
||||||
out.renamePrompt = 'Quel titre souhaitez-vous utiliser pour ce document ?';
|
out.renamePrompt = 'Quel titre souhaitez-vous utiliser pour ce document ?';
|
||||||
out.renameConflict = 'Un autre document existe déjà avec le même titre';
|
out.renameConflict = 'Un autre document existe déjà avec le même titre';
|
||||||
|
out.clickToEdit = 'Cliquer pour modifier';
|
||||||
|
|
||||||
out.forgetButton = 'OUBLIER';
|
out.forgetButton = 'OUBLIER';
|
||||||
out.forgetButtonTitle = 'Enlever ce document de la liste en page d\'accueil';
|
out.forgetButtonTitle = 'Enlever ce document de la liste en page d\'accueil';
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ define(function () {
|
|||||||
out.renameButtonTitle = 'Change the title under which this document is listed on your home page';
|
out.renameButtonTitle = 'Change the title under which this document is listed on your home page';
|
||||||
out.renamePrompt = 'How would you like to title this pad?';
|
out.renamePrompt = 'How would you like to title this pad?';
|
||||||
out.renameConflict = 'Another pad already has that title';
|
out.renameConflict = 'Another pad already has that title';
|
||||||
|
out.clickToEdit = "Click to edit";
|
||||||
|
|
||||||
out.forgetButton = 'FORGET';
|
out.forgetButton = 'FORGET';
|
||||||
out.forgetButtonTitle = 'Remove this document from your home page listings';
|
out.forgetButtonTitle = 'Remove this document from your home page listings';
|
||||||
@@ -81,8 +82,8 @@ define(function () {
|
|||||||
out.readonlyUrl = 'Read only document';
|
out.readonlyUrl = 'Read only document';
|
||||||
out.copyReadOnly = "Copy URL to clipboard";
|
out.copyReadOnly = "Copy URL to clipboard";
|
||||||
out.openReadOnly = "Open in a new tab";
|
out.openReadOnly = "Open in a new tab";
|
||||||
out.editing = "editing";
|
out.editing = "editor(s)";
|
||||||
out.viewing = "viewing";
|
out.viewing = "viewer(s)";
|
||||||
out.editShare = "Share";
|
out.editShare = "Share";
|
||||||
out.editShareTitle = "Copy the edit URL to clipboard";
|
out.editShareTitle = "Copy the edit URL to clipboard";
|
||||||
out.viewShare = "Share view URL";
|
out.viewShare = "Share view URL";
|
||||||
|
|||||||
136
www/code/main.js
136
www/code/main.js
@@ -164,30 +164,30 @@ define([
|
|||||||
|
|
||||||
var initializing = true;
|
var initializing = true;
|
||||||
|
|
||||||
|
var stringifyInner = function (textValue) {
|
||||||
|
var obj = {
|
||||||
|
content: textValue,
|
||||||
|
metadata: {
|
||||||
|
users: userList,
|
||||||
|
defaultTitle: defaultName
|
||||||
|
}
|
||||||
|
};
|
||||||
|
obj.metadata.title = document.title;
|
||||||
|
// set mode too...
|
||||||
|
obj.highlightMode = module.highlightMode;
|
||||||
|
|
||||||
|
// stringify the json and send it into chainpad
|
||||||
|
return stringify(obj);
|
||||||
|
};
|
||||||
|
|
||||||
var onLocal = config.onLocal = function () {
|
var onLocal = config.onLocal = function () {
|
||||||
if (initializing) { return; }
|
if (initializing) { return; }
|
||||||
if (readOnly) { return; }
|
if (readOnly) { return; }
|
||||||
|
|
||||||
editor.save();
|
editor.save();
|
||||||
|
|
||||||
var textValue = canonicalize($textarea.val());
|
var textValue = canonicalize($textarea.val());
|
||||||
var obj = {content: textValue};
|
var shjson = stringifyInner(textValue);
|
||||||
|
|
||||||
// append the userlist to the hyperjson structure
|
|
||||||
obj.metadata = {
|
|
||||||
users: userList
|
|
||||||
};
|
|
||||||
if (!isDefaultTitle()) {
|
|
||||||
obj.metadata.title = document.title;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
obj.metadata.title = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
// set mode too...
|
|
||||||
obj.highlightMode = module.highlightMode;
|
|
||||||
|
|
||||||
// stringify the json and send it into chainpad
|
|
||||||
var shjson = stringify(obj);
|
|
||||||
|
|
||||||
module.patchText(shjson);
|
module.patchText(shjson);
|
||||||
|
|
||||||
@@ -262,8 +262,8 @@ define([
|
|||||||
};
|
};
|
||||||
|
|
||||||
var suggestName = function () {
|
var suggestName = function () {
|
||||||
if (Cryptpad.isDefaultName(parsedHash, document.title)) {
|
if (document.title === defaultName) {
|
||||||
return getHeadingText() || defaultName;
|
return getHeadingText() || "";
|
||||||
} else {
|
} else {
|
||||||
return document.title || getHeadingText() || defaultName;
|
return document.title || getHeadingText() || defaultName;
|
||||||
}
|
}
|
||||||
@@ -317,7 +317,48 @@ define([
|
|||||||
onLocal();
|
onLocal();
|
||||||
};
|
};
|
||||||
|
|
||||||
var onInit = config.onInit = function (info) {
|
var updateTitle = function (newTitle) {
|
||||||
|
if (newTitle === document.title) { return; }
|
||||||
|
// Change the title now, and set it back to the old value if there is an error
|
||||||
|
var oldTitle = document.title;
|
||||||
|
document.title = newTitle;
|
||||||
|
Cryptpad.renamePad(newTitle, function (err, data) {
|
||||||
|
if (err) {
|
||||||
|
console.log("Couldn't set pad title");
|
||||||
|
console.error(err);
|
||||||
|
document.title = oldTitle;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
document.title = data;
|
||||||
|
$bar.find('.' + Toolbar.constants.title).find('span').text(data);
|
||||||
|
$bar.find('.' + Toolbar.constants.title).find('input').val(data);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var updateDefaultTitle = function (defaultTitle) {
|
||||||
|
defaultName = defaultTitle;
|
||||||
|
$bar.find('.' + Toolbar.constants.title).find('input').attr("placeholder", defaultName);
|
||||||
|
};
|
||||||
|
|
||||||
|
var updateMetadata = function(shjson) {
|
||||||
|
// Extract the user list (metadata) from the hyperjson
|
||||||
|
var json = (shjson === "") ? "" : JSON.parse(shjson);
|
||||||
|
if (json && json.metadata) {
|
||||||
|
if (json.metadata.users) {
|
||||||
|
var userData = json.metadata.users;
|
||||||
|
// Update the local user data
|
||||||
|
addToUserList(userData);
|
||||||
|
}
|
||||||
|
if (json.metadata.defaultTitle) {
|
||||||
|
updateDefaultTitle(json.metadata.defaultTitle);
|
||||||
|
}
|
||||||
|
if (typeof json.metadata.title !== "undefined") {
|
||||||
|
updateTitle(json.metadata.title);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var onInit = config.onInit = function (info) {
|
||||||
toolbarList = info.userList;
|
toolbarList = info.userList;
|
||||||
var config = {
|
var config = {
|
||||||
userData: userList,
|
userData: userList,
|
||||||
@@ -325,7 +366,8 @@ define([
|
|||||||
ifrw: ifrw,
|
ifrw: ifrw,
|
||||||
title: {
|
title: {
|
||||||
onRename: renameCb,
|
onRename: renameCb,
|
||||||
defaultName: defaultName
|
defaultName: defaultName,
|
||||||
|
suggestName: suggestName
|
||||||
},
|
},
|
||||||
common: Cryptpad
|
common: Cryptpad
|
||||||
};
|
};
|
||||||
@@ -466,39 +508,6 @@ define([
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var updateTitle = function (newTitle) {
|
|
||||||
if (newTitle === document.title) { return; }
|
|
||||||
// Change the title now, and set it back to the old value if there is an error
|
|
||||||
var oldTitle = document.title;
|
|
||||||
document.title = newTitle;
|
|
||||||
Cryptpad.renamePad(newTitle, function (err, data) {
|
|
||||||
if (err) {
|
|
||||||
console.log("Couldn't set pad title");
|
|
||||||
console.error(err);
|
|
||||||
document.title = oldTitle;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
document.title = data;
|
|
||||||
$bar.find('.' + Toolbar.constants.title).find('span').text(data);
|
|
||||||
$bar.find('.' + Toolbar.constants.title).find('input').val(data);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
var updateMetadata = function(shjson) {
|
|
||||||
// Extract the user list (metadata) from the hyperjson
|
|
||||||
var json = (shjson === "") ? "" : JSON.parse(shjson);
|
|
||||||
if (json && json.metadata) {
|
|
||||||
if (json.metadata.users) {
|
|
||||||
var userData = json.metadata.users;
|
|
||||||
// Update the local user data
|
|
||||||
addToUserList(userData);
|
|
||||||
}
|
|
||||||
if (typeof json.metadata.title !== "undefined") {
|
|
||||||
updateTitle(json.metadata.title);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var unnotify = module.unnotify = function () {
|
var unnotify = module.unnotify = function () {
|
||||||
if (module.tabNotification &&
|
if (module.tabNotification &&
|
||||||
typeof(module.tabNotification.cancel) === 'function') {
|
typeof(module.tabNotification.cancel) === 'function') {
|
||||||
@@ -645,21 +654,8 @@ define([
|
|||||||
editor.scrollTo(scroll.left, scroll.top);
|
editor.scrollTo(scroll.left, scroll.top);
|
||||||
|
|
||||||
if (!readOnly) {
|
if (!readOnly) {
|
||||||
var localDoc = canonicalize($textarea.val());
|
var textValue = canonicalize($textarea.val());
|
||||||
var hjson2 = {
|
var shjson2 = stringifyInner(textValue);
|
||||||
content: localDoc,
|
|
||||||
metadata: {
|
|
||||||
users: userList
|
|
||||||
},
|
|
||||||
highlightMode: highlightMode,
|
|
||||||
};
|
|
||||||
if (!isDefaultTitle()) {
|
|
||||||
hjson2.metadata.title = document.title;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
hjson2.metadata.title = "";
|
|
||||||
}
|
|
||||||
var shjson2 = stringify(hjson2);
|
|
||||||
if (shjson2 !== shjson) {
|
if (shjson2 !== shjson) {
|
||||||
console.error("shjson2 !== shjson");
|
console.error("shjson2 !== shjson");
|
||||||
TextPatcher.log(shjson, TextPatcher.diff(shjson, shjson2));
|
TextPatcher.log(shjson, TextPatcher.diff(shjson, shjson2));
|
||||||
|
|||||||
@@ -313,14 +313,23 @@ define([
|
|||||||
alt: "Cryptpad",
|
alt: "Cryptpad",
|
||||||
'class': "cryptofist"
|
'class': "cryptofist"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// We need to override the "a" tag action here because it is inside the iframe!
|
||||||
var $aTagSmall = $('<a>', {
|
var $aTagSmall = $('<a>', {
|
||||||
href: "/",
|
href: "/",
|
||||||
title: Messages.header_logoTitle,
|
title: Messages.header_logoTitle,
|
||||||
'class': "cryptpad-logo"
|
'class': "cryptpad-logo"
|
||||||
}).append($imgTag);
|
}).append($imgTag);
|
||||||
$span = $('<span>').text('CryptPad');
|
var $span = $('<span>').text('CryptPad');
|
||||||
var $aTagBig = $aTagSmall.clone().addClass('big').append($span);
|
var $aTagBig = $aTagSmall.clone().addClass('big').append($span);
|
||||||
$aTagSmall.addClass('small');
|
$aTagSmall.addClass('small');
|
||||||
|
var onClick = function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
window.location = "/";
|
||||||
|
};
|
||||||
|
|
||||||
|
$aTagBig.click(onClick);
|
||||||
|
$aTagSmall.click(onClick);
|
||||||
|
|
||||||
$linkContainer.append($aTagSmall).append($aTagBig);
|
$linkContainer.append($aTagSmall).append($aTagBig);
|
||||||
};
|
};
|
||||||
@@ -360,13 +369,14 @@ define([
|
|||||||
config = config || {};
|
config = config || {};
|
||||||
var callback = config.onRename;
|
var callback = config.onRename;
|
||||||
var placeholder = config.defaultName;
|
var placeholder = config.defaultName;
|
||||||
|
var suggestName = config.suggestName;
|
||||||
|
|
||||||
var $titleContainer = $('<span>', {
|
var $titleContainer = $('<span>', {
|
||||||
id: 'toolbarTitle',
|
id: 'toolbarTitle',
|
||||||
'class': TITLE_CLS
|
'class': TITLE_CLS
|
||||||
}).appendTo($container);
|
}).appendTo($container);
|
||||||
var $text = $('<span>', {
|
var $text = $('<span>', {
|
||||||
title: "CLick to edit" //TODO translate
|
title: Messages.clickToEdit
|
||||||
}).appendTo($titleContainer);
|
}).appendTo($titleContainer);
|
||||||
if (readOnly === 1 || typeof(Cryptpad) === "undefined") { return; }
|
if (readOnly === 1 || typeof(Cryptpad) === "undefined") { return; }
|
||||||
var $input = $('<input>', {
|
var $input = $('<input>', {
|
||||||
@@ -383,7 +393,10 @@ define([
|
|||||||
$input.on('keyup', function (e) {
|
$input.on('keyup', function (e) {
|
||||||
if (e.which === 13) {
|
if (e.which === 13) {
|
||||||
var name = $input.val().trim();
|
var name = $input.val().trim();
|
||||||
Cryptpad.renamePad($input.val(), function (err, newtitle) {
|
if (name === "") {
|
||||||
|
name = $input.attr('placeholder');
|
||||||
|
}
|
||||||
|
Cryptpad.renamePad(name, function (err, newtitle) {
|
||||||
if (err) { return; }
|
if (err) { return; }
|
||||||
$text.text(newtitle);
|
$text.text(newtitle);
|
||||||
callback(null, newtitle);
|
callback(null, newtitle);
|
||||||
@@ -398,7 +411,8 @@ define([
|
|||||||
});
|
});
|
||||||
$text.on('click', function () {
|
$text.on('click', function () {
|
||||||
$text.hide();
|
$text.hide();
|
||||||
$input.val($text.text());
|
var inputVal = suggestName() || "";
|
||||||
|
$input.val(inputVal);
|
||||||
$input.show();
|
$input.show();
|
||||||
$input.focus();
|
$input.focus();
|
||||||
});
|
});
|
||||||
@@ -444,6 +458,7 @@ define([
|
|||||||
if (config.ifrw.$('iframe').length) {
|
if (config.ifrw.$('iframe').length) {
|
||||||
var innerIfrw = config.ifrw.$('iframe').each(function (i, el) {
|
var innerIfrw = config.ifrw.$('iframe').each(function (i, el) {
|
||||||
$(el.contentWindow).on('click', removeDropdowns);
|
$(el.contentWindow).on('click', removeDropdowns);
|
||||||
|
$(el.contentWindow).on('click', cancelEditTitle);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -321,8 +321,8 @@ define([
|
|||||||
};
|
};
|
||||||
|
|
||||||
var suggestName = function () {
|
var suggestName = function () {
|
||||||
if (Cryptpad.isDefaultName(parsedHash, document.title)) {
|
if (document.title === defaultName) {
|
||||||
return getHeadingText() || defaultName;
|
return getHeadingText() || "";
|
||||||
} else {
|
} else {
|
||||||
return document.title || getHeadingText() || defaultName;
|
return document.title || getHeadingText() || defaultName;
|
||||||
}
|
}
|
||||||
@@ -346,13 +346,10 @@ define([
|
|||||||
hjson[3] = {
|
hjson[3] = {
|
||||||
metadata: {
|
metadata: {
|
||||||
users: userList,
|
users: userList,
|
||||||
|
defaultTitle: defaultName
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (!isDefaultTitle()) {
|
hjson[3].metadata.title = document.title;
|
||||||
hjson[3].metadata.title = document.title;
|
|
||||||
} else {
|
|
||||||
hjson[3].metadata.title = "";
|
|
||||||
}
|
|
||||||
return stringify(hjson);
|
return stringify(hjson);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -411,6 +408,11 @@ define([
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var updateDefaultTitle = function (defaultTitle) {
|
||||||
|
defaultName = defaultTitle;
|
||||||
|
$bar.find('.' + Toolbar.constants.title).find('input').attr("placeholder", defaultName);
|
||||||
|
};
|
||||||
|
|
||||||
var updateMetadata = function(shjson) {
|
var updateMetadata = function(shjson) {
|
||||||
// Extract the user list (metadata) from the hyperjson
|
// Extract the user list (metadata) from the hyperjson
|
||||||
var hjson = JSON.parse(shjson);
|
var hjson = JSON.parse(shjson);
|
||||||
@@ -421,6 +423,9 @@ define([
|
|||||||
// Update the local user data
|
// Update the local user data
|
||||||
addToUserList(userData);
|
addToUserList(userData);
|
||||||
}
|
}
|
||||||
|
if (peerMetadata.metadata.defaultTitle) {
|
||||||
|
updateDefaultTitle(peerMetadata.metadata.defaultTitle);
|
||||||
|
}
|
||||||
if (typeof peerMetadata.metadata.title !== "undefined") {
|
if (typeof peerMetadata.metadata.title !== "undefined") {
|
||||||
updateTitle(peerMetadata.metadata.title);
|
updateTitle(peerMetadata.metadata.title);
|
||||||
}
|
}
|
||||||
@@ -532,7 +537,8 @@ define([
|
|||||||
ifrw: ifrw,
|
ifrw: ifrw,
|
||||||
title: {
|
title: {
|
||||||
onRename: renameCb,
|
onRename: renameCb,
|
||||||
defaultName: defaultName
|
defaultName: defaultName,
|
||||||
|
suggestName: suggestName
|
||||||
},
|
},
|
||||||
common: Cryptpad
|
common: Cryptpad
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -208,15 +208,11 @@ define([
|
|||||||
var obj = {
|
var obj = {
|
||||||
content: textValue,
|
content: textValue,
|
||||||
metadata: {
|
metadata: {
|
||||||
users: userList
|
users: userList,
|
||||||
|
defaultTitle: defaultName
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (!isDefaultTitle()) {
|
obj.metadata.title = APP.title;
|
||||||
obj.metadata.title = APP.title;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
obj.metadata.title = "";
|
|
||||||
}
|
|
||||||
if (textColor) {
|
if (textColor) {
|
||||||
obj.metadata.color = textColor;
|
obj.metadata.color = textColor;
|
||||||
}
|
}
|
||||||
@@ -292,8 +288,8 @@ define([
|
|||||||
};
|
};
|
||||||
|
|
||||||
var suggestName = function () {
|
var suggestName = function () {
|
||||||
if (Cryptpad.isDefaultName(parsedHash, APP.title)) {
|
if (APP.title === defaultName) {
|
||||||
return getHeadingText() || defaultName;
|
return getHeadingText() || "";
|
||||||
} else {
|
} else {
|
||||||
return APP.title || getHeadingText() || defaultName;
|
return APP.title || getHeadingText() || defaultName;
|
||||||
}
|
}
|
||||||
@@ -376,6 +372,11 @@ define([
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var updateDefaultTitle = function (defaultTitle) {
|
||||||
|
defaultName = defaultTitle;
|
||||||
|
$bar.find('.' + Toolbar.constants.title).find('input').attr("placeholder", defaultName);
|
||||||
|
};
|
||||||
|
|
||||||
var updateMetadata = function(shjson) {
|
var updateMetadata = function(shjson) {
|
||||||
// Extract the user list (metadata) from the hyperjson
|
// Extract the user list (metadata) from the hyperjson
|
||||||
var json = (shjson === "") ? "" : JSON.parse(shjson);
|
var json = (shjson === "") ? "" : JSON.parse(shjson);
|
||||||
@@ -385,6 +386,9 @@ define([
|
|||||||
// Update the local user data
|
// Update the local user data
|
||||||
addToUserList(userData);
|
addToUserList(userData);
|
||||||
}
|
}
|
||||||
|
if (json.metadata.defaultTitle) {
|
||||||
|
updateDefaultTitle(json.metadata.defaultTitle);
|
||||||
|
}
|
||||||
if (typeof json.metadata.title !== "undefined") {
|
if (typeof json.metadata.title !== "undefined") {
|
||||||
updateTitle(json.metadata.title);
|
updateTitle(json.metadata.title);
|
||||||
}
|
}
|
||||||
@@ -407,7 +411,8 @@ define([
|
|||||||
ifrw: ifrw,
|
ifrw: ifrw,
|
||||||
title: {
|
title: {
|
||||||
onRename: renameCb,
|
onRename: renameCb,
|
||||||
defaultName: defaultName
|
defaultName: defaultName,
|
||||||
|
suggestName: suggestName
|
||||||
},
|
},
|
||||||
common: Cryptpad
|
common: Cryptpad
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user