Changes

Jump to navigation Jump to search
no edit summary
Line 202: Line 202:  
<scripts>
 
<scripts>
 
<script src="/js/jquery.dataTables.min.js"></script>
 
<script src="/js/jquery.dataTables.min.js"></script>
 +
<script>
 +
 +
1
 +
2
 +
3
 +
4
 +
5
 +
6
 +
7
 +
8
 +
9
 +
10
 +
11
 +
12
 +
13
 +
14
 +
15
 +
16
 +
17
 +
18
 +
19
 +
20
 +
21
 +
22
 +
23
 +
24
 +
25
 +
26
 +
27
 +
28
 +
29
 +
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
 +
    "date-euro-pre": function ( a ) {
 +
        if ($.trim(a) != '') {
 +
           
 +
            var frDatea = $.trim(a).split(' ');
 +
           
 +
            var frTimea = frDatea[1].split(':'); // hh:mm:ss
 +
           
 +
            var frDatea2 = frDatea[0].split('-'); // YYYY-MM-DD
 +
           
 +
            var x = new Date(frDatea2[2],frDatea2[1]-1,frDatea2[0],frTimea[0],frTimea[1],frTimea[2]);
 +
 +
        } else {
 +
           
 +
            var x = new Date(0,0,0,0,0,0);
 +
           
 +
        }
 +
         
 +
        return x;
 +
    },
 +
 
 +
    "date-euro-asc": function ( a, b ) {
 +
        return a > b;
 +
    },
 +
 
 +
    "date-euro-desc": function ( a, b ) {
 +
        return b > a;
 +
    }
 +
} );
 +
</script>
 
</scripts>
 
</scripts>
   Line 213: Line 274:  
"bPaginate": false,
 
"bPaginate": false,
 
"aaSorting": [],
 
"aaSorting": [],
 +
aoColumnDefs: {
 +
        target: [3], // change to whichever column you need. indexed at 0
 +
        sType: "date-euro"
 +
    },
 
"oLanguage": {
 
"oLanguage": {
 
"sSearch": "Recherche :",
 
"sSearch": "Recherche :",
Line 224: Line 289:  
<table id="press_table">
 
<table id="press_table">
   −
<thead><tr><th>Type</th><th>Titre</th><th>Media</th><th>Date</th><th>Année</th></tr></thead>
+
<thead><tr><th>Type</th><th>Titre</th><th>Media</th><th>Date</th></tr></thead>
 
<tbody>
 
<tbody>
   Line 235: Line 300:  
<td>Le Figaro Santé</td>
 
<td>Le Figaro Santé</td>
 
<td>06/01/2016</td>
 
<td>06/01/2016</td>
<td>2016</td>
   
</tr>
 
</tr>
   Line 247: Line 311:  
<td>La Gazette des Communes</td>
 
<td>La Gazette des Communes</td>
 
<td>02/12/2015</td>
 
<td>02/12/2015</td>
<td>2015</td>
   
</tr>
 
</tr>
   Line 255: Line 318:  
<td>L'Usine Digitale.fr</td>
 
<td>L'Usine Digitale.fr</td>
 
<td>24/11/2015</td>
 
<td>24/11/2015</td>
<td>2015</td>
   
</tr>
 
</tr>
  

Navigation menu