From 2031f5e660c0e861e4e73018054093f241ac6c4b Mon Sep 17 00:00:00 2001 From: KasperRT Date: Wed, 22 Oct 2014 21:42:18 +0200 Subject: [PATCH] added ajax request for conf options to change.php --- js/admin.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/js/admin.js b/js/admin.js index 40f72631..048c1833 100755 --- a/js/admin.js +++ b/js/admin.js @@ -14,10 +14,27 @@ function submitAdmin(form) vote = form.vote.checked, addSongs = form.addSongs.checked, longSongs = form.longSongs.checked, - onlyMusic = form.onlyMusic.checked; + frontpage = form.frontPage.checked, + onlyMusic = form.onlyMusic.checked, + removePlay = form.removePlay.checked; console.log("Vote: "+vote); console.log("Add Songs: "+addSongs); console.log("Long Songs: "+longSongs); + console.log("Frontpage: "+frontpage); console.log("Only music: "+onlyMusic); + console.log("Remove after play:"+removePlay); + + conf = $.ajax({ + type: "POST", + url: "php/change.php", + async: false, + data: "conf=start&vote="+vote+"&addsongs="+addSongs+"&longsongs="+longSongs+"&frontpage="+frontpage+"&onlymusic="+onlyMusic+"&removeplay="+removePlay, + + success: function() { + console.log("configurations response: "+response); + } + }).responseText; + + console.log(conf); }