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 { ...@@ -130,7 +130,7 @@ class AdminListPage extends AdminPage {
$thead .= '<th>toWaitlist</th>'; $thead .= '<th>toWaitlist</th>';
$toggle .= '<a class="toggle-vis" data-column=\'15\'>toWaitlist</a> - '; $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 = ''; $tbody = '';
foreach ($people as $b) { foreach ($people as $b) {
$tbody .= ' $tbody .= '
...@@ -170,6 +170,7 @@ class AdminListPage extends AdminPage { ...@@ -170,6 +170,7 @@ class AdminListPage extends AdminPage {
<p></p> <p></p>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
deDateRegExp = new RegExp(".*([0-9]{1,2})\.([0-9]{1,2})\.([0-9]{4}).*");
jQuery.extend( jQuery.fn.dataTableExt.oSort, { jQuery.extend( jQuery.fn.dataTableExt.oSort, {
"link-pre": function ( a ) { "link-pre": function ( a ) {
return a.match(/<a [^>]+>([^<]+)<\/a>/)[1]; return a.match(/<a [^>]+>([^<]+)<\/a>/)[1];
...@@ -179,9 +180,10 @@ class AdminListPage extends AdminPage { ...@@ -179,9 +180,10 @@ class AdminListPage extends AdminPage {
return ((tmp[0]==0) ? "0" : "1") + ((tmp[1]==0) ? "0" : "1") + ((tmp[2]==0) ? "0" : "1"); return ((tmp[0]==0) ? "0" : "1") + ((tmp[1]==0) ? "0" : "1") + ((tmp[2]==0) ? "0" : "1");
}, },
"dedate-pre": function( a ) { "dedate-pre": function( a ) {
var tmp = a.split("."); var tmp = deDateRegExp.exec(a);
if(tmp.length>2) if(tmp) {
return (tmp[2]+tmp[1]+tmp[0]); return (tmp[3]+tmp[2]+tmp[1]);
}
return a; 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