Advertisement
Guest User

Untitled

a guest
Oct 1st, 2014
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. jQuery.extend( jQuery.fn.dataTableExt.oSort, {
  2. "date-euro-pre": function ( a ) {
  3. var x;
  4. if ( $.trim(a) !== '' ) {
  5. var frDatea = $.trim(a).split(' ');
  6. var frTimea = frDatea[1].split(':');
  7. var frDatea2 = frDatea[0].split('/');
  8. x = (frDatea2[2] + frDatea2[1] + frDatea2[0] + frTimea[0] + frTimea[1] + frTimea[2]) * 1;
  9. }
  10. else {
  11. x = Infinity;
  12. }
  13. return x;
  14. },
  15. "date-euro-asc": function ( a, b ) {
  16. return a - b;
  17. },
  18. "date-euro-desc": function ( a, b ) {
  19. return b - a;
  20. }
  21. } );
  22.  
  23. var oTable = jQuery('.dataTable').dataTable({
  24. "iDisplayLength": 10,
  25. "aaSorting": [[ 1, "asc" ]],
  26. "bFilter": true,
  27. "bRetrieve":true,
  28. "columns" : columnDefs,
  29. "aoColumns": columnSort,
  30. "aLengthMenu": [
  31. [10, 25, 50, 100, -1],
  32. [10, 25, 50, 100, "tous"]
  33. ]});
  34.  
  35. columnDefs = [null, null, null, null, null, Object { sType="date-euro"}, null, null](ligne 940)
  36. columnSort = [Object { bSortable=false}, null, null, null, null, null, Object { bSortable=false}, Object { bSortable=false}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement