Add refresh button for playlists

This commit is contained in:
Davis Mosenkovs 2015-07-12 02:15:31 +03:00
parent 728c58d165
commit 896ec8afde
3 changed files with 15 additions and 7 deletions

View File

@ -417,7 +417,6 @@
#playlistspane {
/* height: 90% !important;*/
margin: 0px !important;
padding: 2px !important;
}
a {

View File

@ -314,15 +314,18 @@
</div>
<!-- /nowplaying -->
<div data-role="content" id="playlistspane" class="pane ui-grid-a pl-breakpoint">
<div class="ui-block-a scroll" id="playlistslistdiv">
<ul id="playlistslist" class="table"></ul>
</div>
<div class="ui-block-b scroll" id="playlisttracksdiv">
<div data-role="content" id="playlistspane" class="pane">
<a style="float:right; padding: 1.2em 10px" onclick="return refreshPlaylists();"><i class="fa fa-refresh"></i></a>
<h4>Playlists</h4>
<div class="ui-grid-a pl-breakpoint">
<div class="ui-block-a scroll" id="playlistslistdiv">
<ul id="playlistslist" class="table"></ul>
</div>
<div class="ui-block-b scroll" id="playlisttracksdiv">
<div id="playlisttracksback" style="height: 30px; margin: 2px; padding-top: 2px; background-color: #aaa;"><a style="display:block; padding: 5px;" href="#" onclick="return togglePlaylists();"><i class="fa fa-arrow-circle-left"></i> Back</a></div>
<ul class="table" id="playlisttracks"></ul>
</div>
</div>
</div>
<!--/playlistspane-->

View File

@ -251,6 +251,12 @@ function saveQueue() {
return false;
}
function refreshPlaylists() {
mopidy.playlists.refresh();
return false;
}
/**********************
* Buttons
*/