Merge branch '2.5.x' into cc-5709-airtime-analyzer
Conflicts: airtime_mvc/locale/de_DE/LC_MESSAGES/airtime.po airtime_mvc/locale/es_ES/LC_MESSAGES/airtime.po airtime_mvc/locale/hr_HR/LC_MESSAGES/airtime.po airtime_mvc/locale/hu_HU/LC_MESSAGES/airtime.po airtime_mvc/locale/sr_RS/LC_MESSAGES/airtime.po airtime_mvc/locale/sr_RS@latin/LC_MESSAGES/airtime.po
This commit is contained in:
commit
fe20cc7f63
59 changed files with 51180 additions and 50667 deletions
|
@ -14,15 +14,17 @@ $(document).ready(function() {
|
|||
getDataAndPlot();
|
||||
|
||||
listenerstat_content.find("#his_submit").click(function(){
|
||||
startTimestamp = AIRTIME.utilities.fnGetTimestamp(dateStartId, timeStartId);
|
||||
endTimestamp = AIRTIME.utilities.fnGetTimestamp(dateEndId, timeEndId);
|
||||
getDataAndPlot(startTimestamp, endTimestamp);
|
||||
var oRange = AIRTIME.utilities.fnGetScheduleRange(dateStartId, timeStartId, dateEndId, timeEndId);
|
||||
var start = oRange.start;
|
||||
var end = oRange.end;
|
||||
|
||||
getDataAndPlot(start, end);
|
||||
});
|
||||
});
|
||||
|
||||
function getDataAndPlot(startTimestamp, endTimestamp){
|
||||
// get data
|
||||
$.get(baseUrl+'Listenerstat/get-data', {startTimestamp: startTimestamp, endTimestamp: endTimestamp}, function(data){
|
||||
$.get(baseUrl+'Listenerstat/get-data', {start: startTimestamp, end: endTimestamp}, function(data){
|
||||
out = new Object();
|
||||
$.each(data, function(mpName, v){
|
||||
plotData = new Object();
|
||||
|
|
|
@ -60,6 +60,30 @@ var AIRTIME = (function(AIRTIME) {
|
|||
oTableShow,
|
||||
inShowsTab = false;
|
||||
|
||||
function validateTimeRange() {
|
||||
var oRange,
|
||||
inputs = $('.his-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 {
|
||||
inputs.addClass('error');
|
||||
}
|
||||
|
||||
return {
|
||||
start: start,
|
||||
end: end,
|
||||
isValid: end >= start
|
||||
};
|
||||
}
|
||||
|
||||
function getSelectedLogItems() {
|
||||
var items = Object.keys(selectedLogItems);
|
||||
|
||||
|
@ -401,13 +425,12 @@ var AIRTIME = (function(AIRTIME) {
|
|||
return oTable;
|
||||
}
|
||||
|
||||
function showSummaryList() {
|
||||
function showSummaryList(start, end) {
|
||||
var url = baseUrl+"playouthistory/show-history-feed",
|
||||
oRange = AIRTIME.utilities.fnGetScheduleRange(dateStartId, timeStartId, dateEndId, timeEndId),
|
||||
data = {
|
||||
format: "json",
|
||||
start: oRange.start,
|
||||
end: oRange.end
|
||||
start: start,
|
||||
end: end
|
||||
};
|
||||
|
||||
$.post(url, data, function(json) {
|
||||
|
@ -460,7 +483,9 @@ var AIRTIME = (function(AIRTIME) {
|
|||
},
|
||||
always: function() {
|
||||
inShowsTab = true;
|
||||
showSummaryList();
|
||||
|
||||
var info = getStartEnd();
|
||||
showSummaryList(info.start, info.end);
|
||||
emptySelectedLogItems();
|
||||
}
|
||||
}
|
||||
|
@ -544,7 +569,8 @@ var AIRTIME = (function(AIRTIME) {
|
|||
dayNamesMin: i18n_days_short,
|
||||
onSelect: function(sDate, oDatePicker) {
|
||||
$(this).datepicker( "setDate", sDate );
|
||||
}
|
||||
},
|
||||
onClose: validateTimeRange
|
||||
};
|
||||
|
||||
oBaseTimePickerSettings = {
|
||||
|
@ -554,13 +580,25 @@ var AIRTIME = (function(AIRTIME) {
|
|||
showLeadingZero: false,
|
||||
defaultTime: '0:00',
|
||||
hourText: $.i18n._("Hour"),
|
||||
minuteText: $.i18n._("Minute")
|
||||
minuteText: $.i18n._("Minute"),
|
||||
onClose: validateTimeRange
|
||||
};
|
||||
|
||||
$historyContentDiv.find(dateStartId).datepicker(oBaseDatePickerSettings);
|
||||
$historyContentDiv.find(timeStartId).timepicker(oBaseTimePickerSettings);
|
||||
$historyContentDiv.find(dateEndId).datepicker(oBaseDatePickerSettings);
|
||||
$historyContentDiv.find(timeEndId).timepicker(oBaseTimePickerSettings);
|
||||
$historyContentDiv.find(dateStartId)
|
||||
.datepicker(oBaseDatePickerSettings)
|
||||
.blur(validateTimeRange);
|
||||
|
||||
$historyContentDiv.find(timeStartId)
|
||||
.timepicker(oBaseTimePickerSettings)
|
||||
.blur(validateTimeRange);
|
||||
|
||||
$historyContentDiv.find(dateEndId)
|
||||
.datepicker(oBaseDatePickerSettings)
|
||||
.blur(validateTimeRange);
|
||||
|
||||
$historyContentDiv.find(timeEndId)
|
||||
.timepicker(oBaseTimePickerSettings)
|
||||
.blur(validateTimeRange);
|
||||
|
||||
$historyContentDiv.on("click", "#his_create", function(e) {
|
||||
var url = baseUrl+"playouthistory/edit-list-item/format/json" ;
|
||||
|
@ -665,17 +703,16 @@ var AIRTIME = (function(AIRTIME) {
|
|||
});
|
||||
|
||||
$('body').on("click", "#his_instance_retrieve", function(e) {
|
||||
var startPicker = $hisDialogEl.find('#his_item_starts_datetimepicker').data('datetimepicker'),
|
||||
endPicker = $hisDialogEl.find('#his_item_ends_datetimepicker').data('datetimepicker'),
|
||||
var startPicker = $hisDialogEl.find('#his_item_starts'),
|
||||
endPicker = $hisDialogEl.find('#his_item_ends'),
|
||||
url = baseUrl+"playouthistory/show-history-feed",
|
||||
startDate = startPicker.getLocalDate(),
|
||||
endDate = endPicker.getLocalDate(),
|
||||
getEpochSeconds = AIRTIME.utilities.fnGetSecondsEpoch,
|
||||
startDate = startPicker.val(),
|
||||
endDate = endPicker.val(),
|
||||
data;
|
||||
|
||||
data = {
|
||||
start: getEpochSeconds(startDate),
|
||||
end: getEpochSeconds(endDate),
|
||||
start: startDate,
|
||||
end: endDate,
|
||||
format: "json"
|
||||
};
|
||||
|
||||
|
@ -710,18 +747,23 @@ var AIRTIME = (function(AIRTIME) {
|
|||
});
|
||||
});
|
||||
|
||||
function getStartEnd() {
|
||||
|
||||
return AIRTIME.utilities.fnGetScheduleRange(dateStartId, timeStartId, dateEndId, timeEndId);
|
||||
}
|
||||
|
||||
$historyContentDiv.find("#his_submit").click(function(ev){
|
||||
var fn,
|
||||
oRange;
|
||||
info;
|
||||
|
||||
oRange = AIRTIME.utilities.fnGetScheduleRange(dateStartId, timeStartId, dateEndId, timeEndId);
|
||||
info = getStartEnd();
|
||||
|
||||
fn = fnServerData;
|
||||
fn.start = oRange.start;
|
||||
fn.end = oRange.end;
|
||||
fn.start = info.start;
|
||||
fn.end = info.end;
|
||||
|
||||
if (inShowsTab) {
|
||||
showSummaryList();
|
||||
showSummaryList(info.start, info.end);
|
||||
}
|
||||
else {
|
||||
redrawTables();
|
||||
|
|
|
@ -46,7 +46,8 @@ AIRTIME = (function(AIRTIME) {
|
|||
showLeadingZero: false,
|
||||
defaultTime: '0:00',
|
||||
hourText: $.i18n._("Hour"),
|
||||
minuteText: $.i18n._("Minute")
|
||||
minuteText: $.i18n._("Minute"),
|
||||
onClose: validateTimeRange
|
||||
};
|
||||
|
||||
function setWidgetSize() {
|
||||
|
|
|
@ -35,75 +35,39 @@ var AIRTIME = (function(AIRTIME){
|
|||
};
|
||||
};
|
||||
|
||||
mod.fnGetSecondsEpoch = function(oDate) {
|
||||
var iTime,
|
||||
iUserOffset,
|
||||
iClientOffset;
|
||||
|
||||
iTime = oDate.getTime(); //value is in millisec.
|
||||
iTime = Math.round(iTime / 1000);
|
||||
iUserOffset = userTimezoneOffset;
|
||||
iClientOffset = oDate.getTimezoneOffset() * -60;//function returns minutes
|
||||
|
||||
//adjust for the fact the the Date object is in client time.
|
||||
iTime = iTime + iClientOffset + iUserOffset;
|
||||
|
||||
return iTime;
|
||||
};
|
||||
|
||||
/*
|
||||
* Get the schedule range start in unix timestamp form (in seconds).
|
||||
* defaults to NOW if nothing is selected.
|
||||
*
|
||||
* @param String sDatePickerId
|
||||
*
|
||||
* @param String sTimePickerId
|
||||
*
|
||||
* @return Number iTime
|
||||
*/
|
||||
mod.fnGetTimestamp = function(sDateId, sTimeId) {
|
||||
var date,
|
||||
time,
|
||||
temp;
|
||||
|
||||
temp = $(sDateId).val();
|
||||
if ( temp === "") {
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
date = temp;
|
||||
}
|
||||
|
||||
time = $(sTimeId).val();
|
||||
|
||||
date = date.split("-");
|
||||
time = time.split(":");
|
||||
|
||||
//0 based month in js.
|
||||
oDate = new Date(date[0], date[1]-1, date[2], time[0], time[1]);
|
||||
|
||||
return mod.fnGetSecondsEpoch(oDate);
|
||||
};
|
||||
|
||||
/*
|
||||
* Returns an object containing a unix timestamp in seconds for the start/end range
|
||||
*
|
||||
* @return Object {"start", "end", "range"}
|
||||
*/
|
||||
mod.fnGetScheduleRange = function(dateStart, timeStart, dateEnd, timeEnd) {
|
||||
var iStart,
|
||||
iEnd,
|
||||
iRange;
|
||||
mod.fnGetScheduleRange = function(dateStartId, timeStartId, dateEndId, timeEndId) {
|
||||
var start,
|
||||
end,
|
||||
time;
|
||||
|
||||
iStart = AIRTIME.utilities.fnGetTimestamp(dateStart, timeStart);
|
||||
iEnd = AIRTIME.utilities.fnGetTimestamp(dateEnd, timeEnd);
|
||||
start = $(dateStartId).val();
|
||||
start = start === "" ? null : start;
|
||||
|
||||
iRange = iEnd - iStart;
|
||||
time = $(timeStartId).val();
|
||||
time = time === "" ? "00:00" : time;
|
||||
|
||||
if (start) {
|
||||
start = start + " " + time;
|
||||
}
|
||||
|
||||
end = $(dateEndId).val();
|
||||
end = end === "" ? null : end;
|
||||
|
||||
time = $(timeEndId).val();
|
||||
time = time === "" ? "00:00" : time;
|
||||
|
||||
if (end) {
|
||||
end = end + " " + time;
|
||||
}
|
||||
|
||||
return {
|
||||
start: iStart,
|
||||
end: iEnd,
|
||||
range: iRange
|
||||
start: start,
|
||||
end: end
|
||||
};
|
||||
};
|
||||
|
||||
|
|
19
airtime_mvc/public/js/datatables/i18n/hr_HR.txt
Normal file
19
airtime_mvc/public/js/datatables/i18n/hr_HR.txt
Normal file
|
@ -0,0 +1,19 @@
|
|||
//Croatian
|
||||
|
||||
{
|
||||
"sProcessing": "Procesiram...",
|
||||
"sLengthMenu": "Prikaži _MENU_ rezultata po stranici",
|
||||
"sZeroRecords": "Ništa nije pronađeno",
|
||||
"sInfo": "Prikazano _START_ do _END_ od _TOTAL_ rezultata",
|
||||
"sInfoEmpty": "Prikazano 0 do 0 od 0 rezultata",
|
||||
"sInfoFiltered": "(filtrirano iz _MAX_ ukupnih rezultata)",
|
||||
"sInfoPostFix": "",
|
||||
"sSearch": "Filter",
|
||||
"sUrl": "",
|
||||
"oPaginate": {
|
||||
"sFirst": "Prva",
|
||||
"sPrevious": "Nazad",
|
||||
"sNext": "Naprijed",
|
||||
"sLast": "Zadnja"
|
||||
}
|
||||
}
|
19
airtime_mvc/public/js/datatables/i18n/sr_RS.txt
Normal file
19
airtime_mvc/public/js/datatables/i18n/sr_RS.txt
Normal file
|
@ -0,0 +1,19 @@
|
|||
//Serbian Cyrillic
|
||||
|
||||
{
|
||||
"sProcessing": "Обрада...",
|
||||
"sLengthMenu": "_MENU_ Резултати по страници",
|
||||
"sZeroRecords": "Ништа није пронађено",
|
||||
"sInfo": "Резултати: _START_ - _END_ Укупно: _TOTAL_",
|
||||
"sInfoEmpty": "Нула Резултат",
|
||||
"sInfoFiltered": "(филтрирано из _MAX_ укупних резултата)",
|
||||
"sInfoPostFix": "",
|
||||
"sSearch": "Филтер",
|
||||
"sUrl": "",
|
||||
"oPaginate": {
|
||||
"sFirst": "Прва",
|
||||
"sPrevious": "Назад",
|
||||
"sNext": "Напред",
|
||||
"sLast": "Задња"
|
||||
}
|
||||
}
|
19
airtime_mvc/public/js/datatables/i18n/sr_RS@latin.txt
Normal file
19
airtime_mvc/public/js/datatables/i18n/sr_RS@latin.txt
Normal file
|
@ -0,0 +1,19 @@
|
|||
//Serbian Latin
|
||||
|
||||
{
|
||||
"sProcessing": "Obrada...",
|
||||
"sLengthMenu": "_MENU_ Rezultati po stranici",
|
||||
"sZeroRecords": "Ništa nije pronađeno",
|
||||
"sInfo": "Rezultati: _START_ - _END_ Ukupno: _TOTAL_",
|
||||
"sInfoEmpty": "Nula Rezultat",
|
||||
"sInfoFiltered": "(filtrirano iz _MAX_ ukupnih rezultata)",
|
||||
"sInfoPostFix": "",
|
||||
"sSearch": "Filter",
|
||||
"sUrl": "",
|
||||
"oPaginate": {
|
||||
"sFirst": "Prva",
|
||||
"sPrevious": "Nazad",
|
||||
"sNext": "Napred",
|
||||
"sLast": "Zadnja"
|
||||
}
|
||||
}
|
25
airtime_mvc/public/js/plupload/i18n/hr_HR.js
Normal file
25
airtime_mvc/public/js/plupload/i18n/hr_HR.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
// Croatian
|
||||
plupload.addI18n({
|
||||
'Select files': 'Izaberite datoteke:',
|
||||
'Add files to the upload queue and click the start button.': 'Dodajte datoteke u listu i kliknite Upload.',
|
||||
'Filename': 'Ime datoteke',
|
||||
'Status': 'Status',
|
||||
'Size': 'Veličina',
|
||||
'Add files': 'Dodajte datoteke',
|
||||
'Stop current upload': 'Zaustavi trenutan upload',
|
||||
'Start uploading queue': 'Pokreni Upload',
|
||||
'Uploaded %d/%d files': 'Uploadano %d/%d datoteka',
|
||||
'N/A': 'N/A',
|
||||
'Drag files here.': 'Dovucite datoteke ovdje',
|
||||
'File extension error.': 'Greška ekstenzije datoteke.',
|
||||
'File size error.': 'Greška veličine datoteke.',
|
||||
'Init error.': 'Greška inicijalizacije.',
|
||||
'HTTP Error.': 'HTTP greška.',
|
||||
'Security error.': 'Sigurnosna greška.',
|
||||
'Generic error.': 'Generička greška.',
|
||||
'IO error.': 'I/O greška.',
|
||||
'Stop Upload': 'Zaustavi upload.',
|
||||
'Add Files': 'Dodaj datoteke',
|
||||
'Start Upload': 'Pokreni upload.',
|
||||
'%d files queued': '%d datoteka na čekanju.'
|
||||
});
|
14
airtime_mvc/public/js/plupload/i18n/sr_RS.js
Normal file
14
airtime_mvc/public/js/plupload/i18n/sr_RS.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
// Serbian Cyrillic
|
||||
plupload.addI18n({
|
||||
'Select files' : 'Изаберите фајлове',
|
||||
'Add files to the upload queue and click the start button.' : 'Додајте фајлове у листу и кликните на дугме Старт.',
|
||||
'Filename' : 'Назив фајла',
|
||||
'Status' : 'Status',
|
||||
'Size' : 'Величина',
|
||||
'Add Files' : 'Додај фајлове',
|
||||
'Stop current upload' : 'Заустави upload',
|
||||
'Start uploading queue' : 'Почни upload',
|
||||
'Drag files here.' : 'Превуци фајлове овде.',
|
||||
'Start Upload': 'Почни upload',
|
||||
'Uploaded %d/%d files': 'Снимљено %d/%d фајлова'
|
||||
});
|
14
airtime_mvc/public/js/plupload/i18n/sr_RS@latin.js
Normal file
14
airtime_mvc/public/js/plupload/i18n/sr_RS@latin.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
// Serbian Latin
|
||||
plupload.addI18n({
|
||||
'Select files' : 'Izaberite fajlove',
|
||||
'Add files to the upload queue and click the start button.' : 'Dodajte fajlove u listu i kliknite na dugme Start.',
|
||||
'Filename' : 'Naziv fajla',
|
||||
'Status' : 'Status',
|
||||
'Size' : 'Veličina',
|
||||
'Add Files' : 'Dodaj fajlove',
|
||||
'Stop current upload' : 'Zaustavi upload',
|
||||
'Start uploading queue' : 'Počni upload',
|
||||
'Drag files here.' : 'Prevucite fajlove ovde.',
|
||||
'Start Upload': 'Počni upload',
|
||||
'Uploaded %d/%d files': 'Snimljeno %d/%d fajlova'
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue