Fix missing pad title in notifications

pull/1/head
yflory 5 years ago
parent d41b314e4d
commit df5090eaef

@ -79,7 +79,8 @@ define([
return { return {
updateTitle: exp.updateTitle, updateTitle: exp.updateTitle,
suggestName: suggestTitle, suggestName: suggestTitle,
defaultName: exp.defaultTitle defaultName: exp.defaultTitle,
getTitle: exp.getTitle
}; };
}; };

@ -534,8 +534,11 @@ MessengerUI, Messages) {
hidden: true hidden: true
}); });
$shareBlock.click(function () { $shareBlock.click(function () {
var title = (config.title && config.title.getTitle && config.title.getTitle())
|| (config.title && config.title.defaultName)
|| "";
Common.getSframeChannel().event('EV_SHARE_OPEN', { Common.getSframeChannel().event('EV_SHARE_OPEN', {
title: Common.getMetadataMgr().getMetadata().title title: title
}); });
}); });
@ -559,7 +562,10 @@ MessengerUI, Messages) {
file: true file: true
}); });
$shareBlock.click(function () { $shareBlock.click(function () {
var title = (config.title && config.title.getTitle && config.title.getTitle())
|| "";
Common.getSframeChannel().event('EV_SHARE_OPEN', { Common.getSframeChannel().event('EV_SHARE_OPEN', {
title: title,
file: true file: true
}); });
}); });
@ -724,7 +730,7 @@ MessengerUI, Messages) {
}; };
var createPageTitle = function (toolbar, config) { var createPageTitle = function (toolbar, config) {
if (config.title || !config.pageTitle) { return; } if (!config.pageTitle) { return; }
var $titleContainer = $('<span>', { var $titleContainer = $('<span>', {
'class': TITLE_CLS 'class': TITLE_CLS
}).appendTo(toolbar.$top); }).appendTo(toolbar.$top);

@ -123,7 +123,10 @@ define([
common.setPadAttribute('fileType', metadata.type); common.setPadAttribute('fileType', metadata.type);
} }
toolbar.addElement(['pageTitle'], {pageTitle: title}); toolbar.addElement(['pageTitle'], {
pageTitle: title,
title: Title.getTitleConfig(),
});
toolbar.$rightside.append(common.createButton('forget', true)); toolbar.$rightside.append(common.createButton('forget', true));
toolbar.$rightside.append(common.createButton('properties', true)); toolbar.$rightside.append(common.createButton('properties', true));
if (common.isLoggedIn()) { if (common.isLoggedIn()) {

Loading…
Cancel
Save