Commit 8fc6dda4 authored by Alan Szlosek's avatar Alan Szlosek

heading at top of playlist, count next to each song

parent cae78e40
......@@ -206,9 +206,6 @@ button.dequeue {
<div id="endTime"></div>
</div>
<div id="controls" class="flex controls">
<!--
<a href="#/catalog" class="one selected" id="catalogButton" data-tab="catalog"><img src="/icons/ic_list_white_24px.svg" /></a>
-->
<a href="#/playlist" class="one disabled" id="playlistButton" data-tab="playlist"><img src="/icons/ic_queue_music_white_24px.svg" /></a>
<div style="width: 3px; background-color: #fff;"></div>
<div id="prev" class="one warning previous disabled"><img src="/icons/ic_skip_previous_white_24px.svg" /></div>
......@@ -219,18 +216,8 @@ button.dequeue {
<div id="playlist" class="list hidden">
<!--
<div>
<div class="flex artist" data-artistid="pl">
<div class="one title">PLAYLIST</div>
<button class="clear error"></button>
</div>
</div>
<div id="playlist"></div>
-->
</div>
<div id="catalog" class="list">
</div>
......@@ -535,8 +522,15 @@ var player = {
},
_refresh: function() {
var out = [];
var out = [
tag(
'h2',
{},
text('Playlist')
)
];
var j = 1;
for (var i = 0; i < player.playlist.length; i++) {
var songId = player.playlist[i];
var song = catalog.songs[ songId ];
......@@ -545,8 +539,8 @@ var player = {
out.push(
tag(
'div',
{class: 'flex song artist-pl active', "data-index": i},
tag('div', {class:'one title'}, text(("00" + song.trackNumber).slice(-2) + '. ' + song.artist + ' - ' + song.name)),
{class: 'flex song active', "data-index": i},
tag('div', {class:'one title'}, text(("00" + j).slice(-2) + '. ' + song.artist + ' - ' + song.name)),
tag('button', {class:'error clear'})
)
);
......@@ -554,12 +548,13 @@ var player = {
out.push(
tag(
'div',
{class: 'flex song artist-pl', "data-index": i},
tag('div', {class:'one title'}, text(("00" + song.trackNumber).slice(-2) + '. ' + song.artist + ' - ' + song.name)),
{class: 'flex song', "data-index": i},
tag('div', {class:'one title'}, text(("00" + j).slice(-2) + '. ' + song.artist + ' - ' + song.name)),
tag('button', {class:'error dequeue'})
)
);
}
j++;
}
drawChildren(handles.playlist, out);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment