X-Git-Url: https://git.rvb.name/mpd-web.git/blobdiff_plain/585224f5dbe2565ed04c97b054e8d8354c21dc5e..b925727e21a52321766eb06d4d879ad9f7be3e04:/ajax/mpd.js diff --git a/ajax/mpd.js b/ajax/mpd.js index fec89c6..1be85a6 100644 --- a/ajax/mpd.js +++ b/ajax/mpd.js @@ -130,6 +130,39 @@ req.send(); } +function SavePlayList() { + +var name=window.prompt('List name',''); + +var req = new XMLHttpRequest(); + +req.onreadystatechange = function () { + if (this.readyState != 4 || this.status != 200) return; + if (this.responseText != 'OK') { + window.alert(this.responseText); + } +}; + +req.open("GET", "ajax/save.php?item="+name, true); +req.send(); + +} + +function DelPlayList(item) { + +var req = new XMLHttpRequest(); + +req.onreadystatechange = function () { + if (this.readyState != 4 || this.status != 200) return; + RefreshPageStatus(); + LoadPlayList(); +}; + +req.open("GET", "ajax/playlist-command.php?task=dellist&item="+item, true); +req.send(); + +} + function RefreshPageContent() { RefreshPageStatus();