-skip playable test if item is a smart block

This commit is contained in:
denise 2012-09-14 16:38:26 -04:00
parent 4201176b3a
commit 8ffaaaef25
2 changed files with 29 additions and 26 deletions

View File

@ -17,12 +17,12 @@ if ($item['type'] == 2) {
<span class="ui-icon ui-icon-play"></span> <span class="ui-icon ui-icon-play"></span>
</div> </div>
<?php elseif ($item['type'] == 1 && $item['exists']): ?> <?php elseif ($item['type'] == 1 && $item['exists']): ?>
<div class="big_play"> <div class="big_play" data-mime-type="<?php echo $item["mime"]; ?>">
<span class="ui-icon ui-icon-play"></span> <span class="ui-icon ui-icon-play"></span>
</div> </div>
<?php elseif ($item['type'] == 2 && $item['exists']): ?> <?php elseif ($item['type'] == 2 && $item['exists']): ?>
<div class="big_play ui-state-hover" blockId="<?php echo $item["item_id"]; ?>"> <div class="big_play" blockId="<?php echo $item["item_id"]; ?>">
<span class="ui-icon ui-icon-alert"></span> <span class="ui-icon ui-icon-play"></span>
</div> </div>
<?php else:?> <?php else:?>
<div class="big_play ui-state-hover"> <div class="big_play ui-state-hover">

View File

@ -367,30 +367,33 @@ var AIRTIME = (function(AIRTIME){
//then the playlist element is greyed out //then the playlist element is greyed out
mod.validatePlaylistElements = function(){ mod.validatePlaylistElements = function(){
$.each($(".big_play"), function(index, value){ $.each($(".big_play"), function(index, value){
var mime = $(value).attr("data-mime-type"); if ($(value).attr('blockId') === undefined) {
if (isAudioSupported(mime)) { var mime = $(value).attr("data-mime-type");
$(value).bind("click", openAudioPreview); console.log($(value));
} else { if (isAudioSupported(mime)) {
$(value).attr("class", "big_play_disabled dark_class"); $(value).bind("click", openAudioPreview);
$(value).qtip({ } else {
content: 'Your browser does not support playing this file type: "'+ mime +'"', $(value).attr("class", "big_play_disabled dark_class");
show: 'mouseover', $(value).qtip({
hide: { content: 'Your browser does not support playing this file type: "'+ mime +'"',
delay: 500, show: 'mouseover',
fixed: true hide: {
}, delay: 500,
style: { fixed: true
border: {
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"
},
})
}
} }
}); });
} }