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.
Plugins/features/lengthLinks/dataTables.lengthLinks.min.js

2 lines
1.3 KiB
JavaScript

/*! © SpryMedia Ltd - datatables.net/license */
!function(t){var a,i;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(n){return t(n,window,document)}):"object"==typeof exports?(a=require("jquery"),i=function(n,e){e.fn.dataTable||require("datatables.net")(n,e)},"undefined"==typeof window?module.exports=function(n,e){return n=n||window,e=e||a(n),i(n,e),t(e,0,n.document)}:(i(window,a),module.exports=t(a,window,window.document))):t(jQuery,window,document)}(function(u,n,e,t){"use strict";var a=u.fn.dataTable;return a.LengthLinks=function(n){var i=new a.Api(n),e=i.settings()[0],r=u("<div></div>").addClass(e.oClasses.sLength),o=null;this.container=function(){return r[0]},r.on("click.dtll","a",function(n){n.preventDefault(),i.page.len(+u(this).data("length")).draw(!1)}),i.on("draw",function(){var t,a,n;i.page.len()!==o&&(n=e.aLengthMenu,t=2===n.length&&Array.isArray(n[0])?n[1]:n,a=2===n.length&&Array.isArray(n[0])?n[0]:n,n=u.map(a,function(n,e){return n==i.page.len()?'<a class="active" data-length="'+a[e]+'">'+t[e]+"</a>":'<a data-length="'+a[e]+'">'+t[e]+"</a>"}),r.html(e.oLanguage.sLengthMenu.replace("_MENU_",n.join(" | "))),o=i.page.len())}),i.on("destroy",function(){r.off("click.dtll","a")})},a.ext.feature.push({fnInit:function(n){return new a.LengthLinks(n).container()},cFeature:"L",sFeature:"LengthLinks"}),a});