Skip to content
Snippets Groups Projects
Verified Commit 3b39205b authored by Manuel Herrmann's avatar Manuel Herrmann
Browse files

fix order of dates in admin meldeliste; Actually fixes #28

parent 8788e35b
No related branches found
No related tags found
1 merge request!19fix order of dates in admin meldeliste
......@@ -130,7 +130,7 @@ class AdminListPage extends AdminPage {
$thead .= '<th>toWaitlist</th>';
$toggle .= '<a class="toggle-vis" data-column=\'15\'>toWaitlist</a> - ';
$people = $this->fahrt->getBachelors(['waiting'=>false]);
$people = $this->fahrt->getBachelors(['waiting'=>false], ['anm_time' => 'ASC']);
$tbody = '';
foreach ($people as $b) {
$tbody .= '
......@@ -170,6 +170,7 @@ class AdminListPage extends AdminPage {
<p></p>
</div>
<script type="text/javascript">
deDateRegExp = new RegExp(".*([0-9]{1,2})\.([0-9]{1,2})\.([0-9]{4}).*");
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
"link-pre": function ( a ) {
return a.match(/<a [^>]+>([^<]+)<\/a>/)[1];
......@@ -179,9 +180,10 @@ class AdminListPage extends AdminPage {
return ((tmp[0]==0) ? "0" : "1") + ((tmp[1]==0) ? "0" : "1") + ((tmp[2]==0) ? "0" : "1");
},
"dedate-pre": function( a ) {
var tmp = a.split(".");
if(tmp.length>2)
return (tmp[2]+tmp[1]+tmp[0]);
var tmp = deDateRegExp.exec(a);
if(tmp) {
return (tmp[3]+tmp[2]+tmp[1]);
}
return a;
}
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment