Skip to content

Commit

Permalink
filter in report fix, 1 missing translation
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosKozak committed Sep 22, 2015
1 parent ec74763 commit d36d05b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
3 changes: 3 additions & 0 deletions lib/language.js
Original file line number Diff line number Diff line change
Expand Up @@ -4088,6 +4088,9 @@ function init() {
,sv: 'Nyast först'
,bg: 'Новите най-отгоре'
}
,'All sensor events' : {
cs: 'Všechny události sensoru'
}

};

Expand Down
15 changes: 6 additions & 9 deletions static/report/js/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@

function display() {
var count = 0;
sorteddaystoshow = [];
$('#info').html('<b>'+translate('Loading')+' ...</b>');
for (var d in daystoshow) {
if (daystoshow[d]===matchesneeded) {
Expand Down Expand Up @@ -421,14 +422,10 @@
console.log('Total: ', daystoshow, 'Matches needed: ', matchesneeded, 'Will be loaded: ', dayscount);
}

function dataLoadedCallback () {
function dataLoadedCallback (day) {
loadeddays++;
sorteddaystoshow.push(day);
if (loadeddays === dayscount) {
// sort array
sorteddaystoshow = [];
Object.keys(daystoshow).forEach(function (day) {
sorteddaystoshow.push(day);
});
sorteddaystoshow.sort();
if (options.order === report_plugins.consts.ORDER_NEWESTONTOP) {
sorteddaystoshow.reverse();
Expand All @@ -448,7 +445,7 @@
// prepare some data used in more reports
datastorage.allstatsrecords = [];
datastorage.alldays = 0;
Object.keys(daystoshow).forEach(function (day) {
sorteddaystoshow.forEach(function eachDay(day) {
datastorage.allstatsrecords = datastorage.allstatsrecords.concat(datastorage[day].statsrecords);
datastorage.alldays++;
});
Expand Down Expand Up @@ -490,7 +487,7 @@
function loadData(day, options, callback) {
// check for loaded data
if (datastorage[day] && day !== moment().format('YYYY-MM-DD')) {
callback();
callback(day);
return;
}
// patientData = [actual, predicted, mbg, treatment, cal, devicestatusData];
Expand Down Expand Up @@ -635,7 +632,7 @@


datastorage[day] = data;
callback();
callback(day);
}

function maybePrevent(event) {
Expand Down

0 comments on commit d36d05b

Please sign in to comment.