CC-84: Smart Playlists
- audio preview on playlist - cleaning up some code
This commit is contained in:
parent
3b5a3e6713
commit
0d2d8218bf
14 changed files with 202 additions and 72 deletions
|
@ -40,6 +40,8 @@ $(document).ready(function(){
|
|||
var playlistIndex = $('.playlistIndex').text();
|
||||
var showID = $('.showID').text();
|
||||
var showIndex = $('.showIndex').text();
|
||||
var blockId = $('.blockId').text();
|
||||
var blockIndex = $('.blockIndex').text();
|
||||
|
||||
var numOfItems = 0;
|
||||
|
||||
|
@ -49,6 +51,8 @@ $(document).ready(function(){
|
|||
playOne(audioFileID);
|
||||
}else if (showID != "") {
|
||||
playAllShow(showID, showIndex);
|
||||
}else if(blockId != "" && blockIndex != ""){
|
||||
playBlock(blockId, blockIndex);
|
||||
}
|
||||
|
||||
$("#jp_container_1").on("mouseenter", "ul.jp-controls li", function(ev) {
|
||||
|
@ -76,6 +80,17 @@ function playAllPlaylist(p_playlistID, p_playlistIndex) {
|
|||
}
|
||||
}
|
||||
|
||||
function playBlock(p_blockId, p_blockIndex)
|
||||
{
|
||||
var viewsBlockId = $('.blockId').text();
|
||||
|
||||
if ( _idToPostionLookUp !== undefined && viewsBlockId == p_blockId ) {
|
||||
play(p_blockIndex);
|
||||
}else {
|
||||
buildplaylist("/audiopreview/get-block/blockId/"+p_blockId, p_blockIndex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up the show to play.
|
||||
* checks with the show id given to the show id on the page/view
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue