add one track to queue, clear queue
This commit is contained in:
parent
1d1e54b78d
commit
5009c4b75c
@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<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">
|
<meta charset="utf-8">
|
||||||
<link rel="stylesheet" href="css/jquery.mobile-1.3.1.css" />
|
<link rel="stylesheet" href="css/jquery.mobile-1.3.1.css" />
|
||||||
<script src="js/jquery-1.8.3.js"></script>
|
<script src="js/jquery-1.8.3.js"></script>
|
||||||
@ -77,10 +77,13 @@
|
|||||||
Track
|
Track
|
||||||
</li> -->
|
</li> -->
|
||||||
<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>
|
||||||
<li id="liaddtobottom">
|
<li>
|
||||||
<a href="#" onclick="return playTrack(true);">Add tracks to bottom of queue</a>
|
<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>
|
||||||
<li>
|
<li>
|
||||||
<a href="#" onclick="showAlbumPopup()">Show Album <span id="popupAlbumName"></span></a>
|
<a href="#" onclick="showAlbumPopup()">Show Album <span id="popupAlbumName"></span></a>
|
||||||
@ -134,7 +137,7 @@
|
|||||||
</div><!--/playlistspane-->
|
</div><!--/playlistspane-->
|
||||||
|
|
||||||
<div data-role="content" class="pane" id="currentpane">
|
<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 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>
|
<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);
|
var tracks = getTracksFromUri(playlisturi);
|
||||||
if (tracks) {
|
if (tracks) {
|
||||||
if (!addtobottom) {
|
if (!addtobottom) {
|
||||||
mopidy.tracklist.clear();
|
clearQueue();
|
||||||
}
|
}
|
||||||
$(CURRENT_PLAYLIST_TABLE).empty();
|
$(CURRENT_PLAYLIST_TABLE).empty();
|
||||||
} else {
|
} else {
|
||||||
@ -39,6 +39,9 @@ function playTrack(addtobottom) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (addtobottom) {
|
if (addtobottom) {
|
||||||
|
if (addtobottom == 'one') {
|
||||||
|
tracks.length = 1;
|
||||||
|
}
|
||||||
mopidy.tracklist.add(tracks);
|
mopidy.tracklist.add(tracks);
|
||||||
showLoading(false);
|
showLoading(false);
|
||||||
return false;
|
return false;
|
||||||
@ -65,6 +68,11 @@ console.log(i);
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clearQueue () {
|
||||||
|
mopidy.tracklist.clear();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* Buttons
|
* Buttons
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user