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.5 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){"use strict";var t=u.fn.dataTable;return t.LengthLinks=function(n){var i=new t.Api(n),e=i.settings()[0],r=u("<div></div>").addClass("dt-lengthLinks"),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(" | ")).replace("_ENTRIES_",i.i18n("entries","",10))),o=i.page.len())}),i.on("destroy",function(){r.off("click.dtll","a")})},t.ext.feature.push({fnInit:function(n){return new t.LengthLinks(n).container()},cFeature:"L",sFeature:"LengthLinks"}),t.feature.register("lengthLinks",function(n){return new t.LengthLinks(n).container()}),t});