Loading htdocs/_i18n/en/pages/devices.html +1 −1 Original line number Diff line number Diff line Loading @@ -395,7 +395,7 @@ {% assign release_date_array = release_date_array | push: date[0] %} {% endif %} {% assign releasedates = release_date_array | uniq %} <td class="release" data-order="{{ releasedates[0] }} "> <td class="release" data-order="{{ releasedates | array_to_sentence_string: ',' }}"> <ul class="list-unstyled"> {% for releasedate in releasedates %} <li>{{ releasedate }}</li> Loading htdocs/_includes/scripts.html +1 −0 Original line number Diff line number Diff line Loading @@ -5,3 +5,4 @@ <script src="/assets/js/bootstrap.min.js"></script> <script src="/assets/js/code.js"></script> <script src="/assets/js/search.js"></script> <script src="/assets/js/numeric-comma.js"></script> htdocs/assets/js/code.js +3 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,9 @@ $(document).ready(function() { fixedHeader: true, bFilter: false, info: false, columnDefs: [ { type: 'numeric-comma', targets: 4 } ], "columns": [ null, null, Loading htdocs/assets/js/numeric-comma.js 0 → 100644 +37 −0 Original line number Diff line number Diff line /** * It is not uncommon for non-English speaking countries to use a comma for a * decimal place. This sorting plug-in shows how that can be taken account of in * sorting by adding the type `numeric-comma` to DataTables. A type detection * plug-in for this sorting method is provided below. * * Please note that the 'Formatted numbers' type detection and sorting plug-ins * offer greater flexibility that this plug-in and should be used in preference * to this method. * * @name Commas for decimal place * @summary Sort numbers correctly which use a comma as the decimal place. * @deprecated * @author [Allan Jardine](http://sprymedia.co.uk) * * @example * $('#example').dataTable( { * columnDefs: [ * { type: 'numeric-comma', targets: 0 } * ] * } ); */ jQuery.extend( jQuery.fn.dataTableExt.oSort, { "numeric-comma-pre": function ( a ) { var x = (a == "-") ? 0 : a.replace( /,/, "." ); return parseFloat( x ); }, "numeric-comma-asc": function ( a, b ) { return ((a < b) ? -1 : ((a > b) ? 1 : 0)); }, "numeric-comma-desc": function ( a, b ) { return ((a < b) ? 1 : ((a > b) ? -1 : 0)); } } ); Loading
htdocs/_i18n/en/pages/devices.html +1 −1 Original line number Diff line number Diff line Loading @@ -395,7 +395,7 @@ {% assign release_date_array = release_date_array | push: date[0] %} {% endif %} {% assign releasedates = release_date_array | uniq %} <td class="release" data-order="{{ releasedates[0] }} "> <td class="release" data-order="{{ releasedates | array_to_sentence_string: ',' }}"> <ul class="list-unstyled"> {% for releasedate in releasedates %} <li>{{ releasedate }}</li> Loading
htdocs/_includes/scripts.html +1 −0 Original line number Diff line number Diff line Loading @@ -5,3 +5,4 @@ <script src="/assets/js/bootstrap.min.js"></script> <script src="/assets/js/code.js"></script> <script src="/assets/js/search.js"></script> <script src="/assets/js/numeric-comma.js"></script>
htdocs/assets/js/code.js +3 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,9 @@ $(document).ready(function() { fixedHeader: true, bFilter: false, info: false, columnDefs: [ { type: 'numeric-comma', targets: 4 } ], "columns": [ null, null, Loading
htdocs/assets/js/numeric-comma.js 0 → 100644 +37 −0 Original line number Diff line number Diff line /** * It is not uncommon for non-English speaking countries to use a comma for a * decimal place. This sorting plug-in shows how that can be taken account of in * sorting by adding the type `numeric-comma` to DataTables. A type detection * plug-in for this sorting method is provided below. * * Please note that the 'Formatted numbers' type detection and sorting plug-ins * offer greater flexibility that this plug-in and should be used in preference * to this method. * * @name Commas for decimal place * @summary Sort numbers correctly which use a comma as the decimal place. * @deprecated * @author [Allan Jardine](http://sprymedia.co.uk) * * @example * $('#example').dataTable( { * columnDefs: [ * { type: 'numeric-comma', targets: 0 } * ] * } ); */ jQuery.extend( jQuery.fn.dataTableExt.oSort, { "numeric-comma-pre": function ( a ) { var x = (a == "-") ? 0 : a.replace( /,/, "." ); return parseFloat( x ); }, "numeric-comma-asc": function ( a, b ) { return ((a < b) ? -1 : ((a > b) ? 1 : 0)); }, "numeric-comma-desc": function ( a, b ) { return ((a < b) ? 1 : ((a > b) ? -1 : 0)); } } );