Commit 5a897b73 authored by Alan Szlosek's avatar Alan Szlosek

place clear playlist button next to first track, minor state fix

parent c7f91b18
......@@ -411,6 +411,7 @@ var player = {
}
handles.player.play();
break;
case 'playpause_playpause':
// triggered by clicking play/pause in UI
case 'playing_playpause':
handles.player.pause();
......@@ -463,17 +464,6 @@ var player = {
_refresh: function() {
var out = [];
out.push(
tag(
'div',
{class: 'flex clear'},
tag('div', {class:'one'}),
tag('div', {class:'button clear error'},
tag('img', {src: '/icons/ic_clear_all_white_24px.svg'})
)
)
);
for (var i = 0; i < player.playlist.length; i++) {
var songId = player.playlist[i];
var song = catalog.songs[ songId ];
......@@ -483,7 +473,10 @@ var player = {
tag(
'div',
{class: 'flex song active', "data-index": i},
tag('div', {class:'one title'}, ("00" + song.trackNumber).slice(-2) + '. ' + song.artist + ' - ' + song.name)
tag('div', {class:'one title'}, ("00" + song.trackNumber).slice(-2) + '. ' + song.artist + ' - ' + song.name),
tag('div', {class:'button clear error'},
tag('img', {src: '/icons/ic_clear_all_white_24px.svg'})
)
)
);
} else {
......
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