|
|
@ -5,10 +5,11 @@ define([
|
|
|
|
'/common/common-ui-elements.js',
|
|
|
|
'/common/common-ui-elements.js',
|
|
|
|
'/common/common-interface.js',
|
|
|
|
'/common/common-interface.js',
|
|
|
|
'/common/common-hash.js',
|
|
|
|
'/common/common-hash.js',
|
|
|
|
|
|
|
|
'/common/common-util.js',
|
|
|
|
'/common/common-feedback.js',
|
|
|
|
'/common/common-feedback.js',
|
|
|
|
'/contacts/messenger-ui.js',
|
|
|
|
'/contacts/messenger-ui.js',
|
|
|
|
'/customize/messages.js',
|
|
|
|
'/customize/messages.js',
|
|
|
|
], function ($, Config, ApiConfig, UIElements, UI, Hash, Feedback,
|
|
|
|
], function ($, Config, ApiConfig, UIElements, UI, Hash, Util, Feedback,
|
|
|
|
MessengerUI, Messages) {
|
|
|
|
MessengerUI, Messages) {
|
|
|
|
var Common;
|
|
|
|
var Common;
|
|
|
|
|
|
|
|
|
|
|
@ -161,6 +162,7 @@ MessengerUI, Messages) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
var showColors = false;
|
|
|
|
var updateUserList = function (toolbar, config) {
|
|
|
|
var updateUserList = function (toolbar, config) {
|
|
|
|
// Make sure the elements are displayed
|
|
|
|
// Make sure the elements are displayed
|
|
|
|
var $userButtons = toolbar.userlist;
|
|
|
|
var $userButtons = toolbar.userlist;
|
|
|
@ -231,7 +233,7 @@ MessengerUI, Messages) {
|
|
|
|
editUsersNames.forEach(function (data) {
|
|
|
|
editUsersNames.forEach(function (data) {
|
|
|
|
var name = data.name || Messages.anonymous;
|
|
|
|
var name = data.name || Messages.anonymous;
|
|
|
|
var $span = $('<span>', {'class': 'cp-avatar'});
|
|
|
|
var $span = $('<span>', {'class': 'cp-avatar'});
|
|
|
|
if (data.color) {
|
|
|
|
if (data.color && showColors) {
|
|
|
|
$span.css('border-color', data.color);
|
|
|
|
$span.css('border-color', data.color);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var $rightCol = $('<span>', {'class': 'cp-toolbar-userlist-rightcol'});
|
|
|
|
var $rightCol = $('<span>', {'class': 'cp-toolbar-userlist-rightcol'});
|
|
|
@ -1169,6 +1171,16 @@ MessengerUI, Messages) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Show user colors in the userlist only if the app is compatible and if the user
|
|
|
|
|
|
|
|
// wants to see the cursors
|
|
|
|
|
|
|
|
toolbar.showColors = function () {
|
|
|
|
|
|
|
|
if (!config.metadataMgr) { return; }
|
|
|
|
|
|
|
|
var privateData = config.metadataMgr.getPrivateData();
|
|
|
|
|
|
|
|
var show = Util.find(privateData, ['settings', 'general', 'cursor', 'show']);
|
|
|
|
|
|
|
|
if (show === false) { return; }
|
|
|
|
|
|
|
|
showColors = true;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// On log out, remove permanently the realtime elements of the toolbar
|
|
|
|
// On log out, remove permanently the realtime elements of the toolbar
|
|
|
|
Common.onLogout(function () {
|
|
|
|
Common.onLogout(function () {
|
|
|
|
failed();
|
|
|
|
failed();
|
|
|
|