56 lines
2.5 KiB
PHP
56 lines
2.5 KiB
PHP
<?php
|
|
echo '<h4 style="margin-left: 30px;">US 2018 - Stand: ' . $time->i18nFormat('dd.MM.yyyy HH:mm') . '</h4>';
|
|
?>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function(){
|
|
var origin = window.location.origin;
|
|
console.log(origin);
|
|
if (origin == 'http://km-pc-asd-ap.stmukwk.bayern.de') {
|
|
jsonurl = '/files/data-us.json';
|
|
}
|
|
else {
|
|
jsonurl = '/asd-control/files/data-us.json';
|
|
}
|
|
$.getJSON(jsonurl, function(mps) {
|
|
$("#output").pivotUI(mps, {
|
|
rows: ["Schulart"],
|
|
cols: ["Übermittlungsstatus"],
|
|
autoSortUnusedAttrs: true,
|
|
sorters:{
|
|
Übermittlungsstatus: $.pivotUtilities.sortAs(
|
|
["n. überm. (kein Liefervers.)", "Schulaufs. abgelehnt", "übermittelt (PL-Fehler)", "n. überm. (Lieferversuch)" , "übermittelt (keine PL-Fehler)", "abgegeben", "Schulaufs. freigegeben"]
|
|
)},
|
|
rendererOptions: {
|
|
table: {
|
|
clickCallback: function(e, value, filters, pivotData){
|
|
//console.log(filters);
|
|
$( "#heading").text(filters.Schulart + ' - ' + filters.Übermittlungsstatus);
|
|
var names = [];
|
|
pivotData.forEachMatchingRecord(filters,
|
|
function(record){ names.push(record.Schule + ' (' + record.Datum.substring(0,10) + ' ' + record.Datum.substring(11,19) + ')'); });
|
|
//alert(pivotData.getColKeys());
|
|
//alert(pivotData.colKeys);
|
|
//pivotData.colKeys.push('Hallo');
|
|
//alert(pivotData.colKeys);
|
|
//pivotData.applyFilter();
|
|
//alert(names.join("\n"));
|
|
list = '<ul>';
|
|
$.each(names, function() {
|
|
list += '<li>' + this + '</li>';
|
|
});
|
|
list += '</ul>';
|
|
$( "#schools" ).html(list);
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
|
|
</script>
|
|
|
|
<div id="output" style="margin-left: 30px;"></div>
|
|
<p id="heading" style="margin-left: 30px;font-weight: bold;"><p>
|
|
<div id="schools" style="margin-left: 30px;"></div>
|