forked from External/greenlight
		
	Add a button with a "mailto:" link to send invitations
This commit is contained in:
		| @@ -100,6 +100,14 @@ | |||||||
|         .tooltip('fixTitle'); |         .tooltip('fixTitle'); | ||||||
|     }); |     }); | ||||||
|  |  | ||||||
|  |     $('.center-panel-wrapper').on ('click', '.meeting-invite', function (event) { | ||||||
|  |       var meetingURL = Meeting.getInstance().getURL(); | ||||||
|  |       var subject = $(this).data("invite-subject"); | ||||||
|  |       var body = $(this).data("invite-body").replace("&&URL&&", meetingURL); | ||||||
|  |       var mailto = "mailto:?subject=" + encodeURIComponent(subject) + "&body=" + encodeURIComponent(body); | ||||||
|  |       window.open(mailto); | ||||||
|  |     }); | ||||||
|  |  | ||||||
|     $('.center-panel-wrapper').on('mouseleave', '.meeting-url-copy', function (event, msg) { |     $('.center-panel-wrapper').on('mouseleave', '.meeting-url-copy', function (event, msg) { | ||||||
|       $(this).blur(); |       $(this).blur(); | ||||||
|     }); |     }); | ||||||
| @@ -120,7 +128,7 @@ | |||||||
|       selector: '.has-tooltip', |       selector: '.has-tooltip', | ||||||
|       container: 'body' |       container: 'body' | ||||||
|     }; |     }; | ||||||
|     $(document).tooltip(options) |     $(document).tooltip(options); | ||||||
|     var options = { |     var options = { | ||||||
|       selector: '.bottom-tooltip', |       selector: '.bottom-tooltip', | ||||||
|       container: 'body', |       container: 'body', | ||||||
| @@ -151,7 +159,7 @@ | |||||||
|     var joinedMeetings = localStorage.getItem('joinedMeetings'); |     var joinedMeetings = localStorage.getItem('joinedMeetings'); | ||||||
|     if (joinedMeetings && joinedMeetings.length > 0) { |     if (joinedMeetings && joinedMeetings.length > 0) { | ||||||
|       joinedMeetings = joinedMeetings.split(','); |       joinedMeetings = joinedMeetings.split(','); | ||||||
|       $('.center-panel-wrapper .panel-footer').removeClass('hidden') |       $('.center-panel-wrapper .panel-footer').removeClass('hidden'); | ||||||
|  |  | ||||||
|       for (var i = joinedMeetings.length - 1; i >= 0; i--) { |       for (var i = joinedMeetings.length - 1; i >= 0; i--) { | ||||||
|         $('ul.previously-joined').append('<li><a href="/meetings/'+joinedMeetings[i]+'">'+joinedMeetings[i]+'</a></li>'); |         $('ul.previously-joined').append('<li><a href="/meetings/'+joinedMeetings[i]+'">'+joinedMeetings[i]+'</a></li>'); | ||||||
|   | |||||||
| @@ -17,6 +17,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. | |||||||
|   <div class="input-group"> |   <div class="input-group"> | ||||||
|     <input type="text" class="form-control meeting-url"/> |     <input type="text" class="form-control meeting-url"/> | ||||||
|     <span class="input-group-btn"> |     <span class="input-group-btn"> | ||||||
|  |  | ||||||
|       <% if params[:action] == 'index' %> |       <% if params[:action] == 'index' %> | ||||||
|         <button type="button" class="btn btn-default generate-link has-tooltip" |         <button type="button" class="btn btn-default generate-link has-tooltip" | ||||||
|           title="<%= t('url_refresh_hint') %>" |           title="<%= t('url_refresh_hint') %>" | ||||||
| @@ -24,6 +25,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. | |||||||
|           <i class="fa fa-refresh" aria-hidden="true"></i> |           <i class="fa fa-refresh" aria-hidden="true"></i> | ||||||
|         </button> |         </button> | ||||||
|       <% end %> |       <% end %> | ||||||
|  |  | ||||||
|       <button type="button" class="btn btn-default meeting-url-copy has-tooltip" |       <button type="button" class="btn btn-default meeting-url-copy has-tooltip" | ||||||
|         title="<%= t('url_copy_explanation') %>" |         title="<%= t('url_copy_explanation') %>" | ||||||
|         data-copied-hint="<%= t('copied') %>" |         data-copied-hint="<%= t('copied') %>" | ||||||
| @@ -32,6 +34,22 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. | |||||||
|       > |       > | ||||||
|         <i class="fa fa-paperclip" aria-hidden="true"></i> |         <i class="fa fa-paperclip" aria-hidden="true"></i> | ||||||
|       </button> |       </button> | ||||||
|  |  | ||||||
|  |       <% if current_user %> | ||||||
|  |         <% body = t('meeting_invite.signed_in.body', user: current_user.name) %> | ||||||
|  |         <% subject = t('meeting_invite.signed_in.subject', user: current_user.name) %> | ||||||
|  |       <% else %> | ||||||
|  |         <% body = t('meeting_invite.not_signed_in.body') %> | ||||||
|  |         <% subject = t('meeting_invite.not_signed_in.subject') %> | ||||||
|  |       <% end %> | ||||||
|  |       <button type="button" class="btn btn-default meeting-invite has-tooltip" | ||||||
|  |         title="<%= t('meeting_invite.explanation') %>" | ||||||
|  |         data-invite-body="<%= body %>" | ||||||
|  |         data-invite-subject="<%= subject %>" | ||||||
|  |       > | ||||||
|  |         <i class="fa fa-envelope-o" aria-hidden="true"></i> | ||||||
|  |       </button> | ||||||
|  |  | ||||||
|     </span> |     </span> | ||||||
|   </div> |   </div> | ||||||
| </div> | </div> | ||||||
|   | |||||||
| @@ -67,6 +67,14 @@ en-US: | |||||||
|   join_session_user: Join %{name} session |   join_session_user: Join %{name} session | ||||||
|   login: login |   login: login | ||||||
|   logout: logout |   logout: logout | ||||||
|  |   meeting_invite: | ||||||
|  |     explanation: Send an email with an invitation to this meeting | ||||||
|  |     not_signed_in: | ||||||
|  |       body: "You have been invited to a meeting.\n\nPlease open the following page in your web browser: &&URL&&" | ||||||
|  |       subject: "Invitation to a meeting" | ||||||
|  |     signed_in: | ||||||
|  |       body: "You have been invited by %{user} to a meeting.\n\nPlease open the following page in your web browser: &&URL&&" | ||||||
|  |       subject: "%{user} invited you to a meeting" | ||||||
|   my_room: my room |   my_room: my room | ||||||
|   no: No |   no: No | ||||||
|   oauth_signup: Signup for customized sessions |   oauth_signup: Signup for customized sessions | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user