mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added list refresh and query when user does an action
This commit is contained in:
@@ -80,6 +80,7 @@ function vote(id, vote){
|
|||||||
console.log("voted "+vote+" on "+id);
|
console.log("voted "+vote+" on "+id);
|
||||||
if(vote=="pos"){ $("#playlist").addClass("success");}
|
if(vote=="pos"){ $("#playlist").addClass("success");}
|
||||||
else{ $("#playlist").addClass("error");}
|
else{ $("#playlist").addClass("error");}
|
||||||
|
updateList();
|
||||||
},
|
},
|
||||||
}).responseText);
|
}).responseText);
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
@@ -97,6 +98,7 @@ function skip(){
|
|||||||
success: function() {
|
success: function() {
|
||||||
console.log("voted to skip song");
|
console.log("voted to skip song");
|
||||||
$("#buttons").addClass("success");
|
$("#buttons").addClass("success");
|
||||||
|
updateList();
|
||||||
},
|
},
|
||||||
}).responseText);
|
}).responseText);
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ $(document).ready(function()
|
|||||||
document.getElementById("search").value = "";
|
document.getElementById("search").value = "";
|
||||||
$("#search").addClass("success");
|
$("#search").addClass("success");
|
||||||
$("#results").html('');
|
$("#results").html('');
|
||||||
|
updateList();
|
||||||
},
|
},
|
||||||
error: function(){
|
error: function(){
|
||||||
console.log("error in adding");
|
console.log("error in adding");
|
||||||
|
|||||||
Reference in New Issue
Block a user