Search now always returns 6 answers hopefully

This commit is contained in:
Kasper Rynning-Tønnesen
2015-04-15 20:52:16 +02:00
parent e60c1e2795
commit eaaec7e93c
4 changed files with 37 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
var adminTogg = false;
var pass_corr = "";
socket.on("toast", function(msg)
{
pass_corr = "correct";
@@ -11,6 +12,16 @@ socket.on("toast", function(msg)
remove_bar();*/
});
socket.on("pw", function(msg)
{
w_p = false;
adminpass = msg;
names=["vote","addsongs","longsongs","frontpage", "allvideos", "removeplay", "skip", "shuffle"];
for (var i = 0; i < names.length; i++) {
$("input[name="+names[i]+"]").attr("disabled", false);
}
});
socket.on(chan.toLowerCase()+",conf", function(msg)
{
populate_list(msg, true);
@@ -23,7 +34,7 @@ $('input[class=conf]').change(function()
function pass_save()
{
save();
socket.emit('password', document.getElementById("password").value);
}
//function used in html onlick
@@ -40,7 +51,7 @@ function submitAdmin(form)
frontpage = form.frontpage.checked;
allvideos = form.allvideos.checked;
removeplay = form.removeplay.checked;
adminpass = document.getElementById("password").value;
//adminpass = document.getElementById("password").value;
skipping = form.skip.checked;
shuffling = form.shuffle.checked;