forked from External/greenlight
Merge pull request #81 from daronco/issue-78
Don't ask for a name in the landing page, redir to the room/meeting
This commit is contained in:
commit
bc6eb444ce
|
@ -32,7 +32,10 @@
|
||||||
Meeting.clear();
|
Meeting.clear();
|
||||||
var nameInput = $('.meeting-user-name');
|
var nameInput = $('.meeting-user-name');
|
||||||
if (!nameInput.val()) {
|
if (!nameInput.val()) {
|
||||||
nameInput.val(localStorage.getItem('lastJoinedName'));
|
var lastName = localStorage.getItem('lastJoinedName');
|
||||||
|
if (lastName !== 'undefined') {
|
||||||
|
nameInput.val(lastName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// setup event handlers
|
// setup event handlers
|
||||||
|
@ -40,8 +43,10 @@
|
||||||
var name = $('.meeting-user-name').val();
|
var name = $('.meeting-user-name').val();
|
||||||
Meeting.getInstance().setName(name);
|
Meeting.getInstance().setName(name);
|
||||||
Meeting.getInstance().setId($(".page-wrapper").data('id'));
|
Meeting.getInstance().setId($(".page-wrapper").data('id'));
|
||||||
var jqxhr = Meeting.getInstance().getJoinMeetingResponse();
|
|
||||||
|
|
||||||
|
// a user name is set, join the user into the session
|
||||||
|
if (name !== undefined && name !== null) {
|
||||||
|
var jqxhr = Meeting.getInstance().getJoinMeetingResponse();
|
||||||
jqxhr.done(function(data) {
|
jqxhr.done(function(data) {
|
||||||
if (data.messageKey === 'wait_for_moderator') {
|
if (data.messageKey === 'wait_for_moderator') {
|
||||||
waitForModerator(Meeting.getInstance().getURL());
|
waitForModerator(Meeting.getInstance().getURL());
|
||||||
|
@ -52,6 +57,11 @@
|
||||||
jqxhr.fail(function(xhr, status, error) {
|
jqxhr.fail(function(xhr, status, error) {
|
||||||
console.info("meeting join failed");
|
console.info("meeting join failed");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// if not user name was set it means we must ask for a name
|
||||||
|
} else {
|
||||||
|
$(location).attr("href", Meeting.getInstance().getURL());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.center-panel-wrapper').on ('keypress', '.meeting-user-name', function (event) {
|
$('.center-panel-wrapper').on ('keypress', '.meeting-user-name', function (event) {
|
||||||
|
|
|
@ -43,6 +43,11 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Whether the current page is the page of a room/meeting or not
|
||||||
|
def on_room_or_meeting_page?
|
||||||
|
params[:id].present?
|
||||||
|
end
|
||||||
|
|
||||||
def version
|
def version
|
||||||
Greenlight::VERSION
|
Greenlight::VERSION
|
||||||
rescue
|
rescue
|
||||||
|
|
|
@ -16,12 +16,13 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||||
<div class="join-form-wrapper">
|
<div class="join-form-wrapper">
|
||||||
<div class="center-block">
|
<div class="center-block">
|
||||||
<div class="join-form input-group input-spacing">
|
<div class="join-form input-group input-spacing">
|
||||||
|
|
||||||
|
<!-- if the user is signed in, add a hidden input with their name -->
|
||||||
<% if current_user %>
|
<% if current_user %>
|
||||||
<% @current_user = current_user %>
|
<%= text_field_tag 'user[name]', current_user.name, class: 'form-control meeting-user-name', type: 'hidden' %>
|
||||||
<%= text_field :current_user, :name, class: 'form-control meeting-user-name', type: 'hidden' %>
|
|
||||||
<% else %>
|
|
||||||
<%= text_field :nil, :nil, class: 'form-control meeting-user-name', placeholder: t('enter_name') %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<!-- if admin means the user is signed in and owns the room -->
|
||||||
<% if admin? %>
|
<% if admin? %>
|
||||||
<% if @meeting_running %>
|
<% if @meeting_running %>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
|
@ -36,20 +37,34 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<button type="button" class="btn btn-primary center-block meeting-join">
|
<button type="button" class="btn btn-primary center-block meeting-join">
|
||||||
<%= t('start') %>
|
<%= t('start_meeting') %>
|
||||||
</button>
|
</button>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% elsif current_user %>
|
<% else %>
|
||||||
|
|
||||||
|
<!-- on the page of a room/meeting, the user might have to enter a name -->
|
||||||
|
<% if on_room_or_meeting_page? %>
|
||||||
|
<% if current_user %>
|
||||||
<button type="button" class="btn btn-primary center-block meeting-join">
|
<button type="button" class="btn btn-primary center-block meeting-join">
|
||||||
<%= t('join') %>
|
<%= t('join') %>
|
||||||
</button>
|
</button>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
<%= text_field_tag 'user[name]', '', class: 'form-control meeting-user-name', placeholder: t('enter_name') %>
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button type="button" class="btn btn-primary meeting-join">
|
<button type="button" class="btn btn-primary center-block meeting-join">
|
||||||
<%= t('join') %>
|
<%= t('join') %>
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<!-- on the landing page we don't ask for a name, just show the start button -->
|
||||||
|
<% else %>
|
||||||
|
<button type="button" class="btn btn-primary center-block meeting-join">
|
||||||
|
<%= t('start_meeting') %>
|
||||||
|
</button>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -98,6 +98,7 @@ en-US:
|
||||||
return_to_room: Return to your personal room
|
return_to_room: Return to your personal room
|
||||||
session_url_explanation: The meeting will be taking place using the following URL
|
session_url_explanation: The meeting will be taking place using the following URL
|
||||||
start: Start
|
start: Start
|
||||||
|
start_meeting: Start Meeting
|
||||||
your_personal_room: Your Personal Room
|
your_personal_room: Your Personal Room
|
||||||
thumbnails: Thumbnails
|
thumbnails: Thumbnails
|
||||||
unlisted: Unlisted
|
unlisted: Unlisted
|
||||||
|
|
Loading…
Reference in New Issue