Merge branch '2.4.x' of dev.sourcefabric.org:airtime into 2.4.x
This commit is contained in:
commit
1c452988cf
9 changed files with 81 additions and 43 deletions
|
@ -40,7 +40,7 @@ class Application_Model_Preference
|
|||
|
||||
$result = Application_Common_Database::prepareAndExecute($sql,
|
||||
$paramMap,
|
||||
'column',
|
||||
Application_Common_Database::COLUMN,
|
||||
PDO::FETCH_ASSOC,
|
||||
$con);
|
||||
|
||||
|
|
|
@ -105,6 +105,10 @@ div.sb-timerange input#sb_date_start {
|
|||
margin-left: 30px;
|
||||
}
|
||||
|
||||
div.sb-timerange input.error {
|
||||
background-color: rgba(255,0,0,0.2);
|
||||
}
|
||||
|
||||
.sb-starts,
|
||||
.sb-ends {
|
||||
text-align: center;
|
||||
|
|
|
@ -35,7 +35,8 @@ AIRTIME = (function(AIRTIME) {
|
|||
dayNamesMin: i18n_days_short,
|
||||
onClick: function(sDate, oDatePicker) {
|
||||
$(this).datepicker( "setDate", sDate );
|
||||
}
|
||||
},
|
||||
onClose: validateTimeRange
|
||||
};
|
||||
|
||||
oBaseTimePickerSettings = {
|
||||
|
@ -90,32 +91,61 @@ AIRTIME = (function(AIRTIME) {
|
|||
}
|
||||
}
|
||||
|
||||
function validateTimeRange() {
|
||||
var oRange,
|
||||
inputs = $('.sb-timerange > input'),
|
||||
start, end;
|
||||
|
||||
oRange = AIRTIME.utilities.fnGetScheduleRange(dateStartId, timeStartId, dateEndId, timeEndId);
|
||||
|
||||
start = oRange.start;
|
||||
end = oRange.end;
|
||||
|
||||
if (end >= start) {
|
||||
inputs.removeClass('error');
|
||||
}
|
||||
else {
|
||||
if (!inputs.hasClass('error')) {
|
||||
inputs.addClass('error');
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
start: start,
|
||||
end: end,
|
||||
isValid: end >= start
|
||||
};
|
||||
}
|
||||
|
||||
function showSearchSubmit() {
|
||||
var fn,
|
||||
oRange,
|
||||
op,
|
||||
oTable = $('#show_builder_table').dataTable();
|
||||
|
||||
//reset timestamp value since input values could have changed.
|
||||
AIRTIME.showbuilder.resetTimestamp();
|
||||
|
||||
oRange = AIRTIME.utilities.fnGetScheduleRange(dateStartId, timeStartId, dateEndId, timeEndId);
|
||||
|
||||
fn = oTable.fnSettings().fnServerData;
|
||||
fn.start = oRange.start;
|
||||
fn.end = oRange.end;
|
||||
|
||||
op = $("div.sb-advanced-options");
|
||||
if (op.is(":visible")) {
|
||||
|
||||
if (fn.ops === undefined) {
|
||||
fn.ops = {};
|
||||
}
|
||||
fn.ops.showFilter = op.find("#sb_show_filter").val();
|
||||
fn.ops.myShows = op.find("#sb_my_shows").is(":checked") ? 1 : 0;
|
||||
oTable = $('#show_builder_table').dataTable(),
|
||||
check;
|
||||
|
||||
check = validateTimeRange();
|
||||
|
||||
if (check.isValid) {
|
||||
|
||||
//reset timestamp value since input values could have changed.
|
||||
AIRTIME.showbuilder.resetTimestamp();
|
||||
|
||||
fn = oTable.fnSettings().fnServerData;
|
||||
fn.start = check.start;
|
||||
fn.end = check.end;
|
||||
|
||||
op = $("div.sb-advanced-options");
|
||||
if (op.is(":visible")) {
|
||||
|
||||
if (fn.ops === undefined) {
|
||||
fn.ops = {};
|
||||
}
|
||||
fn.ops.showFilter = op.find("#sb_show_filter").val();
|
||||
fn.ops.myShows = op.find("#sb_my_shows").is(":checked") ? 1 : 0;
|
||||
}
|
||||
|
||||
oTable.fnDraw();
|
||||
}
|
||||
|
||||
oTable.fnDraw();
|
||||
}
|
||||
|
||||
mod.onReady = function() {
|
||||
|
@ -134,10 +164,22 @@ AIRTIME = (function(AIRTIME) {
|
|||
$(this).removeClass("ui-state-hover");
|
||||
});
|
||||
|
||||
$builder.find(dateStartId).datepicker(oBaseDatePickerSettings);
|
||||
$builder.find(timeStartId).timepicker(oBaseTimePickerSettings);
|
||||
$builder.find(dateEndId).datepicker(oBaseDatePickerSettings);
|
||||
$builder.find(timeEndId).timepicker(oBaseTimePickerSettings);
|
||||
$builder.find(dateStartId)
|
||||
.datepicker(oBaseDatePickerSettings)
|
||||
.blur(validateTimeRange);
|
||||
|
||||
$builder.find(timeStartId)
|
||||
.timepicker(oBaseTimePickerSettings)
|
||||
.blur(validateTimeRange);
|
||||
|
||||
$builder.find(dateEndId)
|
||||
.datepicker(oBaseDatePickerSettings)
|
||||
.blur(validateTimeRange);
|
||||
|
||||
$builder.find(timeEndId)
|
||||
.timepicker(oBaseTimePickerSettings)
|
||||
.blur(validateTimeRange);
|
||||
|
||||
|
||||
oRange = AIRTIME.utilities.fnGetScheduleRange(dateStartId, timeStartId,
|
||||
dateEndId, timeEndId);
|
||||
|
|
|
@ -88,19 +88,13 @@ var AIRTIME = (function(AIRTIME){
|
|||
mod.fnGetScheduleRange = function(dateStart, timeStart, dateEnd, timeEnd) {
|
||||
var iStart,
|
||||
iEnd,
|
||||
iRange,
|
||||
DEFAULT_RANGE = 60*60*24;
|
||||
iRange;
|
||||
|
||||
iStart = AIRTIME.utilities.fnGetTimestamp(dateStart, timeStart);
|
||||
iEnd = AIRTIME.utilities.fnGetTimestamp(dateEnd, timeEnd);
|
||||
|
||||
iRange = iEnd - iStart;
|
||||
|
||||
if (iEnd < iStart) {
|
||||
iEnd = iStart + DEFAULT_RANGE;
|
||||
iRange = DEFAULT_RANGE;
|
||||
}
|
||||
|
||||
return {
|
||||
start: iStart,
|
||||
end: iEnd,
|
||||
|
|
|
@ -16,8 +16,6 @@ AudioPlayout.prototype.init = function(config) {
|
|||
|
||||
this.gainNode = undefined;
|
||||
this.destination = this.ac.destination;
|
||||
this.analyser = this.ac.createAnalyser();
|
||||
this.analyser.connect(this.destination);
|
||||
};
|
||||
|
||||
AudioPlayout.prototype.getBuffer = function() {
|
||||
|
@ -41,7 +39,7 @@ AudioPlayout.prototype.applyFades = function(fades, relPos, now, delay) {
|
|||
duration;
|
||||
|
||||
this.gainNode && this.gainNode.disconnect();
|
||||
this.gainNode = this.ac.createGainNode();
|
||||
this.gainNode = this.ac.createGain();
|
||||
|
||||
for (id in fades) {
|
||||
|
||||
|
@ -137,7 +135,7 @@ AudioPlayout.prototype.setSource = function(source) {
|
|||
this.source.buffer = this.buffer;
|
||||
|
||||
this.source.connect(this.gainNode);
|
||||
this.gainNode.connect(this.analyser);
|
||||
this.gainNode.connect(this.destination);
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -176,6 +176,7 @@ TrackEditor.prototype.loadBuffer = function(src) {
|
|||
var that = this,
|
||||
xhr = new XMLHttpRequest();
|
||||
|
||||
xhr.open('GET', src, true);
|
||||
xhr.responseType = 'arraybuffer';
|
||||
|
||||
xhr.addEventListener('progress', function(e) {
|
||||
|
@ -198,7 +199,6 @@ TrackEditor.prototype.loadBuffer = function(src) {
|
|||
);
|
||||
}, false);
|
||||
|
||||
xhr.open('GET', src, true);
|
||||
xhr.send();
|
||||
};
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: airtime-media-monitor
|
||||
# Required-Start: $local_fs $remote_fs $network $syslog
|
||||
# Required-Start: $local_fs $remote_fs $network $syslog $all
|
||||
# Required-Stop: $local_fs $remote_fs $network $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: airtime-liquidsoap
|
||||
# Required-Start: $local_fs $remote_fs $network $syslog
|
||||
# Required-Start: $local_fs $remote_fs $network $syslog $all
|
||||
# Required-Stop: $local_fs $remote_fs $network $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: airtime-playout
|
||||
# Required-Start: $local_fs $remote_fs $network $syslog
|
||||
# Required-Start: $local_fs $remote_fs $network $syslog $all
|
||||
# Required-Stop: $local_fs $remote_fs $network $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue