|
|
@ -473,10 +473,12 @@ MessengerUI, Messages) {
|
|
|
|
|
|
|
|
|
|
|
|
toolbar.chatContent = $content;
|
|
|
|
toolbar.chatContent = $content;
|
|
|
|
|
|
|
|
|
|
|
|
var $container = $('<span>', {id: 'cp-toolbar-chat-drawer-open', title: Messages.chatButton});
|
|
|
|
var $container = $('<span>', {id: 'cp-toolbar-chat-drawer-open'});
|
|
|
|
|
|
|
|
|
|
|
|
var $button = $('<button>', {'class': 'fa fa-comments'}).appendTo($container);
|
|
|
|
var $button = $(h('button', [
|
|
|
|
$('<span>',{'class': 'cp-dropdown-button-title'}).appendTo($button);
|
|
|
|
h('i.fa.fa-comments'),
|
|
|
|
|
|
|
|
h('span.cp-button-name', Messages.chatButton)
|
|
|
|
|
|
|
|
])).appendTo($container);
|
|
|
|
|
|
|
|
|
|
|
|
toolbar.$bottomR.prepend($container);
|
|
|
|
toolbar.$bottomR.prepend($container);
|
|
|
|
|
|
|
|
|
|
|
@ -531,13 +533,13 @@ MessengerUI, Messages) {
|
|
|
|
|
|
|
|
|
|
|
|
var createShare = function (toolbar, config) {
|
|
|
|
var createShare = function (toolbar, config) {
|
|
|
|
if (!config.metadataMgr) {
|
|
|
|
if (!config.metadataMgr) {
|
|
|
|
throw new Error("You must provide a `metadataMgr` to display the userlist");
|
|
|
|
throw new Error("You must provide a `metadataMgr` to display the share button");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var $shareBlock = $('<button>', {
|
|
|
|
var $shareBlock = $(h('button.cp-toolar-share-button', [
|
|
|
|
'class': 'fa fa-shhare-alt cp-toolbar-share-button',
|
|
|
|
h('i.fa.fa-shhare-alt'),
|
|
|
|
title: Messages.shareButton
|
|
|
|
h('span.cp-button-name', Messages.shareButton)
|
|
|
|
});
|
|
|
|
]));
|
|
|
|
Common.getSframeChannel().event('EV_SHARE_OPEN', {
|
|
|
|
Common.getSframeChannel().event('EV_SHARE_OPEN', {
|
|
|
|
hidden: true
|
|
|
|
hidden: true
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -550,11 +552,29 @@ MessengerUI, Messages) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
toolbar.$leftside.append($shareBlock);
|
|
|
|
toolbar.$bottomM.append($shareBlock);
|
|
|
|
toolbar.share = $shareBlock;
|
|
|
|
toolbar.share = $shareBlock;
|
|
|
|
|
|
|
|
|
|
|
|
return "Loading share button";
|
|
|
|
return "Loading share button";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
var createAccess = function (toolbar, config) {
|
|
|
|
|
|
|
|
if (!config.metadataMgr) {
|
|
|
|
|
|
|
|
throw new Error("You must provide a `metadataMgr` to display the access button");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var $accessBlock = $(h('button.cp-toolar-access-button', [
|
|
|
|
|
|
|
|
h('i.fa.fa-unlock-alt'),
|
|
|
|
|
|
|
|
h('span.cp-button-name', Messages.accessButton)
|
|
|
|
|
|
|
|
]));
|
|
|
|
|
|
|
|
$accessBlock.click(function () {
|
|
|
|
|
|
|
|
Common.getSframeChannel().event('EV_ACCESS_OPEN');
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
toolbar.$bottomM.append($accessBlock);
|
|
|
|
|
|
|
|
toolbar.access = $accessBlock;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return "Loading access button";
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var createFileShare = function (toolbar, config) {
|
|
|
|
var createFileShare = function (toolbar, config) {
|
|
|
|
if (!config.metadataMgr) {
|
|
|
|
if (!config.metadataMgr) {
|
|
|
@ -578,7 +598,7 @@ MessengerUI, Messages) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
toolbar.$leftside.append($shareBlock);
|
|
|
|
toolbar.$bottomM.append($shareBlock);
|
|
|
|
return $shareBlock;
|
|
|
|
return $shareBlock;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -1240,6 +1260,7 @@ MessengerUI, Messages) {
|
|
|
|
tb['userlist'] = createUserList;
|
|
|
|
tb['userlist'] = createUserList;
|
|
|
|
tb['chat'] = createChat;
|
|
|
|
tb['chat'] = createChat;
|
|
|
|
tb['share'] = createShare;
|
|
|
|
tb['share'] = createShare;
|
|
|
|
|
|
|
|
tb['access'] = createAccess;
|
|
|
|
tb['fileshare'] = createFileShare;
|
|
|
|
tb['fileshare'] = createFileShare;
|
|
|
|
tb['title'] = createTitle;
|
|
|
|
tb['title'] = createTitle;
|
|
|
|
tb['pageTitle'] = createPageTitle;
|
|
|
|
tb['pageTitle'] = createPageTitle;
|
|
|
@ -1254,6 +1275,14 @@ MessengerUI, Messages) {
|
|
|
|
tb['unpinnedWarning'] = createUnpinnedWarning;
|
|
|
|
tb['unpinnedWarning'] = createUnpinnedWarning;
|
|
|
|
tb['notifications'] = createNotifications;
|
|
|
|
tb['notifications'] = createNotifications;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tb['pad'] = function () {
|
|
|
|
|
|
|
|
addElement([
|
|
|
|
|
|
|
|
'chat', 'userlist', 'title', 'useradmin', 'spinner',
|
|
|
|
|
|
|
|
'newpad', 'share', 'access', 'limit', 'unpinnedWarning',
|
|
|
|
|
|
|
|
'notifications'
|
|
|
|
|
|
|
|
], {});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var addElement = toolbar.addElement = function (arr, additionalCfg, init) {
|
|
|
|
var addElement = toolbar.addElement = function (arr, additionalCfg, init) {
|
|
|
|
if (typeof additionalCfg === "object") { $.extend(true, config, additionalCfg); }
|
|
|
|
if (typeof additionalCfg === "object") { $.extend(true, config, additionalCfg); }
|
|
|
|
arr.forEach(function (el) {
|
|
|
|
arr.forEach(function (el) {
|
|
|
|