finishings on the pairing page
This commit is contained in:
@@ -191,13 +191,11 @@ onLoad(() => {
|
||||
document.on('keyup', e => {
|
||||
switch (e.key) {
|
||||
case 'Escape': {
|
||||
if ($('#player').hasClass('shown')) {
|
||||
if ($('#needle')[0].value) {
|
||||
if ($('#player').hasClass('shown') && $('#needle')[0].value) {
|
||||
$('#needle')[0].value = '';
|
||||
initSearch();
|
||||
} else {
|
||||
close_modal();
|
||||
}
|
||||
} else {
|
||||
close_modal();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@@ -51,6 +51,7 @@ onLoad(()=>{
|
||||
$('#unpair').on('click', e => {
|
||||
let games = $('#paired')[0].childNodes.filter('.selected.listitem').map(item => parseInt(item.data("id")));
|
||||
if (games.length == 0) {
|
||||
$('#paired .listitem').addClass('selected');
|
||||
games = $('#paired')[0].childNodes.filter('.selected.listitem').map(item => parseInt(item.data("id")));
|
||||
}
|
||||
unpair(games);
|
||||
|
@@ -39,4 +39,10 @@ onLoad(() => {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
$('#publish').on('click', e => {
|
||||
modal('publish-modal');
|
||||
});
|
||||
$('#publish-modal').on('click', e => {
|
||||
close_modal();
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user