Fixed interface

pull/1075/head
Ilya Daynatovich 8 years ago
parent d84d0b65ca
commit 138ed6a487
  1. 18
      modules/UI/videolayout/RemoteVideo.js

@ -131,22 +131,18 @@ RemoteVideo.prototype._generatePopupContent = function () {
id: 'mutelink_' + this.id,
handler: muteHandler,
icon: 'icon-mic-disabled',
text: {
className: muteClassName,
data: {
i18n: muteTranslationKey
}
}
}, {
id: 'ejectlink_' + this.id,
handler: kickHandler,
icon: 'icon-kick',
text: {
data: {
i18n: 'videothumbnail.kick'
}
}
}
];
menuItems.forEach(el => {
@ -185,7 +181,8 @@ RemoteVideo.prototype._generatePopupMenuItem = function (opts = {}) {
id,
handler,
icon,
text
data,
className
} = opts;
handler = handler || $.noop;
@ -196,6 +193,10 @@ RemoteVideo.prototype._generatePopupMenuItem = function (opts = {}) {
let linkItem = document.createElement('a');
linkItem.className = 'popupmenu__link';
if (className) {
linkItem.className += ` ${className}`;
}
if (icon) {
let indicator = document.createElement('span');
indicator.className = 'popupmenu__icon';
@ -206,11 +207,12 @@ RemoteVideo.prototype._generatePopupMenuItem = function (opts = {}) {
let textContent = document.createElement('span');
textContent.className = 'popupmenu__text';
let dataKeys = Object.keys(text.data);
if (data) {
let dataKeys = Object.keys(data);
dataKeys.forEach(key => {
textContent.dataset[key] = text.data[key];
textContent.dataset[key] = data[key];
});
textContent.className += ` ${text.className}` || '';
}
linkItem.appendChild(textContent);
linkItem.id = id;

Loading…
Cancel
Save