move meeting refresh to the url input field

This commit is contained in:
Zachary Chai 2016-11-24 13:57:06 -05:00
parent ded0f9b056
commit 08ecae0ef6
4 changed files with 17 additions and 23 deletions

View File

@ -131,8 +131,7 @@
}
};
var initMeetings = function() {
var initIndex = function() {
$('.generate-link').click (function (e) {
e.preventDefault();
var newId = Math.trunc(Math.random() * 1000000000);
@ -140,11 +139,11 @@
$('.meeting-url').val(Meeting.buildMeetingURL());
});
if (meetingId = $(".page-wrapper.meetings").data('id')) {
$('.meeting-url').val(Meeting.getInstance().getURL());
} else {
$('.generate-link').click();
}
};
var initMeetings = function() {
$('.meeting-url').val(Meeting.getInstance().getURL());
};
var initRooms = function() {
@ -158,7 +157,7 @@
if ($("body[data-controller=landing]").get(0)) {
init();
if ($("body[data-action=index]").get(0)) {
initMeetings();
initIndex();
} else if ($("body[data-action=meetings]").get(0)) {
initMeetings();
} else if ($("body[data-action=rooms]").get(0)) {

View File

@ -1,20 +1,7 @@
<% content_for :title do %>
<div class="title">
<%= t('hi_all') %>
<h2><%= t('create_session') %></h2>
</div>
<small>
<%= t('session_url_explanation') %>
</small>
<% end %>
<% if !@meeting_id %>
<% content_for :footer do %>
<div class="panel-footer">
<div class="text-center">
<%= t('refresh_html') %>
</div>
</div>
<% end %>
<% end %>
<div class="page-wrapper meetings">

View File

@ -2,6 +2,13 @@
<div class="input-group">
<input type="text" class="form-control meeting-url"/>
<span class="input-group-btn">
<% if params[:action] == 'index' %>
<button type="button" class="btn btn-default generate-link has-tooltip"
title="<%= t('url_refresh_hint') %>"
>
<i class="fa fa-refresh" aria-hidden="true"></i>
</button>
<% end %>
<button type="button" class="btn btn-default meeting-url-copy has-tooltip"
title="<%= t('url_copy_explanation') %>"
data-copied-hint="<%= t('copied') %>"

View File

@ -35,6 +35,7 @@ en-US:
unpublish_recording: Hide recording
copied: Copied
copy_error: Use Ctrl-c to copy
create_session: Create a session
create_your_session: Create your own session
date_recorded: Date
duration: Duration
@ -55,13 +56,13 @@ en-US:
past_recordings: Past Recordings
powered_bigbluebutton: Powered by BigBlueButton
presentation: Presentation
refresh_html: <a href="#" class="generate-link">Click refresh</a> to generate a new meeting URL
return_to_room: Return to your personal room
session_url_explanation: The session will be taking place using the following URL
start: Start
start_new_session: Start a new session
thumbnails: Thumbnails
url_copy_explanation: Copy this URL to invite others to the meeting
url_refresh_hint: Generate a new meeting URL
video: Video
views: Views
wait_for_mod_msg: Looks like you're the first one here...