add one track to queue, clear queue
This commit is contained in:
parent
1d1e54b78d
commit
5009c4b75c
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="css/jquery.mobile-1.3.1.css" />
|
||||
<script src="js/jquery-1.8.3.js"></script>
|
||||
@ -77,10 +77,13 @@
|
||||
Track
|
||||
</li> -->
|
||||
<li>
|
||||
<a href="#" onclick="return playTrack();">Play Track <span id="popupTrackName"></span></a>
|
||||
<a href="#" onclick="return playTrack();">Play <span id="popupTrackName"></span></a>
|
||||
</li>
|
||||
<li id="liaddtobottom">
|
||||
<a href="#" onclick="return playTrack(true);">Add tracks to bottom of queue</a>
|
||||
<li>
|
||||
<a href="#" onclick="return playTrack('one');">Add this track to bottom of queue</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" onclick="return playTrack('all');">Add all tracks to bottom of queue</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" onclick="showAlbumPopup()">Show Album <span id="popupAlbumName"></span></a>
|
||||
@ -134,7 +137,7 @@
|
||||
</div><!--/playlistspane-->
|
||||
|
||||
<div data-role="content" class="pane" id="currentpane">
|
||||
<h4>Play Queue</h4>
|
||||
<a style="float:right" onclick="return clearQueue();" data-role="button">Clear</a><h4>Play Queue</h4>
|
||||
<!-- <ul data-role="listview" data-icon="false" data-theme="d" data-inset="true" id="currenttable"></ul>
|
||||
<ul data-role="listview" data-icon="false" data-theme="d" data-inset="true" id="currenttable"></ul> -->
|
||||
<ul class="table" id="currenttable"></ul>
|
||||
|
||||
10
webclient/js/controls.js
vendored
10
webclient/js/controls.js
vendored
@ -19,7 +19,7 @@ function playTrack(addtobottom) {
|
||||
var tracks = getTracksFromUri(playlisturi);
|
||||
if (tracks) {
|
||||
if (!addtobottom) {
|
||||
mopidy.tracklist.clear();
|
||||
clearQueue();
|
||||
}
|
||||
$(CURRENT_PLAYLIST_TABLE).empty();
|
||||
} else {
|
||||
@ -39,6 +39,9 @@ function playTrack(addtobottom) {
|
||||
}
|
||||
|
||||
if (addtobottom) {
|
||||
if (addtobottom == 'one') {
|
||||
tracks.length = 1;
|
||||
}
|
||||
mopidy.tracklist.add(tracks);
|
||||
showLoading(false);
|
||||
return false;
|
||||
@ -65,6 +68,11 @@ console.log(i);
|
||||
return false;
|
||||
}
|
||||
|
||||
function clearQueue () {
|
||||
mopidy.tracklist.clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
/**********************
|
||||
* Buttons
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user