Merge of cc-5709-airtime-analyzer-saas-refactor into saas
This commit is contained in:
parent
70f5bd3748
commit
2e2c3d6276
12 changed files with 627 additions and 468 deletions
|
@ -91,16 +91,11 @@ function openAudioPreview(p_event) {
|
|||
}
|
||||
}
|
||||
|
||||
function open_audio_preview(type, id, audioFileTitle, audioFileArtist) {
|
||||
// we need to remove soundcloud icon from audioFileTitle
|
||||
var index = audioFileTitle.indexOf("<span class=");
|
||||
if(index != -1){
|
||||
audioFileTitle = audioFileTitle.substring(0,index);
|
||||
}
|
||||
function open_audio_preview(type, id) {
|
||||
// The reason that we need to encode artist and title string is that
|
||||
// sometime they contain '/' or '\' and apache reject %2f or %5f
|
||||
// so the work around is to encode it twice.
|
||||
openPreviewWindow(baseUrl+'audiopreview/audio-preview/audioFileID/'+id+'/audioFileArtist/'+encodeURIComponent(encodeURIComponent(audioFileArtist))+'/audioFileTitle/'+encodeURIComponent(encodeURIComponent(audioFileTitle))+'/type/'+type);
|
||||
openPreviewWindow(baseUrl+'audiopreview/audio-preview/audioFileID/'+id+'/type/'+type);
|
||||
_preview_window.focus();
|
||||
}
|
||||
|
||||
|
|
|
@ -652,11 +652,11 @@ var AIRTIME = (function(AIRTIME) {
|
|||
open_playlist_preview(aData.audioFile, 0);
|
||||
} else if (aData.ftype === 'audioclip') {
|
||||
if (isAudioSupported(aData.mime)) {
|
||||
open_audio_preview(aData.ftype, aData.audioFile, aData.track_title, aData.artist_name);
|
||||
open_audio_preview(aData.ftype, aData.id);
|
||||
}
|
||||
} else if (aData.ftype == 'stream') {
|
||||
if (isAudioSupported(aData.mime)) {
|
||||
open_audio_preview(aData.ftype, aData.audioFile, aData.track_title, aData.artist_name);
|
||||
open_audio_preview(aData.ftype, aData.id);
|
||||
}
|
||||
} else if (aData.ftype == 'block' && aData.bl_type == 'static') {
|
||||
open_block_preview(aData.audioFile, 0);
|
||||
|
@ -964,7 +964,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
// pl_
|
||||
open_playlist_preview(playlistIndex, 0);
|
||||
} else if (data.ftype === 'audioclip' || data.ftype === 'stream') {
|
||||
open_audio_preview(data.ftype, data.audioFile, data.track_title, data.artist_name);
|
||||
open_audio_preview(data.ftype, data.id);
|
||||
} else if (data.ftype === 'block') {
|
||||
blockIndex = $(this).parent().attr('id').substring(3); // remove
|
||||
// the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue