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