Make the drop song button not change to active color if the function was aborted
This commit is contained in:
parent
0f2f22b280
commit
d31c589b87
3
ajax_dropsong.php
Normal file → Executable file
3
ajax_dropsong.php
Normal file → Executable 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
2
minimal.js
Normal file → Executable 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,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user