Some minor improvement

This commit is contained in:
Sebastien 2018-09-13 09:39:03 +03:00
parent a386089615
commit d3f9af7d1c

View File

@ -165,7 +165,7 @@ function getCurentMusic() {
}) })
.fail(function (data) { .fail(function (data) {
if(!error){ if(!error){
alert("Connection lost, I keep trying to refresh!"); console.error("Connection lost, I keep trying to refresh!");
error = true; error = true;
} }
@ -250,6 +250,7 @@ function getChannels(){
$('#channelForm').append(template); $('#channelForm').append(template);
}); });
$('#btn_ok_channel').addClass("disabled");
$('#modalChanels').modal('open'); $('#modalChanels').modal('open');
}).fail(function (data) { }).fail(function (data) {
@ -312,7 +313,7 @@ function updateControl(data){
function sendCommand(command){ function sendCommand(command){
modal_loading.modal('open'); modal_loading.modal('open');
console.log(command) console.log(command);
$.ajax({ $.ajax({
type: "POST", type: "POST",
dataType: 'json', dataType: 'json',
@ -371,6 +372,8 @@ function msToTime(duration) {
} }
function listeners() { function listeners() {
$('#btn_play').click(function () { $('#btn_play').click(function () {
switch (state){ switch (state){
case "PLAYING": case "PLAYING":