forked from External/greenlight
notify user when joining without name provided
This commit is contained in:
@ -47,16 +47,20 @@
|
||||
// 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) {
|
||||
if (data.messageKey === 'wait_for_moderator') {
|
||||
waitForModerator(Meeting.getInstance().getURL());
|
||||
} else {
|
||||
$(location).attr("href", data.response.join_url);
|
||||
}
|
||||
});
|
||||
jqxhr.fail(function(xhr, status, error) {
|
||||
console.info("meeting join failed");
|
||||
});
|
||||
if (jqxhr) {
|
||||
jqxhr.done(function(data) {
|
||||
if (data.messageKey === 'wait_for_moderator') {
|
||||
waitForModerator(Meeting.getInstance().getURL());
|
||||
} else {
|
||||
$(location).attr("href", data.response.join_url);
|
||||
}
|
||||
});
|
||||
jqxhr.fail(function(xhr, status, error) {
|
||||
console.info("meeting join failed");
|
||||
});
|
||||
} else {
|
||||
$('.meeting-user-name').parent().addClass('has-error');
|
||||
}
|
||||
|
||||
// if not user name was set it means we must ask for a name
|
||||
} else {
|
||||
@ -68,6 +72,14 @@
|
||||
Turbolinks.visit($('.meeting-url').val());
|
||||
});
|
||||
|
||||
$('.center-panel-wrapper').on ('input', '.meeting-user-name', function (event) {
|
||||
if ($(this).val() === '') {
|
||||
$(this).parent().addClass('has-error')
|
||||
} else {
|
||||
$(this).parent().removeClass('has-error')
|
||||
}
|
||||
});
|
||||
|
||||
$('.center-panel-wrapper').on ('keypress', '.meeting-user-name', function (event) {
|
||||
if (event.keyCode === 13) {
|
||||
event.preventDefault();
|
||||
|
Reference in New Issue
Block a user