CC-4231: Library: Prevent audio preview popup for dynamic blocks

- done
This commit is contained in:
denise 2012-08-15 12:51:53 -04:00
parent 4d9a31b3c1
commit 7225345541
3 changed files with 10 additions and 1 deletions

View File

@ -95,6 +95,11 @@ class Application_Model_Datatables
$r['length'] = $pl->getLength();
} else if ($r['ftype'] == "block") {
$bl = new Application_Model_Block($r['id']);
if ($bl->isStatic()) {
$r['bl_type'] = 'static';
} else {
$r['bl_type'] = 'dynamic';
}
$r['length'] = $bl->getLength();
}
}

View File

@ -40,6 +40,10 @@ var AIRTIME = (function(AIRTIME){
$nRow.attr("id", aData["tr_id"])
.data("aData", aData)
.data("screen", "playlist");
if (aData["bl_type"] !== undefined) {
$nRow.attr("bl_type", aData["bl_type"]);
}
};
mod.fnDrawCallback = function() {

View File

@ -426,7 +426,7 @@ var AIRTIME = (function(AIRTIME) {
open_audio_preview(aData.ftype, aData.audioFile, aData.track_title, aData.artist_name);
} else if (aData.ftype == 'stream') {
open_audio_preview(aData.ftype, aData.audioFile, aData.track_title, aData.artist_name);
} else if (aData.ftype == 'block') {
} else if (aData.ftype == 'block' && aData.bl_type == 'static') {
blockIndex = $(this).parent().attr('id').substring(3); //remove the bl_
open_block_preview(blockIndex, 0);
}