Changes

Jump to navigation Jump to search
no edit summary
Line 7: Line 7:     
To do:
 
To do:
* Add 2015 and 2016 mentions
   
* Improve presentation. Maybe separate by year and add a table of content?
 
* Improve presentation. Maybe separate by year and add a table of content?
 
* Add press kit / link to press kit (e.g. key facts, photos etc.)
 
* Add press kit / link to press kit (e.g. key facts, photos etc.)
Line 35: Line 34:  
<!-- 2016 -->
 
<!-- 2016 -->
    +
<li><a href="http://rue89.nouvelobs.com/2016/01/27/doliprane-enfants-gout-fraise-cancer-soyons-serieux-262980">Rue89</a> - "Le Doliprane des enfants, goût fraise et cancer ? Soyons sérieux" - 27/01/2016</li>
 
<li><a href="http://sante.lefigaro.fr/actualite/2016/01/06/24466-nouvelle-appli-revele-sucre-cache-dans-nos-aliments">Le Figaro Santé</a> - "Une nouvelle appli révèle le sucre caché dans nos aliments" - 06/01/2016</li>
 
<li><a href="http://sante.lefigaro.fr/actualite/2016/01/06/24466-nouvelle-appli-revele-sucre-cache-dans-nos-aliments">Le Figaro Santé</a> - "Une nouvelle appli révèle le sucre caché dans nos aliments" - 06/01/2016</li>
   Line 202: Line 202:  
<scripts>
 
<scripts>
 
<script src="/js/jquery.dataTables.min.js"></script>
 
<script src="/js/jquery.dataTables.min.js"></script>
<script>
+
</scripts>
function trim(str) {
+
 
                        str = str.replace(/^\s+/, '');
+
<header>
                        for (var i = str.length - 1; i >= 0; i--) {
+
<link rel="stylesheet" href="/js/datatables.css" />
                                if (/\S/.test(str.charAt(i))) {
+
</header>
                                        str = str.substring(0, i + 1);
+
 
                                        break;
+
<initjs>
                                }
+
 
                        }
+
 
                        return str;
+
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
                }
+
    "date-euro-pre": function ( a ) {
+
         if ($.trim(a) != '') {
function dateHeight(dateStr){
+
                 var frDate = a;
         if (trim(dateStr) != '') {
  −
                 var frDate = trim(dateStr).split(' ');
  −
                var frTime = frDate[1].split(':');
   
                 var frDateParts = frDate[0].split('/');
 
                 var frDateParts = frDate[0].split('/');
 
                 var day = frDateParts[0] * 60 * 24;
 
                 var day = frDateParts[0] * 60 * 24;
 
                 var month = frDateParts[1] * 60 * 24 * 31;
 
                 var month = frDateParts[1] * 60 * 24 * 31;
 
                 var year = frDateParts[2] * 60 * 24 * 366;
 
                 var year = frDateParts[2] * 60 * 24 * 366;
                 var hour = frTime[0] * 60;
+
                 var hour = 0;
                 var minutes = frTime[1];
+
                 var minutes = 0;
 
                 var x = day+month+year+hour+minutes;
 
                 var x = day+month+year+hour+minutes;
 
         } else {
 
         } else {
                var x = 99999999999999999; //GoHorse!
+
           
 +
            var x = new Date(0,0,0,0,0,0);
 +
           
 
         }
 
         }
 +
         
 
         return x;
 
         return x;
}
+
    },
+
 
                jQuery.fn.dataTableExt.oSort['date-euro-asc'] = function(a, b) {
+
    "date-euro-asc": function ( a, b ) {
                        var x = dateHeight(a);
+
        return a > b;
                        var y = dateHeight(b);
+
    },
                        var z = ((x < y) ? -1 : ((x > y) ? 1 : 0));
+
 
                        return z;
+
    "date-euro-desc": function ( a, b ) {
                };
+
        return b > a;
+
    }
                jQuery.fn.dataTableExt.oSort['date-euro-desc'] = function(a, b) {
+
} );
                        var x = dateHeight(a);
  −
                        var y = dateHeight(b);
  −
                        var z = ((x < y) ? 1 : ((x > y) ? -1 : 0));
  −
                        return z;
  −
                };
  −
     −
</script>
  −
</scripts>
     −
<header>
+
<link rel="stylesheet" href="/js/datatables.css" />
  −
</header>
  −
 
  −
<initjs>
   
press_datatable = $('#press_table').dataTable({
 
press_datatable = $('#press_table').dataTable({
 
"bJQueryUI": true,
 
"bJQueryUI": true,
 
"bPaginate": false,
 
"bPaginate": false,
 
"aaSorting": [],
 
"aaSorting": [],
aoColumnDefs: {
+
 
        target: [3], // change to whichever column you need. indexed at 0
+
"aoColumns": [
        sType: "date-euro"
+
                                null,
    },
+
                                null,
 +
                                null,
 +
                                { "sType": "date-euro"}
 +
                        ],
 
"oLanguage": {
 
"oLanguage": {
 
"sSearch": "Recherche :",
 
"sSearch": "Recherche :",
657

edits

Navigation menu