META-INF.resources.bower_components.datatables.net-autofill.js.dataTables.autoFill.min.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jwebmp-data-tables Show documentation
Show all versions of jwebmp-data-tables Show documentation
The JWebSwing implementation for Data Tables
/*!
AutoFill 2.3.2
©2008-2018 SpryMedia Ltd - datatables.net/license
*/
(function(f){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(j){return f(j,window,document)}):"object"===typeof exports?module.exports=function(j,k){j||(j=window);if(!k||!k.fn.dataTable)k=require("datatables.net")(j,k).$;return f(k,j,j.document)}:f(jQuery,window,document)})(function(f,j,k,q){var l=f.fn.dataTable,s=0,i=function(b,c){if(!l.versionCheck||!l.versionCheck("1.10.8"))throw"Warning: AutoFill requires DataTables 1.10.8 or greater";this.c=f.extend(!0,{},l.defaults.autoFill,
i.defaults,c);this.s={dt:new l.Api(b),namespace:".autoFill"+s++,scroll:{},scrollInterval:null,handle:{height:0,width:0},enabled:!1};this.dom={handle:f(''),select:{top:f(''),right:f(''),bottom:f(''),left:f('')},background:f(''),list:f(''+this.s.dt.i18n("autoFill.info",
"")+"
"),dtScroll:null,offsetParent:null};this._constructor()};f.extend(i.prototype,{enabled:function(){return this.s.enabled},enable:function(b){var c=this;if(!1===b)return this.disable();this.s.enabled=!0;this._focusListener();this.dom.handle.on("mousedown",function(a){c._mousedown(a);return!1});return this},disable:function(){this.s.enabled=!1;this._focusListenerRemove();return this},_constructor:function(){var b=this,c=this.s.dt,a=f("div.dataTables_scrollBody",this.s.dt.table().container());
c.settings()[0].autoFill=this;a.length&&(this.dom.dtScroll=a,"static"===a.css("position")&&a.css("position","relative"));!1!==this.c.enable&&this.enable();c.on("destroy.autoFill",function(){b._focusListenerRemove()})},_attach:function(b){var c=this.s.dt,a=c.cell(b).index(),d=this.dom.handle,e=this.s.handle;if(!a||-1===c.columns(this.c.columns).indexes().indexOf(a.column))this._detach();else{this.dom.offsetParent||(this.dom.offsetParent=f(c.table().node()).offsetParent());if(!e.height||!e.width)d.appendTo("body"),
e.height=d.outerHeight(),e.width=d.outerWidth();c=this._getPosition(b,this.dom.offsetParent);this.dom.attachedTo=b;d.css({top:c.top+b.offsetHeight-e.height,left:c.left+b.offsetWidth-e.width}).appendTo(this.dom.offsetParent)}},_actionSelector:function(b){var c=this,a=this.s.dt,d=i.actions,e=[];f.each(d,function(c,d){d.available(a,b)&&e.push(c)});if(1===e.length&&!1===this.c.alwaysAsk){var h=d[e[0]].execute(a,b);this._update(h,b)}else{var g=this.dom.list.children("ul").empty();e.push("cancel");f.each(e,
function(e,h){g.append(f("").append(''+d[h].option(a,b)+"