added "add to queue" button and playlist link to now playing bar.

This commit is contained in:
Techywarrior 2013-04-10 22:42:34 -07:00
parent 5944d7f48c
commit ba196ca640
5 changed files with 16 additions and 9 deletions

View File

Before

Width:  |  Height:  |  Size: 535 B

After

Width:  |  Height:  |  Size: 535 B

View File

@ -66,9 +66,8 @@
<ul data-role="listview" style="min-width: 150px;" data-theme="c"> <ul data-role="listview" style="min-width: 150px;" data-theme="c">
<li data-role="list-divider" data-theme="a">Play Menu</li> <li data-role="list-divider" data-theme="a">Play Menu</li>
<li><a href="#" id="btnPlay">Play</a></li> <li><a href="#" id="btnPlay">Play</a></li>
<li><a href="#" id="btnResume">Resume</a> <li><a href="#" id="btnResume">Resume</a></li>
<li><a href="#" id="btnQueue">Add to Queue</a></li>
</li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@ -4,7 +4,7 @@
<title></title> <title></title>
</head> </head>
<body> <body>
<div id="playlistPage" data-role="page" class="page libraryPage" data-theme="a"> <div id="playlistPage" data-role="page" class="page libraryPage noLogoPage" data-theme="a">
<h1 class="libraryPageHeader"><a href="index.html" class="imageLink"> <h1 class="libraryPageHeader"><a href="index.html" class="imageLink">
<img src="css/images/home.png"></a>Playlist</h1> <img src="css/images/home.png"></a>Playlist</h1>

View File

@ -474,7 +474,8 @@
var userdata = currentItem.UserData || {}; var userdata = currentItem.UserData || {};
if (userdata.PlaybackPositionTicks) { //always pop menu now so we can have a queue link
//if (userdata.PlaybackPositionTicks) {
var pos = $('#playMenuAnchor', page).offset(); var pos = $('#playMenuAnchor', page).offset();
@ -483,10 +484,10 @@
y: pos.top + 20 y: pos.top + 20
}); });
} //}
else { //else {
play(); // play();
} //}
}); });
$('#btnPlay', page).on('click', function () { $('#btnPlay', page).on('click', function () {
@ -504,6 +505,12 @@
play(userdata.PlaybackPositionTicks); play(userdata.PlaybackPositionTicks);
}); });
$('#btnQueue', page).on('click', function () {
$('#playMenu', page).popup("close");
Playlist.add(currentItem);
});
}).on('pageshow', "#itemDetailPage", function () { }).on('pageshow', "#itemDetailPage", function () {
var page = this; var page = this;

View File

@ -1062,6 +1062,7 @@ $(function () {
var footerHtml = '<div id="footer" class="ui-bar-a">'; var footerHtml = '<div id="footer" class="ui-bar-a">';
footerHtml += '<div id="nowPlayingBar" style="display:none;">'; footerHtml += '<div id="nowPlayingBar" style="display:none;">';
footerHtml += '<a href="playlist.html"><img src="css/images/media/queue.png" class="imageButton mediaButton" style="height:34px;margin-bottom:2px;vertical-align:bottom;" /></a>';
footerHtml += '<button id="previousTrackButton" class="imageButton mediaButton" title="Previous Track" type="button"><img src="css/images/media/previoustrack.png" /></button>'; footerHtml += '<button id="previousTrackButton" class="imageButton mediaButton" title="Previous Track" type="button"><img src="css/images/media/previoustrack.png" /></button>';
footerHtml += '<button id="stopButton" class="imageButton mediaButton" title="Stop" type="button" onclick="MediaPlayer.stop();"><img src="css/images/media/stop.png" /></button>'; footerHtml += '<button id="stopButton" class="imageButton mediaButton" title="Stop" type="button" onclick="MediaPlayer.stop();"><img src="css/images/media/stop.png" /></button>';
footerHtml += '<button id="nextTrackButton" class="imageButton mediaButton" title="Next Track" type="button"><img src="css/images/media/nexttrack.png" /></button>'; footerHtml += '<button id="nextTrackButton" class="imageButton mediaButton" title="Next Track" type="button"><img src="css/images/media/nexttrack.png" /></button>';