Fixes welcome page input Enter button action.

This commit is contained in:
hristoterezov 2014-09-02 11:03:53 +03:00
parent f046051ac7
commit f65640882f
2 changed files with 7 additions and 4 deletions

9
app.js
View File

@ -1034,18 +1034,21 @@ $(document).ready(function () {
$("#videoconference_page").hide();
$("#domain_name").text(window.location.host + "/");
$("span[name='appName']").text(brand.appName);
$("#enter_room_button").click(function()
function enter_room()
{
var val = $("#enter_room_field").val();
if(!val)
val = $("#enter_room_field").attr("room_name");
window.location.pathname = "/" + val;
}
$("#enter_room_button").click(function()
{
enter_room();
});
$("#enter_room_field").keydown(function (event) {
if (event.keyCode === 13) {
var val = Util.escapeHtml(this.value);
window.location.pathname = "/" + val;
enter_room();
}
});

View File

@ -78,7 +78,7 @@
<div id="enter_room_form" >
<div id="domain_name"></div>
<div id="enter_room">
<input id="enter_room_field" type="text" placeholder="Enter room name" />
<input id="enter_room_field" type="text" autofocus placeholder="Enter room name" />
<div class="icon-reload" id="reload_roomname"></div>
<input id="enter_room_button" type="button" value="GO" />