|
5 | 5 | // them and/or modify them under the terms of the MIT License; see
|
6 | 6 | // the LICENSE file for more details.
|
7 | 7 |
|
| 8 | +/* eslint-disable func-name-matching */ |
| 9 | +/* eslint-disable import/unambiguous */ |
| 10 | + |
8 | 11 | (function() {
|
9 | 12 | const $t = $T.domain('ravem');
|
10 | 13 | const ravemButton = (function makeRavemButton() {
|
11 | 14 | const states = {
|
12 | 15 | connected: {
|
13 | 16 | icon: 'x',
|
14 |
| - tooltip: $t.gettext('Disconnect {0} from the videoconference room {1}'), |
| 17 | + tooltip: $t.gettext('Disconnect {0} from the videoconference room {3}'), |
15 | 18 | action: 'disconnect',
|
16 | 19 | handler: function disconnectHandler(data, btn) {
|
17 | 20 | const name = btn.data('roomName');
|
|
192 | 195 | /**
|
193 | 196 | * Sets a new state for the button and update its icon, label and tool tip.
|
194 | 197 | */
|
195 |
| - function setButtonState(btn, newState, tooltipMessage) { |
| 198 | + function setButtonState(btn, newState, tooltipMessage = '', currentVCRoom = '') { |
196 | 199 | btn.data('state', newState);
|
197 | 200 |
|
198 | 201 | const name = btn.data('roomName');
|
|
203 | 206 |
|
204 | 207 | tooltipMessage = tooltipMessage ? `${tooltipMessage}<br>` : '';
|
205 | 208 | const qtip = {
|
206 |
| - content: states[newState].tooltip.format(name, vcRoomName, tooltipMessage), |
| 209 | + content: states[newState].tooltip.format(name, vcRoomName, tooltipMessage, currentVCRoom), |
207 | 210 | position: {my: 'top center', at: 'bottom center'},
|
208 | 211 | show: 'mouseover',
|
209 | 212 | hide: {
|
|
316 | 319 | return;
|
317 | 320 | }
|
318 | 321 | const connected = data.connected;
|
319 |
| - setButtonState(btn, connected ? 'connected' : 'disconnected'); |
| 322 | + setButtonState(btn, connected ? 'connected' : 'disconnected', '', data.vc_room_id); |
320 | 323 | });
|
321 | 324 | return btn;
|
322 | 325 | }
|
|
0 commit comments