Merge branch '2.3.x' into 2.3.x-saas
This commit is contained in:
commit
8bec9dea55
62 changed files with 8265 additions and 13435 deletions
|
@ -24,7 +24,7 @@ $(document).ready(function(){
|
|||
cssSelectorAncestor: "#jp_container_1"
|
||||
},[], //array of songs will be filled with below's json call
|
||||
{
|
||||
swfPath: "/js/jplayer",
|
||||
swfPath: baseUrl+"js/jplayer",
|
||||
supplied:"oga, mp3, m4v, m4a, wav",
|
||||
size: {
|
||||
width: "0px",
|
||||
|
|
|
@ -360,13 +360,15 @@ function controlSwitchLight(){
|
|||
}
|
||||
|
||||
function getScheduleFromServer(){
|
||||
$.ajax({ url: baseUrl+"Schedule/get-current-playlist/format/json", dataType:"json", success:function(data){
|
||||
$.ajax({ url: baseUrl+"Schedule/get-current-playlist/format/json",
|
||||
dataType:"json",
|
||||
success:function(data){
|
||||
parseItems(data.entries);
|
||||
parseSourceStatus(data.source_status);
|
||||
parseSwitchStatus(data.switch_status);
|
||||
showName = data.show_name;
|
||||
setTimeout(getScheduleFromServer, serverUpdateInterval);
|
||||
}, error:function(jqXHR, textStatus, errorThrown){}});
|
||||
setTimeout(getScheduleFromServer, serverUpdateInterval);
|
||||
}
|
||||
|
||||
function setupQtip(){
|
||||
|
|
|
@ -491,9 +491,11 @@ var AIRTIME = (function(AIRTIME) {
|
|||
},
|
||||
"fnStateLoad": function fnLibStateLoad(oSettings) {
|
||||
var settings = localStorage.getItem('datatables-library');
|
||||
|
||||
if (settings !== "") {
|
||||
|
||||
try {
|
||||
return JSON.parse(settings);
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
"fnStateLoadParams": function (oSettings, oData) {
|
||||
|
@ -501,18 +503,22 @@ var AIRTIME = (function(AIRTIME) {
|
|||
length,
|
||||
a = oData.abVisCols;
|
||||
|
||||
// putting serialized data back into the correct js type to make
|
||||
// sure everything works properly.
|
||||
for (i = 0, length = a.length; i < length; i++) {
|
||||
if (typeof(a[i]) === "string") {
|
||||
a[i] = (a[i] === "true") ? true : false;
|
||||
}
|
||||
if (a) {
|
||||
// putting serialized data back into the correct js type to make
|
||||
// sure everything works properly.
|
||||
for (i = 0, length = a.length; i < length; i++) {
|
||||
if (typeof(a[i]) === "string") {
|
||||
a[i] = (a[i] === "true") ? true : false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
a = oData.ColReorder;
|
||||
for (i = 0, length = a.length; i < length; i++) {
|
||||
if (typeof(a[i]) === "string") {
|
||||
a[i] = parseInt(a[i], 10);
|
||||
if (a) {
|
||||
for (i = 0, length = a.length; i < length; i++) {
|
||||
if (typeof(a[i]) === "string") {
|
||||
a[i] = parseInt(a[i], 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -702,8 +708,19 @@ var AIRTIME = (function(AIRTIME) {
|
|||
$simpleSearch.addClass("sp-invisible");
|
||||
}
|
||||
else {
|
||||
//clear the advanced search fields and reset datatable
|
||||
$(".filter_column input").val("").keyup();
|
||||
// clear the advanced search fields
|
||||
var divs = $("div#advanced_search").children(':visible');
|
||||
$.each(divs, function(i, div){
|
||||
fields = $(div).children().find('input');
|
||||
$.each(fields, function(i, field){
|
||||
if ($(field).val() !== "") {
|
||||
$(field).val("");
|
||||
// we need to reset the results when removing
|
||||
// an advanced search field
|
||||
$(field).keyup();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//reset datatable with previous simple search results (if any)
|
||||
$(".dataTables_filter input").val(simpleSearchText).keyup();
|
||||
|
@ -757,8 +774,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
});
|
||||
|
||||
checkImportStatus();
|
||||
setInterval(checkImportStatus, 5000);
|
||||
setInterval(checkLibrarySCUploadStatus, 5000);
|
||||
checkLibrarySCUploadStatus();
|
||||
|
||||
addQtipToSCIcons();
|
||||
|
||||
|
@ -986,6 +1002,7 @@ function checkImportStatus() {
|
|||
}
|
||||
div.hide();
|
||||
}
|
||||
setTimeout(checkImportStatus, 5000);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1019,6 +1036,7 @@ function checkLibrarySCUploadStatus(){
|
|||
else if (json.sc_id == "-3") {
|
||||
span.removeClass("progress").addClass("sc-error");
|
||||
}
|
||||
setTimeout(checkLibrarySCUploadStatus, 5000);
|
||||
}
|
||||
|
||||
function checkSCUploadStatusRequest() {
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
function redirectToLogin(){
|
||||
window.location = baseUrl+"/Login"
|
||||
window.location = baseUrl+"Login"
|
||||
}
|
|
@ -103,6 +103,8 @@ function checkLiquidsoapStatus(){
|
|||
}
|
||||
$("#s"+id+"Liquidsoap-error-msg-element").html(html);
|
||||
}
|
||||
|
||||
setTimeout(checkLiquidsoapStatus, 2000);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -242,10 +244,10 @@ function setupEventListeners() {
|
|||
return false;
|
||||
})
|
||||
|
||||
setLiveSourceConnectionOverrideListener()
|
||||
setLiveSourceConnectionOverrideListener();
|
||||
|
||||
showErrorSections()
|
||||
setInterval('checkLiquidsoapStatus()', 1000)
|
||||
showErrorSections();
|
||||
checkLiquidsoapStatus();
|
||||
|
||||
// qtip for help text
|
||||
$(".override_help_icon").qtip({
|
||||
|
|
|
@ -406,10 +406,9 @@ function setAddShowEvents() {
|
|||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
||||
$("#schedule_calendar").removeAttr("style")
|
||||
.fullCalendar('render');
|
||||
|
||||
$("#add-show-form").hide();
|
||||
windowResize();
|
||||
|
||||
$.get(baseUrl+"Schedule/get-form", {format:"json"}, function(json){
|
||||
$("#add-show-form")
|
||||
.empty()
|
||||
|
@ -652,13 +651,14 @@ function windowResize() {
|
|||
var calendarWidth = 100-(($("#schedule-add-show").width() + (16 * 4))/windowWidth*100);
|
||||
var widthPercent = parseInt(calendarWidth)+"%";
|
||||
$("#schedule_calendar").css("width", widthPercent);
|
||||
} else {
|
||||
$("#schedule_calendar").css("width", 98.5+"%");
|
||||
}
|
||||
|
||||
// 200 px for top dashboard and 50 for padding on main content
|
||||
// this calculation was copied from schedule.js line 326
|
||||
var mainHeight = document.documentElement.clientHeight - 200 - 50;
|
||||
$('#schedule_calendar').fullCalendar('option', 'contentHeight', mainHeight)
|
||||
$("#schedule_calendar").fullCalendar('render');
|
||||
$('#schedule_calendar').fullCalendar('option', 'contentHeight', mainHeight);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,11 @@ function openAddShowForm() {
|
|||
var calendarWidth = 100-(($("#schedule-add-show").width() + (16 * 4))/windowWidth*100);
|
||||
var widthPercent = parseInt(calendarWidth)+"%";
|
||||
$("#schedule_calendar").css("width", widthPercent);
|
||||
$("#schedule_calendar").fullCalendar('render');
|
||||
|
||||
// 200 px for top dashboard and 50 for padding on main content
|
||||
// this calculation was copied from schedule.js line 326
|
||||
var mainHeight = document.documentElement.clientHeight - 200 - 50;
|
||||
$('#schedule_calendar').fullCalendar('option', 'contentHeight', mainHeight);
|
||||
}
|
||||
$("#schedule-show-what").show(0, function(){
|
||||
$add_show_name = $("#add_show_name");
|
||||
|
@ -233,55 +237,61 @@ function eventRender(event, element, view) {
|
|||
}
|
||||
|
||||
//add the record/rebroadcast/soundcloud icons if needed
|
||||
if((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.record === 1 && event.soundcloud_id === -1) {
|
||||
$(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon recording"></span>');
|
||||
} else if ((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.record === 1 && event.soundcloud_id > 0) {
|
||||
$(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon soundcloud"></span>');
|
||||
} else if ((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.record === 1 && event.soundcloud_id === -2) {
|
||||
$(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon progress"></span>');
|
||||
} else if ((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.record === 1 && event.soundcloud_id === -3) {
|
||||
$(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon sc-error"></span>');
|
||||
}
|
||||
|
||||
if(view.name === 'month' && event.record === 1 && event.soundcloud_id === -1) {
|
||||
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon recording"></span>');
|
||||
} else if (view.name === 'month' && event.record === 1 && event.soundcloud_id > 0) {
|
||||
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon soundcloud"></span>');
|
||||
} else if (view.name === 'month' && event.record === 1 && event.soundcloud_id === -2) {
|
||||
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon progress"></span>');
|
||||
} else if (view.name === 'month' && event.record === 1 && event.soundcloud_id === -3) {
|
||||
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon sc-error"></span>');
|
||||
}
|
||||
|
||||
if (view.name === 'agendaDay' || view.name === 'agendaWeek') {
|
||||
if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) {
|
||||
$(element)
|
||||
.find(".fc-event-time")
|
||||
.before('<span id="'+event.id+'" class="small-icon show-empty"></span>');
|
||||
} else if (event.show_partial_filled === true) {
|
||||
$(element)
|
||||
.find(".fc-event-time")
|
||||
.before('<span id="'+event.id+'" class="small-icon show-partial-filled"></span>');
|
||||
if (event.record === 1) {
|
||||
if (view.name === 'agendaDay' || view.name === 'agendaWeek') {
|
||||
if (event.soundcloud_id === -1) {
|
||||
$(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon recording"></span>');
|
||||
} else if ( event.soundcloud_id > 0) {
|
||||
$(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon soundcloud"></span>');
|
||||
} else if (event.soundcloud_id === -2) {
|
||||
$(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon progress"></span>');
|
||||
} else if (event.soundcloud_id === -3) {
|
||||
$(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon sc-error"></span>');
|
||||
}
|
||||
} else if (view.name === 'month') {
|
||||
if(event.soundcloud_id === -1) {
|
||||
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon recording"></span>');
|
||||
} else if (event.soundcloud_id > 0) {
|
||||
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon soundcloud"></span>');
|
||||
} else if (event.soundcloud_id === -2) {
|
||||
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon progress"></span>');
|
||||
} else if (event.soundcloud_id === -3) {
|
||||
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon sc-error"></span>');
|
||||
}
|
||||
}
|
||||
} else if (view.name === 'month') {
|
||||
if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) {
|
||||
$(element)
|
||||
.find(".fc-event-title")
|
||||
.after('<span id="'+event.id+'" title="'+$.i18n._("Show is empty")+'" class="small-icon show-empty"></span>');
|
||||
} else if (event.show_partial_filled === true) {
|
||||
$(element)
|
||||
.find(".fc-event-title")
|
||||
.after('<span id="'+event.id+'" title="'+$.i18n._("Show is partially filled")+'" class="small-icon show-partial-filled"></span>');
|
||||
}
|
||||
|
||||
if (event.record === 0 && event.rebroadcast === 0) {
|
||||
if (view.name === 'agendaDay' || view.name === 'agendaWeek') {
|
||||
if (event.show_empty === 1) {
|
||||
$(element)
|
||||
.find(".fc-event-time")
|
||||
.before('<span id="'+event.id+'" class="small-icon show-empty"></span>');
|
||||
} else if (event.show_partial_filled === true) {
|
||||
$(element)
|
||||
.find(".fc-event-time")
|
||||
.before('<span id="'+event.id+'" class="small-icon show-partial-filled"></span>');
|
||||
}
|
||||
} else if (view.name === 'month') {
|
||||
if (event.show_empty === 1) {
|
||||
$(element)
|
||||
.find(".fc-event-title")
|
||||
.after('<span id="'+event.id+'" title="'+$.i18n._("Show is empty")+'" class="small-icon show-empty"></span>');
|
||||
} else if (event.show_partial_filled === true) {
|
||||
$(element)
|
||||
.find(".fc-event-title")
|
||||
.after('<span id="'+event.id+'" title="'+$.i18n._("Show is partially filled")+'" class="small-icon show-partial-filled"></span>');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//rebroadcast icon
|
||||
if((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.rebroadcast === 1) {
|
||||
$(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon rebroadcast"></span>');
|
||||
}
|
||||
|
||||
if(view.name === 'month' && event.rebroadcast === 1) {
|
||||
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon rebroadcast"></span>');
|
||||
if (event.rebroadcast === 1) {
|
||||
if (view.name === 'agendaDay' || view.name === 'agendaWeek') {
|
||||
$(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon rebroadcast"></span>');
|
||||
} else if (view.name === 'month') {
|
||||
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon rebroadcast"></span>');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -366,6 +376,7 @@ function checkSCUploadStatus(){
|
|||
}else if(json.sc_id == "-3"){
|
||||
$("span[id="+id+"]:not(.recording)").removeClass("progress").addClass("sc-error");
|
||||
}
|
||||
setTimeout(checkSCUploadStatus, 5000);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -418,6 +429,7 @@ function getCurrentShow(){
|
|||
$(this).remove("span[small-icon now-playing]");
|
||||
}
|
||||
});
|
||||
setTimeout(getCurrentShow, 5000);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -558,8 +570,8 @@ function alertShowErrorAndReload(){
|
|||
|
||||
preloadEventFeed();
|
||||
$(document).ready(function(){
|
||||
setInterval( "checkSCUploadStatus()", 5000 );
|
||||
setInterval( "getCurrentShow()", 5000 );
|
||||
checkSCUploadStatus();
|
||||
getCurrentShow();
|
||||
});
|
||||
|
||||
var view_name;
|
||||
|
|
|
@ -93,6 +93,8 @@ function checkCalendarSCUploadStatus(){
|
|||
else if (json.sc_id == "-3") {
|
||||
span.removeClass("progress").addClass("sc-error");
|
||||
}
|
||||
|
||||
setTimeout(checkCalendarSCUploadStatus, 5000);
|
||||
}
|
||||
|
||||
function checkSCUploadStatusRequest() {
|
||||
|
@ -328,7 +330,7 @@ function alertShowErrorAndReload(){
|
|||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
setInterval(checkCalendarSCUploadStatus, 5000);
|
||||
checkCalendarSCUploadStatus();
|
||||
|
||||
$.contextMenu({
|
||||
selector: 'div.fc-event',
|
||||
|
|
|
@ -86,7 +86,7 @@ AIRTIME = (function(AIRTIME) {
|
|||
.end();
|
||||
|
||||
oTable = $('#show_builder_table').dataTable();
|
||||
oTable.fnDraw();
|
||||
//oTable.fnDraw();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -277,12 +277,13 @@ AIRTIME = (function(AIRTIME) {
|
|||
if (json.update === true) {
|
||||
oTable.fnDraw();
|
||||
}
|
||||
setTimeout(checkScheduleUpdates, 5000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//check if the timeline view needs updating.
|
||||
setInterval(checkScheduleUpdates, 5 * 1000); //need refresh in milliseconds
|
||||
checkScheduleUpdates();
|
||||
};
|
||||
|
||||
mod.onResize = function() {
|
||||
|
|
|
@ -66,6 +66,7 @@ function success(data, textStatus, jqXHR){
|
|||
if (data.status.partitions){
|
||||
generatePartitions(data.status.partitions);
|
||||
}
|
||||
setTimeout(function(){updateStatus(false);}, 5000);
|
||||
}
|
||||
|
||||
function updateStatus(getDiskInfo){
|
||||
|
@ -75,5 +76,4 @@ function updateStatus(getDiskInfo){
|
|||
|
||||
$(document).ready(function() {
|
||||
updateStatus(true);
|
||||
setInterval(function(){updateStatus(false);}, 5000);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue