CC-3395 Play preview for playlists and timelines for shows should show a list under the pop-up player which will play the entire playlist.

- Updated library.js because I lost my changes during merge
This commit is contained in:
Daniel 2012-03-12 11:57:30 -04:00
parent c0b0e8079b
commit 09b5d9003b
1 changed files with 25 additions and 10 deletions

View File

@ -652,19 +652,34 @@ function addQtipToSCIcons(){
}
});
}
var audio_preview_window = null;
var preview_window = null;
function open_audio_preview(fileID, index) {
url = 'Playlist/audio-preview-player/fileID/'+fileID+'/index/'+index;
function openAudioPreview(event) {
event.stopPropagation();
var audioFileID = $(this).attr('audioFile');
var playlistID = $('#pl_id:first').attr('value');
var playlistIndex = $(this).parent().parent().attr('id');
playlistIndex = playlistIndex.substring(4); //remove the spl_
open_playlist_preview(audioFileID, "", "", playlistID, playlistIndex);
}
function open_playlist_preview(audioFileID, audioFileTitle, audioFileArtist, playlistID, playlistIndex) {
if (playlistIndex != undefined)
url = 'Playlist/playlist-preview/audioFileID/'+audioFileID+'/playlistIndex/'+playlistIndex+'/playlistID/'+playlistID;
else
url = 'Playlist/playlist-preview/audioFileID/'+audioFileID+'/audioFileArtist/'+audioFileArtist+'/audioFileTitle/'+audioFileTitle;
//$.post(baseUri+'Playlist/audio-preview-player', {fileName: fileName, cueIn: cueIn, cueOut: cueOut, fadeIn: fadeIn, fadeInFileName: fadeInFileName, fadeOut: fadeOut, fadeOutFileName: fadeOutFileName})
if (audio_preview_window == null || audio_preview_window.closed){
audio_preview_window = window.open(url, 'Audio Player', 'width=400,height=95');
} else if (!audio_preview_window.closed) {
audio_preview_window.play(fileID);
} else {
console.log("something else : "+baseUrl+url);
if (preview_window == null || preview_window.closed || playlistIndex === undefined){
preview_window = window.open(url, 'Audio Player', 'width=450,height=800');
} else if (!preview_window.closed) {
preview_window.playAll(playlistID, playlistIndex);
}
//Set the play button to pause.
//var elemID = "spl_"+elemIndexString;
//$('#'+elemID+' div.list-item-container a span').attr("class", "ui-icon ui-icon-pause");
return false;
}