CC-4663: Smart Blocks -> Deleting a track in smart block from library gives error

-fixed
-tracks with undefined mime type were not handled properly
This commit is contained in:
denise 2012-11-02 16:54:49 -04:00
parent 796274e4ef
commit 2854dd40e0
1 changed files with 26 additions and 22 deletions

View File

@ -369,29 +369,33 @@ var AIRTIME = (function(AIRTIME){
$.each($("div .big_play"), function(index, value){ $.each($("div .big_play"), function(index, value){
if ($(value).attr('blockId') === undefined) { if ($(value).attr('blockId') === undefined) {
var mime = $(value).attr("data-mime-type"); var mime = $(value).attr("data-mime-type");
if (isAudioSupported(mime)) { //If mime is undefined it is likely because the file was
$(value).bind("click", openAudioPreview); //deleted from the library. This case is handled in mod.onReady()
} else { if (mime !== undefined) {
$(value).attr("class", "big_play_disabled dark_class"); if (isAudioSupported(mime)) {
$(value).qtip({ $(value).bind("click", openAudioPreview);
content: 'Your browser does not support playing this file type: "'+ mime +'"', } else {
show: 'mouseover', $(value).attr("class", "big_play_disabled dark_class");
hide: { $(value).qtip({
delay: 500, content: 'Your browser does not support playing this file type: "'+ mime +'"',
fixed: true show: 'mouseover',
}, hide: {
style: { delay: 500,
border: { fixed: true
width: 0,
radius: 4
}, },
classes: "ui-tooltip-dark ui-tooltip-rounded" style: {
}, border: {
position: { width: 0,
my: "left bottom", radius: 4
at: "right center" },
}, classes: "ui-tooltip-dark ui-tooltip-rounded"
}) },
position: {
my: "left bottom",
at: "right center"
},
})
}
} }
} else { } else {
if ($(value).attr('blocktype') === 'dynamic') { if ($(value).attr('blocktype') === 'dynamic') {