|
@@ -20,15 +20,24 @@ function openLinkDialog () {
|
20
|
20
|
inviteAttributes = "value=\"" + encodeURI(roomUrl) + "\"";
|
21
|
21
|
}
|
22
|
22
|
|
|
23
|
+ let inviteLinkId = "inviteLinkRef";
|
|
24
|
+ let focusInviteLink = function() {
|
|
25
|
+ $('#' + inviteLinkId).focus();
|
|
26
|
+ $('#' + inviteLinkId).select();
|
|
27
|
+ };
|
|
28
|
+
|
23
|
29
|
let title = APP.translation.generateTranslationHTML("dialog.shareLink");
|
24
|
30
|
APP.UI.messageHandler.openTwoButtonDialog(
|
25
|
31
|
null, title, null,
|
26
|
|
- '<input id="inviteLinkRef" type="text" '
|
|
32
|
+ '<input id="' + inviteLinkId + '" type="text" '
|
27
|
33
|
+ inviteAttributes + ' readonly/>',
|
28
|
34
|
false, "dialog.copy",
|
29
|
35
|
function (e, v) {
|
30
|
36
|
if (v && roomUrl) {
|
31
|
37
|
JitsiMeetJS.analytics.sendEvent('toolbar.invite.button');
|
|
38
|
+
|
|
39
|
+ focusInviteLink();
|
|
40
|
+
|
32
|
41
|
document.execCommand('copy');
|
33
|
42
|
}
|
34
|
43
|
else {
|
|
@@ -36,20 +45,21 @@ function openLinkDialog () {
|
36
|
45
|
}
|
37
|
46
|
},
|
38
|
47
|
function (event) {
|
39
|
|
- if (roomUrl) {
|
40
|
|
- $('#inviteLinkRef').focus();
|
41
|
|
- $('#inviteLinkRef').select();
|
42
|
|
- } else {
|
|
48
|
+ if (!roomUrl) {
|
43
|
49
|
if (event && event.target) {
|
44
|
50
|
$(event.target).find('button[value=true]')
|
45
|
51
|
.prop('disabled', true);
|
46
|
52
|
}
|
47
|
53
|
}
|
|
54
|
+ else {
|
|
55
|
+ focusInviteLink();
|
|
56
|
+ }
|
48
|
57
|
},
|
49
|
58
|
function (e, v, m, f) {
|
50
|
59
|
if(!v && !m && !f)
|
51
|
60
|
JitsiMeetJS.analytics.sendEvent('toolbar.invite.close');
|
52
|
|
- }
|
|
61
|
+ },
|
|
62
|
+ 'Copy' // Focus Copy button.
|
53
|
63
|
);
|
54
|
64
|
}
|
55
|
65
|
|