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/conditionalPageLength/dataTables.conditionalPageL...

2 lines
1.4 KiB
JavaScript

/*! © SpryMedia Ltd, Garrett Hyder - datatables.net/license */
!function(t){var i,o;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return t(e,window,document)}):"object"==typeof exports?(i=require("jquery"),o=function(e,n){n.fn.dataTable||require("datatables.net")(e,n)},"undefined"==typeof window?module.exports=function(e,n){return e=e||window,n=n||i(e),o(e,n),t(n,0,e.document)}:(o(window,i),module.exports=t(i,window,window.document))):t(jQuery,window,document)}(function(r,e,n){"use strict";var i=r.fn.dataTable;return r(n).on("init.dt",function(e,n){var o,a,d,s,t;"dt"===e.namespace&&(e=n.oInit.conditionalPageLength||i.defaults.conditionalPageLength,t=n.aLengthMenu||i.defaults.lengthMenu,t=(t=Array.isArray(t[0])?t[0]:t).filter(function(e){return 0<e}),o=Math.min.apply(Math,t),r.isPlainObject(e)||!0===e)&&(a=r.isPlainObject(e)?e:{},d=new i.Api(n),s=500,void 0!==a.speed&&(s=a.speed),(t=function(e){var n=r(d.table().container()).find("div.dt-length"),t=d.page.info().pages,i=d.rows({search:"applied"}).count();e instanceof r.Event?t<=1&&i<=o?"fade"===a.style?n.stop().fadeTo(s,0):n.css("visibility","hidden"):"fade"===a.style?n.stop().fadeTo(s,1):n.css("visibility",""):t<=1&&i<=o&&("fade"===a.style?n.css("opacity",0):n.css("visibility","hidden")),a.conditionalOptions&&n.find("select option").each(function(e){parseInt(r(this).attr("value"),10)>i?r(this).hide():r(this).show()})})(null),d.on("draw.dt",t))}),i});