-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,7 +367,9 @@ 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){
if ($(value).attr('blockId') === undefined) {
var mime = $(value).attr("data-mime-type"); var mime = $(value).attr("data-mime-type");
console.log($(value));
if (isAudioSupported(mime)) { if (isAudioSupported(mime)) {
$(value).bind("click", openAudioPreview); $(value).bind("click", openAudioPreview);
} else { } else {
@ -392,6 +394,7 @@ var AIRTIME = (function(AIRTIME){
}, },
}) })
} }
}
}); });
} }