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