diff --git a/lib/Vroom/I18N/en.pm b/lib/Vroom/I18N/en.pm index 0bbbcfb..2ef09df 100644 --- a/lib/Vroom/I18N/en.pm +++ b/lib/Vroom/I18N/en.pm @@ -40,6 +40,9 @@ our %Lexicon = ( "ROOM_NAME" => "Room name", "RANDOM_IF_EMPTY" => "If you let this field empty, a random name will be given to the room", "ROOM_s" => "room %s", + "INVITE_PEOPLE" => "Invite other people", + "TO_INVITE_SHARE_THIS_URL" => "Send this address to anyone and he will be able to join this room", + "YOU_CAN_INVITE_BY_MAIL" => "You can also directly send an invitation by email", "EMAIL_INVITE" => "Email invite", "SEND_INVITE" => "Send an email invitation", "DISPLAY_NAME" => "Display name", diff --git a/lib/Vroom/I18N/fr.pm b/lib/Vroom/I18N/fr.pm index d1b996d..9651529 100644 --- a/lib/Vroom/I18N/fr.pm +++ b/lib/Vroom/I18N/fr.pm @@ -43,6 +43,9 @@ our %Lexicon = ( "ROOM_NAME" => "Nom du salon", "RANDOM_IF_EMPTY" => "Si vous laissez ce champs vide, un nom aléatoire sera donné au salon", "ROOM_s" => "Salon %s", + "INVITE_PEOPLE" => "Invitez des participants", + "TO_INVITE_SHARE_THIS_URL" => "Envoyez cette adresse à d'autres personnes pour qu'elles vous rejoignent", + "YOU_CAN_INVITE_BY_MAIL" => "Vous pouvez aussi envoyer une invitation directement par email", "SEND_INVITE" => "Envoyez une invitation par mail", "EMAIL_INVITE" => "Inviter par email", "DISPLAY_NAME" => "Nom", diff --git a/public/css/vroom.css b/public/css/vroom.css index 70ac519..1cde076 100644 --- a/public/css/vroom.css +++ b/public/css/vroom.css @@ -73,6 +73,9 @@ max-width: 700px; margin: auto; } +#inviteMenu { + min-width: 400px; +} #chatBox { max-height:300px; resize:none; diff --git a/public/js/vroom.js b/public/js/vroom.js index 9439ee3..aee717e 100644 --- a/public/js/vroom.js +++ b/public/js/vroom.js @@ -30,7 +30,8 @@ var locale = { ROOM_LOCKED_BY_s: '', ROOM_UNLOCKED_BY_s: '', CANT_SEND_TO_s: '', - SCREEN_s: '' + SCREEN_s: '', + TO_INVITE_SHARE_THIS_URL: '' }; // Localize the strings we need @@ -46,6 +47,12 @@ $.ajax({ } }); +// Popup with the URL to share +function inviteUrlPopup(){ + window.prompt(locale.TO_INVITE_SHARE_THIS_URL, window.location.href); + return false; +} + function initVroom(room) { var peers = { @@ -442,6 +449,10 @@ function initVroom(room) { } }); + // Do not close the dropdown menu when filling the email recipient + $("#inviteDropdownContainer").on("click", "li", function(e){ + e.stopPropagation(); + }); // Handle Email Invitation $('#inviteEmail').submit(function(event) { event.preventDefault(); diff --git a/templates/default/join.html.ep b/templates/default/join.html.ep index 5f39752..c15f461 100644 --- a/templates/default/join.html.ep +++ b/templates/default/join.html.ep @@ -12,17 +12,40 @@