Update the tab title to match the pad title in pad2

This commit is contained in:
yflory 2017-08-28 14:49:33 +02:00
parent 51c065d13c
commit f89015d9ed
2 changed files with 2 additions and 0 deletions

View File

@ -64,6 +64,7 @@ define(['jquery'], function ($) {
var md = metadataMgr.getMetadata();
$title.find('span.title').text(md.title || md.defaultTitle);
$title.find('input').val(md.title || md.defaultTitle);
exp.title = md.title;
//exp.updateTitle(md.title || md.defaultTitle);
});

View File

@ -127,6 +127,7 @@ define([
});
sframeChan.on('Q_SET_PAD_TITLE_IN_DRIVE', function (newTitle, cb) {
document.title = newTitle;
Cryptpad.renamePad(newTitle, undefined, function (err) {
if (err) { cb('ERROR'); } else { cb(); }
});