Fixed user-suggested songs

This commit is contained in:
Kasper Rynning-Tønnesen
2016-09-05 14:51:59 +02:00
parent 1f25aaedfc
commit 9a291c065c
6 changed files with 9 additions and 32 deletions

View File

@@ -226,8 +226,9 @@ var Admin = {
removeplay = form.removeplay.checked;
skipping = form.skip.checked;
shuffling = form.shuffle.checked;
configs = [voting, addsongs, longsongs, frontpage, allvideos,
removeplay, adminpass, skipping, shuffling];
configs = {
voting: voting, addsongs: addsongs, longsongs: longsongs, frontpage: frontpage, allvideos: allvideos, removeplay: removeplay, adminpass: adminpass, skipping: skipping, shuffling: shuffling
};
socket.emit("conf", configs);
},

View File

@@ -306,6 +306,7 @@ var List = {
generateSong: function(song_info, transition, lazy, list, user)
{
if(list_html === undefined) list_html = $("#list-song-html").html();
var video_id = song_info.id;
var video_title = song_info.title;
var video_votes = song_info.votes;
@@ -332,7 +333,6 @@ var List = {
attr = ".vote-container";
del_attr = "del";
}else if(!list){
song.find(".vote-text").text(song_info.duration);
attr = ".add-suggested";

View File

@@ -35,31 +35,7 @@ $(document).ready(function (){
"<br><a href='"+git_info[0].html_url+"'>" +
git_info[0].sha.substring(0,10) + "</a>: " +
git_info[0].commit.message+"<br");
/*var _isChrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
setTimeout(function(){
if (_isChrome && !document.getElementById('extension-is-installed') && !mobilecheck())
Materialize.toast("<a href='#' onclick='installRemote();' style='pointer-events:all;color:white;'>Install the extension!</a>", 100000);
}, 5);
window.installRemote = installRemote;
window.failed = failed;
window.success = success;*/
});
/*
function installRemote()
{
chrome.webstore.install("", success, failed);
}
function failed(e)
{
console.log(e);
}
function success()
{
console.log("Successfully installed");
}*/
$("#playbutton").on("click", function()
{