Fixes to room search (#2343)

This commit is contained in:
Ahmad Farhat
2020-12-09 17:48:59 -05:00
committed by GitHub
parent a798c16929
commit 7809431873
4 changed files with 162 additions and 148 deletions

View File

@ -352,7 +352,11 @@ function checkIfAutoJoin() {
}
function filterRooms() {
const search_term = $('#room-search').val().toLowerCase(),
let search = $('#room-search').val()
if (search == undefined) { return }
let search_term = search.toLowerCase(),
rooms = $('#room_block_container > div:not(:last-child)');
clear_room_search = $('#clear-room-search');
@ -367,3 +371,8 @@ function filterRooms() {
room.style.display = (text.toLowerCase().indexOf(search_term) < 0) ? 'none' : 'block';
})
}
function clearRoomSearch() {
$('#room-search').val('');
filterRooms()
}

View File

@ -24,7 +24,7 @@
}
}
#clear-search, #clear-room-search {
#clear-search {
z-index: 9;
position: absolute;
right: 55px;
@ -35,10 +35,6 @@
}
}
.room-search {
margin: 50px 0 25px 0;
}
.tag i {
color: white !important;
}

View File

@ -133,3 +133,14 @@
text-overflow: ellipsis;
padding-right: 75px;
}
#clear-room-search {
z-index: 9;
position: absolute;
right: 15px;
top: 8px;
&:hover {
cursor: pointer;
}
}