|
@@ -131,20 +131,16 @@ RemoteVideo.prototype._generatePopupContent = function () {
|
131
|
131
|
id: 'mutelink_' + this.id,
|
132
|
132
|
handler: muteHandler,
|
133
|
133
|
icon: 'icon-mic-disabled',
|
134
|
|
- text: {
|
135
|
|
- className: muteClassName,
|
136
|
|
- data: {
|
137
|
|
- i18n: muteTranslationKey
|
138
|
|
- }
|
|
134
|
+ className: muteClassName,
|
|
135
|
+ data: {
|
|
136
|
+ i18n: muteTranslationKey
|
139
|
137
|
}
|
140
|
138
|
}, {
|
141
|
139
|
id: 'ejectlink_' + this.id,
|
142
|
140
|
handler: kickHandler,
|
143
|
141
|
icon: 'icon-kick',
|
144
|
|
- text: {
|
145
|
|
- data: {
|
146
|
|
- i18n: 'videothumbnail.kick'
|
147
|
|
- }
|
|
142
|
+ data: {
|
|
143
|
+ i18n: 'videothumbnail.kick'
|
148
|
144
|
}
|
149
|
145
|
}
|
150
|
146
|
];
|
|
@@ -185,7 +181,8 @@ RemoteVideo.prototype._generatePopupMenuItem = function (opts = {}) {
|
185
|
181
|
id,
|
186
|
182
|
handler,
|
187
|
183
|
icon,
|
188
|
|
- text
|
|
184
|
+ data,
|
|
185
|
+ className
|
189
|
186
|
} = opts;
|
190
|
187
|
|
191
|
188
|
handler = handler || $.noop;
|
|
@@ -196,6 +193,10 @@ RemoteVideo.prototype._generatePopupMenuItem = function (opts = {}) {
|
196
|
193
|
let linkItem = document.createElement('a');
|
197
|
194
|
linkItem.className = 'popupmenu__link';
|
198
|
195
|
|
|
196
|
+ if (className) {
|
|
197
|
+ linkItem.className += ` ${className}`;
|
|
198
|
+ }
|
|
199
|
+
|
199
|
200
|
if (icon) {
|
200
|
201
|
let indicator = document.createElement('span');
|
201
|
202
|
indicator.className = 'popupmenu__icon';
|
|
@@ -206,11 +207,12 @@ RemoteVideo.prototype._generatePopupMenuItem = function (opts = {}) {
|
206
|
207
|
let textContent = document.createElement('span');
|
207
|
208
|
textContent.className = 'popupmenu__text';
|
208
|
209
|
|
209
|
|
- let dataKeys = Object.keys(text.data);
|
210
|
|
- dataKeys.forEach(key => {
|
211
|
|
- textContent.dataset[key] = text.data[key];
|
212
|
|
- });
|
213
|
|
- textContent.className += ` ${text.className}` || '';
|
|
210
|
+ if (data) {
|
|
211
|
+ let dataKeys = Object.keys(data);
|
|
212
|
+ dataKeys.forEach(key => {
|
|
213
|
+ textContent.dataset[key] = data[key];
|
|
214
|
+ });
|
|
215
|
+ }
|
214
|
216
|
|
215
|
217
|
linkItem.appendChild(textContent);
|
216
|
218
|
linkItem.id = id;
|