Make the drop song button not change to active color if the function was aborted

This commit is contained in:
Junior 2020-04-18 15:21:10 -04:00
parent 0f2f22b280
commit d31c589b87
2 changed files with 3 additions and 2 deletions

3
ajax_dropsong.php Normal file → Executable file
View File

@ -15,7 +15,8 @@ if ( false !== ($row = $sth->fetch()) ) {
exit(); exit();
} }
$query = "DELETE FROM " . QUEUECONTENTSTABLE . " WHERE qid=(SELECT id FROM " . QUEUESTABLE . " WHERE active='true' AND type='user') AND songid=(SELECT songid FROM " . RECENTSTABLE . " ORDER BY timeplayed DESC LIMIT 1)"; $query = "DELETE FROM " . QUEUECONTENTSTABLE . " WHERE qid=(SELECT id FROM " . QUEUESTABLE . " ";
$query .= "WHERE active='true' AND type='user') AND songid=(SELECT songid FROM " . RECENTSTABLE . " ORDER BY timeplayed DESC LIMIT 1)";
$sth = $globaldbh->prepare($query); $sth = $globaldbh->prepare($query);
$sth->execute(); $sth->execute();

2
minimal.js Normal file → Executable file
View File

@ -374,8 +374,8 @@ function emptyJukebox (callingElement) {
function dropSong (callingElement) { function dropSong (callingElement) {
callingElement.blur(); callingElement.blur();
callingElement.addClass("buttonactive");
if ( gettingJukeboxList || gettingSongList ) return false; if ( gettingJukeboxList || gettingSongList ) return false;
callingElement.addClass("buttonactive");
$.ajax({ $.ajax({
url: 'ajax_dropsong.php', url: 'ajax_dropsong.php',
async: false, async: false,