Merge branch '2.3.x' into devel

This commit is contained in:
Naomi 2013-02-15 17:05:36 -05:00
commit 542553bbc1
18 changed files with 303 additions and 13049 deletions

View file

@ -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(){

View file

@ -511,9 +511,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) {
@ -521,18 +523,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);
}
}
}
@ -842,8 +848,7 @@ var AIRTIME = (function(AIRTIME) {
});
checkImportStatus();
setInterval(checkImportStatus, 5000);
setInterval(checkLibrarySCUploadStatus, 5000);
checkLibrarySCUploadStatus();
addQtipToSCIcons();
@ -1071,6 +1076,7 @@ function checkImportStatus() {
}
div.hide();
}
setTimeout(checkImportStatus, 5000);
});
}
@ -1104,6 +1110,7 @@ function checkLibrarySCUploadStatus(){
else if (json.sc_id == "-3") {
span.removeClass("progress").addClass("sc-error");
}
setTimeout(checkLibrarySCUploadStatus, 5000);
}
function checkSCUploadStatusRequest() {

View file

@ -102,6 +102,8 @@ function checkLiquidsoapStatus(){
}
$("#s"+id+"Liquidsoap-error-msg-element").html(html);
}
setTimeout(checkLiquidsoapStatus, 2000);
});
}
@ -241,10 +243,10 @@ function setupEventListeners() {
return false;
})
setLiveSourceConnectionOverrideListener()
setLiveSourceConnectionOverrideListener();
showErrorSections()
setInterval('checkLiquidsoapStatus()', 1000)
showErrorSections();
checkLiquidsoapStatus();
// qtip for help text
$(".override_help_icon").qtip({

View file

@ -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);
}

View file

