forked from External/greenlight
GRN2-266: Autofocus room name when create room modal appears (#945)
* added autofocus to the Room Name field * added autofocus to Room Name text field * added autofocus to Room Name text field * GRN2-266 Fixing autofocus for Room name when creating room * removing whitespace * fixing whitespace * fixing whitespace
This commit is contained in:
parent
eb8cc9b17f
commit
68b231dbdb
|
@ -51,6 +51,13 @@ $(document).on('turbolinks:load', function(){
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Autofocus on the Room Name label when creating a room only
|
||||||
|
$('#createRoomModal').on('shown.bs.modal', function (){
|
||||||
|
if ($(".create-only").css("display") == "block"){
|
||||||
|
$('#create-room-name').focus()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
if (controller == "rooms" && action == "show" || controller == "admins" && action == "server_rooms"){
|
if (controller == "rooms" && action == "show" || controller == "admins" && action == "server_rooms"){
|
||||||
// Display and update all fields related to creating a room in the createRoomModal
|
// Display and update all fields related to creating a room in the createRoomModal
|
||||||
$(".update-room").click(function(){
|
$(".update-room").click(function(){
|
||||||
|
|
Loading…
Reference in New Issue