2015-07-29 03:04:32 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
2015-08-02 19:55:51 +02:00
|
|
|
<head>
|
|
|
|
<meta charset="ISO-8859-1">
|
|
|
|
<title>{{.User}} - mumbledj</title>
|
|
|
|
<script
|
|
|
|
src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
function onLoad() {
|
|
|
|
window.setInterval(function() {
|
|
|
|
// Get the song queue
|
|
|
|
}, 6000);
|
|
|
|
}
|
2015-07-30 14:48:53 +02:00
|
|
|
|
2015-08-02 19:55:51 +02:00
|
|
|
function setAPI(type, val) {
|
|
|
|
$.ajax({
|
|
|
|
url : "http://{{.Site}}/api/" + type + "?token={{.Token}}"
|
|
|
|
+ "&value=" + val,
|
|
|
|
complete : apiComplete,
|
|
|
|
cache : false
|
|
|
|
});
|
|
|
|
}
|
2015-07-30 14:48:53 +02:00
|
|
|
|
2015-08-13 16:20:37 +02:00
|
|
|
function apiComplete(jqXHR, textStatus) {
|
2015-08-02 19:55:51 +02:00
|
|
|
alert(textStatus);
|
|
|
|
}
|
2015-07-29 03:04:32 +02:00
|
|
|
|
2015-08-02 19:55:51 +02:00
|
|
|
function txtBox(type) {
|
|
|
|
var txt = $("#textbox");
|
|
|
|
api(type, txt.attr("value"));
|
|
|
|
txt.attr("value", "");
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</head>
|
2015-08-13 16:16:10 +02:00
|
|
|
<body onload="onLoad();" bgcolor="#FFFFFF">
|
2015-08-02 19:55:51 +02:00
|
|
|
<h1>Add Song Form</h1>
|
|
|
|
<input id="textbox" type="text" />
|
|
|
|
<input id="add" type="button" value="Add Song"
|
|
|
|
onclick="setAPI('add', $('#textbox').attr('value'))" />
|
|
|
|
<input id="volume" type="button" value="Set Volume"
|
|
|
|
onclick="setAPI('volume', $('#textbox').attr('value'))" />
|
|
|
|
<input id="skipSong" type="button" value="Skip Current Song"
|
|
|
|
onclick="setAPI('skip', false)" />
|
|
|
|
<input id="skipPlaylist" type="button" value="Skip Current Playlist"
|
|
|
|
onclick="setAPI('skip', true)" />
|
|
|
|
<br />
|
|
|
|
<textarea id="status" rows="10" cols="30"></textarea>
|
|
|
|
</body>
|
2015-07-29 03:04:32 +02:00
|
|
|
</html>
|