forked from External/greenlight
Merge pull request #38 from zach-chai/usability
focus input on load and enter key submits join
This commit is contained in:
commit
459740cb36
|
@ -15,6 +15,7 @@
|
|||
var init = function() {
|
||||
Meeting.clear();
|
||||
|
||||
// setup click handlers
|
||||
$('.center-panel-wrapper').on ('click', '.meeting-join', function (event) {
|
||||
var name = $('.meeting-user-name').val();
|
||||
Meeting.getInstance().setName(name);
|
||||
|
@ -32,6 +33,13 @@
|
|||
});
|
||||
});
|
||||
|
||||
$('.center-panel-wrapper').on ('keypress', '.meeting-user-name', function (event) {
|
||||
if (event.keyCode === 13) {
|
||||
event.preventDefault();
|
||||
$('.meeting-join').click();
|
||||
}
|
||||
});
|
||||
|
||||
$('.center-panel-wrapper').on ('click', '.meeting-end', function (event) {
|
||||
var jqxhr = Meeting.getInstance().endMeeting();
|
||||
var btn = $(this);
|
||||
|
@ -64,6 +72,13 @@
|
|||
}
|
||||
};
|
||||
$('#recordings').popover(options);
|
||||
|
||||
// focus user
|
||||
if ($('.meeting-user-name').is(':visible')) {
|
||||
$('.meeting-user-name').focus();
|
||||
} else {
|
||||
$('.meeting-join').focus();
|
||||
}
|
||||
};
|
||||
|
||||
var initIndex = function() {
|
||||
|
|
Loading…
Reference in New Issue