@ -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");
@ -372,6 +376,7 @@ function checkSCUploadStatus(){
}else if(json.sc_id == "-3"){
$("span[id="+id+"]:not(.recording)").removeClass("progress").addClass("sc-error");
}
setTimeout(checkSCUploadStatus, 5000);
});
});
}
@ -424,6 +429,7 @@ function getCurrentShow(){
$(this).remove("span[small-icon now-playing]");
}
});
setTimeout(getCurrentShow, 5000);
});
}
@ -564,8 +570,8 @@ function alertShowErrorAndReload(){
preloadEventFeed();
$(document).ready(function(){
setInterval( "checkSCUploadStatus()", 5000 );
setInterval( "getCurrentShow()", 5000 );
checkSCUploadStatus();
getCurrentShow();
});
var view_name;

View file

@ -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',

View file

@ -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() {

View file

@ -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);
});

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,8 @@
/*
* File: ColReorder.js
* Version: 1.0.5
* Version: 1.0.8
* CVS: $Id$
* Description: Controls for column visiblity in DataTables
* Description: Allow columns to be reordered in a DataTable
* Author: Allan Jardine (www.sprymedia.co.uk)
* Created: Wed Sep 15 18:23:29 BST 2010
* Modified: $Date$ by $Author$
@ -174,10 +174,10 @@ $.fn.dataTableExt.oApi.fnColReorder = function ( oSettings, iFrom, iTo )
for ( i=0, iLen=iCols ; i<iLen ; i++ )
{
oCol = oSettings.aoColumns[i];
if ( typeof oCol.mDataProp == 'number' ) {
oCol.mDataProp = aiInvertMapping[ oCol.mDataProp ];
oCol.fnGetData = oSettings.oApi._fnGetObjectDataFn( oCol.mDataProp );
oCol.fnSetData = oSettings.oApi._fnSetObjectDataFn( oCol.mDataProp );
if ( typeof oCol.mData == 'number' ) {
oCol.mData = aiInvertMapping[ oCol.mData ];
oCol.fnGetData = oSettings.oApi._fnGetObjectDataFn( oCol.mData );
oCol.fnSetData = oSettings.oApi._fnSetObjectDataFn( oCol.mData );
}
}
@ -274,13 +274,12 @@ $.fn.dataTableExt.oApi.fnColReorder = function ( oSettings, iFrom, iTo )
}
/*
* Any extra operations for the other plug-ins
*/
if ( typeof ColVis != 'undefined' )
{
ColVis.fnRebuild( oSettings.oInstance );
}
/* Fire an event so other plug-ins can update */
$(oSettings.oInstance).trigger( 'column-reorder', [ oSettings, {
"iFrom": iFrom,
"iTo": iTo,
"aiInvertMapping": aiInvertMapping
} ] );
if ( typeof oSettings.oInstance._oPluginFixedHeader != 'undefined' )
{
@ -295,10 +294,10 @@ $.fn.dataTableExt.oApi.fnColReorder = function ( oSettings, iFrom, iTo )
* ColReorder provides column visiblity control for DataTables
* @class ColReorder
* @constructor
* @param {object} DataTables object
* @param {object} DataTables settings object
* @param {object} ColReorder options
*/
ColReorder = function( oTable, oOpts )
ColReorder = function( oDTSettings, oOpts )
{
/* Santiy check that we are a new instance */
if ( !this.CLASS || this.CLASS != "ColReorder" )
@ -401,9 +400,12 @@ ColReorder = function( oTable, oOpts )
/* Constructor logic */
this.s.dt = oTable.fnSettings();
this.s.dt = oDTSettings.oInstance.fnSettings();
this._fnConstruct();
/* Add destroy callback */
oDTSettings.oApi._fnCallbackReg(oDTSettings, 'aoDestroyCallback', jQuery.proxy(this._fnDestroy, this), 'ColReorder');
/* Store the instance for later use */
ColReorder.aoInstances.push( this );
return this;
@ -527,7 +529,7 @@ ColReorder.prototype = {
{
if ( a.length != this.s.dt.aoColumns.length )
{
this.s.dt.oInstance.oApi._fnLog( oDTSettings, 1, "ColReorder - array reorder does not "+
this.s.dt.oInstance.oApi._fnLog( this.s.dt, 1, "ColReorder - array reorder does not "+
"match known number of columns. Skipping." );
return;
}
@ -611,8 +613,8 @@ ColReorder.prototype = {
{
var that = this;
$(nTh).bind( 'mousedown.ColReorder', function (e) {
e.preventDefault();
that._fnMouseDown.call( that, e, nTh );
return false;
} );
},
@ -812,7 +814,7 @@ ColReorder.prototype = {
}
$('thead tr:eq(0)', this.dom.drag).each( function () {
$('th:not(:eq('+that.s.mouse.targetIndex+'))', this).remove();
$('th', this).eq(that.s.mouse.targetIndex).siblings().remove();
} );
$('tr', this.dom.drag).height( $('tr:eq(0)', that.s.dt.nTHead).height() );
@ -845,6 +847,29 @@ ColReorder.prototype = {
document.body.appendChild( this.dom.pointer );
document.body.appendChild( this.dom.drag );
},
/**
* Clean up ColReorder memory references and event handlers
* @method _fnDestroy
* @returns void
* @private
*/
"_fnDestroy": function ()
{
for ( var i=0, iLen=ColReorder.aoInstances.length ; i<iLen ; i++ )
{
if ( ColReorder.aoInstances[i] === this )
{
ColReorder.aoInstances.splice( i, 1 );
break;
}
}
$(this.s.dt.nTHead).find( '*' ).unbind( '.ColReorder' );
this.s.dt.oInstance._oPluginColReorder = null;
this.s = null;
}
};
@ -914,7 +939,7 @@ ColReorder.prototype.CLASS = "ColReorder";
* @type String
* @default As code
*/
ColReorder.VERSION = "1.0.5";
ColReorder.VERSION = "1.0.8";
ColReorder.prototype.VERSION = ColReorder.VERSION;
@ -930,7 +955,7 @@ ColReorder.prototype.VERSION = ColReorder.VERSION;
*/
if ( typeof $.fn.dataTable == "function" &&
typeof $.fn.dataTableExt.fnVersionCheck == "function" &&
$.fn.dataTableExt.fnVersionCheck('1.9.0') )
$.fn.dataTableExt.fnVersionCheck('1.9.3') )
{
$.fn.dataTableExt.aoFeatures.push( {
"fnInit": function( oDTSettings ) {
@ -938,7 +963,7 @@ if ( typeof $.fn.dataTable == "function" &&
if ( typeof oTable._oPluginColReorder == 'undefined' ) {
var opts = typeof oDTSettings.oInit.oColReorder != 'undefined' ?
oDTSettings.oInit.oColReorder : {};
oTable._oPluginColReorder = new ColReorder( oDTSettings.oInstance, opts );
oTable._oPluginColReorder = new ColReorder( oDTSettings, opts );
} else {
oTable.oApi._fnLog( oDTSettings, 1, "ColReorder attempted to initialise twice. Ignoring second" );
}
@ -951,7 +976,7 @@ if ( typeof $.fn.dataTable == "function" &&
}
else
{
alert( "Warning: ColReorder requires DataTables 1.9.0 or greater - www.datatables.net/download");
alert( "Warning: ColReorder requires DataTables 1.9.3 or greater - www.datatables.net/download");
}
})(jQuery, window, document);