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.1
* ©2008-2018 SpryMedia Ltd - datatables.net/license
*/
(function(a){if(typeof define==="function"&&define.amd){define(["jquery","datatables.net"],function(b){return a(b,window,document)})}else{if(typeof exports==="object"){module.exports=function(b,c){if(!b){b=window}if(!c||!c.fn.dataTable){c=require("datatables.net")(b,c).$}return a(c,b,b.document)}}else{a(jQuery,window,document)}}}(function(g,e,a,h){var f=g.fn.dataTable;var c=0;var d=function(j,i){if(!f.versionCheck||!f.versionCheck("1.10.8")){throw ("Warning: AutoFill requires DataTables 1.10.8 or greater")}this.c=g.extend(true,{},f.defaults.autoFill,d.defaults,i);this.s={dt:new f.Api(j),namespace:".autoFill"+(c++),scroll:{},scrollInterval:null,handle:{height:0,width:0},enabled:false};this.dom={handle:g(''),select:{top:g(''),right:g(''),bottom:g(''),left:g('')},background:g(''),list:g(''+this.s.dt.i18n("autoFill.info","")+"
"),dtScroll:null,offsetParent:null};this._constructor()};g.extend(d.prototype,{enabled:function(){return this.s.enabled},enable:function(i){var j=this;if(i===false){return this.disable()}this.s.enabled=true;this._focusListener();this.dom.handle.on("mousedown",function(k){j._mousedown(k);return false});return this},disable:function(){this.s.enabled=false;this._focusListenerRemove();return this},_constructor:function(){var k=this;var j=this.s.dt;var i=g("div.dataTables_scrollBody",this.s.dt.table().container());j.settings()[0].autoFill=this;if(i.length){this.dom.dtScroll=i;if(i.css("position")==="static"){i.css("position","relative")}}if(this.c.enable!==false){this.enable()}j.on("destroy.autoFill",function(){k._focusListenerRemove()})},_attach:function(l){var k=this.s.dt;var i=k.cell(l).index();var m=this.dom.handle;var j=this.s.handle;if(!i||k.columns(this.c.columns).indexes().indexOf(i.column)===-1){this._detach();return}if(!this.dom.offsetParent){this.dom.offsetParent=g(k.table().node()).offsetParent()}if(!j.height||!j.width){m.appendTo("body");j.height=m.outerHeight();j.width=m.outerWidth()}var n=this._getPosition(l,this.dom.offsetParent);this.dom.attachedTo=l;m.css({top:n.top+l.offsetHeight-j.height,left:n.left+l.offsetWidth-j.width}).appendTo(this.dom.offsetParent)},_actionSelector:function(j){var l=this;var k=this.s.dt;var o=d.actions;var n=[];g.each(o,function(p,q){if(q.available(k,j)){n.push(p)}});if(n.length===1&&this.c.alwaysAsk===false){var i=o[n[0]].execute(k,j);this._update(i,j)}else{var m=this.dom.list.children("ul").empty();n.push("cancel");g.each(n,function(q,p){m.append(g("").append(''+o[p].option(k,j)+"