Compare commits

..

3 Commits

View File

@ -15,12 +15,6 @@ $(document).ready(function() {
}
});
getVolumeRange();
$('#volume_slider').slider({ animate: "fast", max: maxVolume, min: minVolume, step: 2 });
$('#volume_slider').slider({
change: function(event, ui) { if ( !volFromServer ) { setVolume(); } volFromServer = false; }
});
$('#max_btn').click(function() { setSliderVolume(maxVolume); });
$('#min_btn').click(function() { setSliderVolume(minVolume); });
//$('#skipsong_btn').click(function() { skipSong($(this)); });
//$('#skipsong_playing_btn').click(function() { skipSong($(this)); });
$('.skipsong_btn').click(function() { skipSong($(this)); });
@ -60,7 +54,6 @@ $(document).ready(function() {
allowPageScroll: "vertical"
});
updateQueueSelects();
getVolume();
toggleMute($(this), 'show');
getSongList();
getQueueTarget();
@ -313,11 +306,16 @@ function dropJukeboxSong(id) {
function getVolumeRange() {
$.ajax({
url: 'ajax/ajax_getvolrange.php',
async: false,
dataType: 'json',
success: function(data, stat, jqo) {
maxVolume = data.max;
minVolume = data.min;
$('#volume_slider').slider({ animate: "fast", max: maxVolume, min: minVolume, step: 2 });
$('#volume_slider').slider({
change: function(event, ui) { if ( !volFromServer ) { setVolume(); } volFromServer = false; }
});
$('#max_btn').click(function() { setSliderVolume(maxVolume); });
$('#min_btn').click(function() { setSliderVolume(minVolume); });
}
});
}
@ -356,12 +354,14 @@ function skipSong (callingElement) {
callingElement.blur();
if ( gettingJukeboxList || gettingSongList ) return false;
callingElement.addClass("buttonactive");
console.log("Skipping song");
$.ajax({
url: 'ajax/ajax_skipsong.php',
async: false,
success: function (data, stat, jqo) {
callingElement.removeClass("buttonactive");
getSongList();
setTimeout(function() {
callingElement.removeClass("buttonactive");
getSongList();
}, 250);
},
error: function(jqo, stat, err) {
callingElement.removeClass("buttonactive");
@ -391,7 +391,6 @@ function dropSong (callingElement) {
callingElement.addClass("buttonactive");
$.ajax({
url: 'ajax/ajax_dropsong.php',
async: false,
success: function (data, stat, jqo) {
callingElement.removeClass("buttonactive");
getSongList();
@ -407,7 +406,6 @@ function changeQueue () {
$.ajax({
url: 'ajax/ajax_changequeue.php',
data: {newid: qid},
async: false,
success: function (data, stat, jqo) {
getSongList();
}