You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
1.6 KiB
JavaScript
2 lines
1.6 KiB
JavaScript
/*! © SpryMedia Ltd - datatables.net/license */
|
|
!function(e){"function"==typeof define&&define.amd?define(["datatables.net"],function(t){return e(t,window,document)}):"object"==typeof exports?module.exports=function(t,a){return t=t||window,a.fn.dataTable||require("datatables.net")(t,a),e(a,0,t.document)}:e(jQuery,window,document)}(function(t,a,e,r){"use strict";function o(t){Array.isArray(t)||(t=[t]);for(var o={name:"absoluteOrder"+s++,alwaysTop:{},alwaysBottom:{},asc:function(t,a,e){},desc:function(t,a,e){}},a=0,e=t.length;a<e;a++){var n=t[a];"string"==typeof n?o.alwaysTop[n]=!0:n.position===r||"top"===n.position?o.alwaysTop[n.value]=!0:o.alwaysBottom[n.value]=!0}return o.asc=function(t,a,e){return o.alwaysTop[t]&&o.alwaysTop[a]||o.alwaysBottom[t]&&o.alwaysBottom[a]?0:o.alwaysTop[t]||o.alwaysBottom[a]?-1:o.alwaysBottom[t]||o.alwaysTop[a]?1:(e&&("string"==typeof t&&(t=+t.replace(/[^\d\-\.]/g,"")),"string"==typeof a)&&(a=+a.replace(/[^\d\-\.]/g,"")),t<a?-1:a<t?1:0)},o.desc=function(t,a,e){return o.alwaysTop[t]&&o.alwaysTop[a]||o.alwaysBottom[t]&&o.alwaysBottom[a]?0:o.alwaysTop[t]||o.alwaysBottom[a]?-1:o.alwaysBottom[t]||o.alwaysTop[a]||(e&&("string"==typeof t&&(t=+t.replace(/[^\d\-\.]/g,"")),"string"==typeof a)&&(a=+a.replace(/[^\d\-\.]/g,"")),t<a)?1:a<t?-1:0},o}var n=t.fn.dataTable,s=0;return n.absoluteOrder=function(t){t=o(t);return n.ext.type.order[t.name+"-asc"]=t.asc,n.ext.type.order[t.name+"-desc"]=t.desc,t.name},n.absoluteOrderNumber=function(t){var e=o(t);return n.ext.type.order[e.name+"-asc"]=function(t,a){return e.asc(t,a,!0)},n.ext.type.order[e.name+"-desc"]=function(t,a){return e.desc(t,a,!0)},e.name},n}); |