mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-24 03:49:14 -05:00
Added short notes on what works and not to playlist.html
New playlists are called "untitled playlist" to conform with iTunes
This commit is contained in:
parent
a1a4ba9c1b
commit
c3a8a453be
@ -51,6 +51,20 @@
|
||||
<input type="text" id="edit_playlist_name" value="" />
|
||||
<div id="busymsg" style="text-align:center;color:red; visibility: hidden;">Busy ...</div>
|
||||
<a href="javascript:EditPlaylistName.add();">Add static playlist</a>
|
||||
<br /> <br />
|
||||
<strong>Things that work:</strong><br />
|
||||
* Browse Library and playlists<br />
|
||||
* Search Library and playlists<br />
|
||||
* Dblclick playlist = rename<br />
|
||||
* Add static playlist<br />
|
||||
* Delete playlist (hit delete)<br />
|
||||
<br />
|
||||
<strong>Broken stuff</strong><br />
|
||||
* Only shows 50 first songs<br />
|
||||
* IE no songlist<br />
|
||||
* IE no playlist rename<br />
|
||||
* IE no add playlist<br />
|
||||
|
||||
</div>
|
||||
<div id="genre_div">
|
||||
Genre<br />
|
||||
|
@ -1,3 +1,13 @@
|
||||
// TODO
|
||||
// Find a decent spinner instad of the busy text
|
||||
// Handle 'all' in select boxes
|
||||
// move stuff to responsehandler
|
||||
// handle source change events
|
||||
// navigate source with arrow keys and then click selected should initiate edit
|
||||
// new playlist twice gives server response 500
|
||||
// After playlist name edit, it should be activated again.
|
||||
// After playlist delete, select another one
|
||||
|
||||
Event.observe(window,'load',initPlaylist);
|
||||
|
||||
var SEARCH_DELAY = 500; // # ms without typing before the search box searches
|
||||
@ -36,13 +46,6 @@ var GlobalEvents = {
|
||||
});
|
||||
}
|
||||
}
|
||||
// TODO
|
||||
// Find a decent spinner instad of the busy text
|
||||
// Handle 'all' in select boxes
|
||||
// move stuff to responsehandler
|
||||
// handle source change events
|
||||
// navigate source with arrow keys and then click selected should initiate edit
|
||||
// new playlist twice gives server response 500
|
||||
|
||||
var Search = {
|
||||
timeOut: '',
|
||||
@ -76,7 +79,7 @@ var EditPlaylistName = {
|
||||
},
|
||||
add: function () {
|
||||
var url = '/databases/1/containers/add?output=xml';
|
||||
url += '&org.mt-daapd.playlist-type=0&dmap.itemname=new%20playlist';
|
||||
url += '&org.mt-daapd.playlist-type=0&dmap.itemname=untitled%20playlist';
|
||||
new Ajax.Request(url ,{method: 'get',onComplete:EditPlaylistName.responseAdd});
|
||||
},
|
||||
remove: function () {
|
||||
@ -117,12 +120,11 @@ var EditPlaylistName = {
|
||||
responseAdd: function(request) {
|
||||
var status = Element.textContent(request.responseXML.getElementsByTagName('dmap.status')[0]);
|
||||
if ('200' != status) {
|
||||
alert(status);
|
||||
alert('Something went wrong');
|
||||
alert('There is a playlist with that name, write some code to handle this');
|
||||
return;
|
||||
}
|
||||
EditPlaylistName.playlistId = Element.textContent(request.responseXML.getElementsByTagName('dmap.itemid')[0]);
|
||||
EditPlaylistName.playlistName = 'new playlist';
|
||||
EditPlaylistName.playlistName = 'untitled playlist';
|
||||
var o = document.createElement('option');
|
||||
o.value = EditPlaylistName.playlistId;
|
||||
o.text = EditPlaylistName.playlistName;
|
||||
@ -183,6 +185,10 @@ var EventHandler = {
|
||||
if (e.keyCode == Event.KEY_DELETE) {
|
||||
EditPlaylistName.remove();
|
||||
}
|
||||
if (113 == e.keyCode) {
|
||||
// F2
|
||||
//TODO edit playist, what is the key on a mac?
|
||||
}
|
||||
},
|
||||
search: function () {
|
||||
Query.setSearchString($('search').value);
|
||||
|
Loading…
x
Reference in New Issue
Block a user