Merge branch '2.2.x' into devel
Conflicts: airtime_mvc/application/controllers/LibraryController.php airtime_mvc/application/views/scripts/library/library.phtml airtime_mvc/public/js/airtime/showbuilder/builder.js airtime_mvc/public/js/airtime/showbuilder/main_builder.js
This commit is contained in:
commit
135aadf16b
56 changed files with 5240 additions and 4806 deletions
|
@ -339,11 +339,23 @@ var AIRTIME = (function(AIRTIME){
|
|||
});
|
||||
};
|
||||
|
||||
mod.jumpToCurrentTrack = function() {
|
||||
var $scroll = $sbContent.find(".dataTables_scrolling");
|
||||
var scrolled = $scroll.scrollTop();
|
||||
var scrollingTop = $scroll.offset().top;
|
||||
var oTable = $('#show_builder_table').dataTable();
|
||||
var current = $sbTable.find("."+NOW_PLAYING_CLASS);
|
||||
var currentTop = current.offset().top;
|
||||
|
||||
$scroll.scrollTop(currentTop - scrollingTop + scrolled);
|
||||
}
|
||||
|
||||
mod.builderDataTable = function() {
|
||||
$sbContent = $('#show_builder');
|
||||
$lib = $("#library_content"),
|
||||
$sbTable = $sbContent.find('table');
|
||||
|
||||
var isInitialized = false;
|
||||
|
||||
oSchedTable = $sbTable.dataTable( {
|
||||
"aoColumns": [
|
||||
/* checkbox */ {"mDataProp": "allowed", "sTitle": "", "sWidth": "15px", "sClass": "sb-checkbox"},
|
||||
|
@ -357,7 +369,8 @@ var AIRTIME = (function(AIRTIME){
|
|||
/* cue in */ {"mDataProp": "cuein", "sTitle": "Cue In", "bVisible": false, "sClass": "sb-cue-in"},
|
||||
/* cue out */ {"mDataProp": "cueout", "sTitle": "Cue Out", "bVisible": false, "sClass": "sb-cue-out"},
|
||||
/* fade in */ {"mDataProp": "fadein", "sTitle": "Fade In", "bVisible": false, "sClass": "sb-fade-in"},
|
||||
/* fade out */ {"mDataProp": "fadeout", "sTitle": "Fade Out", "bVisible": false, "sClass": "sb-fade-out"}
|
||||
/* fade out */ {"mDataProp": "fadeout", "sTitle": "Fade Out", "bVisible": false, "sClass": "sb-fade-out"},
|
||||
/* Mime */ {"mDataProp" : "mime", "sTitle" : "Mime", "bVisible": false, "sClass": "sb-mime"}
|
||||
],
|
||||
|
||||
"bJQueryUI": true,
|
||||
|
@ -537,11 +550,16 @@ var AIRTIME = (function(AIRTIME){
|
|||
$image = $nRow.find('td.sb-image');
|
||||
//check if the file exists.
|
||||
if (aData.image === true) {
|
||||
$image.html('<img title="Track preview" src="'+baseUrl+'/css/images/icon_audioclip.png"></img>')
|
||||
$nRow.addClass("lib-audio");
|
||||
if (!isAudioSupported(aData.mime)) {
|
||||
$image.html('<span class="ui-icon ui-icon-locked"></span>');
|
||||
} else {
|
||||
$image.html('<img title="Track preview" src="'+baseUrl+'/css/images/icon_audioclip.png"></img>')
|
||||
.click(function() {
|
||||
open_show_preview(aData.instance, aData.pos);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
$image.html('<span class="ui-icon ui-icon-alert"></span>');
|
||||
|
@ -636,6 +654,17 @@ var AIRTIME = (function(AIRTIME){
|
|||
$("#draggingContainer").remove();
|
||||
},
|
||||
"fnDrawCallback": function fnBuilderDrawCallback(oSettings, json) {
|
||||
var isInitialized = false;
|
||||
|
||||
if (!isInitialized) {
|
||||
//when coming to 'Now Playing' page we want the page
|
||||
//to jump to the current track
|
||||
if ($(this).find("."+NOW_PLAYING_CLASS).length > 0) {
|
||||
mod.jumpToCurrentTrack();
|
||||
}
|
||||
}
|
||||
|
||||
isInitialized = true;
|
||||
var wrapperDiv,
|
||||
markerDiv,
|
||||
$td,
|
||||
|
@ -966,13 +995,18 @@ var AIRTIME = (function(AIRTIME){
|
|||
"<i class='icon-white icon-cut'></i></button></div>")
|
||||
.append("<div class='btn-group'>" +
|
||||
"<button title='Remove selected scheduled items' class='ui-state-disabled btn btn-small' disabled='disabled'>" +
|
||||
"<i class='icon-white icon-trash'></i></button></div>")
|
||||
.append("<div class='btn-group'>" +
|
||||
"<i class='icon-white icon-trash'></i></button></div>");
|
||||
|
||||
//if 'Add/Remove content' was chosen from the context menu
|
||||
//in the Calendar do not append these buttons
|
||||
if ($(".ui-dialog-content").length === 0) {
|
||||
$menu.append("<div class='btn-group'>" +
|
||||
"<button title='Jump to the current playing track' class='ui-state-disabled btn btn-small' disabled='disabled'>" +
|
||||
"<i class='icon-white icon-step-forward'></i></button></div>")
|
||||
.append("<div class='btn-group'>" +
|
||||
"<button title='Cancel current show' class='ui-state-disabled btn btn-small btn-danger' disabled='disabled'>" +
|
||||
"<i class='icon-white icon-ban-circle'></i></button></div>");
|
||||
}
|
||||
|
||||
$toolbar.append($menu);
|
||||
$menu = undefined;
|
||||
|
@ -1021,7 +1055,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
if (AIRTIME.button.isDisabled('icon-step-forward', true) === true) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
var $scroll = $sbContent.find(".dataTables_scrolling"),
|
||||
scrolled = $scroll.scrollTop(),
|
||||
scrollingTop = $scroll.offset().top,
|
||||
|
@ -1029,6 +1063,8 @@ var AIRTIME = (function(AIRTIME){
|
|||
currentTop = current.offset().top;
|
||||
|
||||
$scroll.scrollTop(currentTop - scrollingTop + scrolled);
|
||||
*/
|
||||
mod.jumpToCurrentTrack();
|
||||
});
|
||||
|
||||
//delete overbooked tracks.
|
||||
|
@ -1196,7 +1232,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
};
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
return AIRTIME;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue