/*! DataTables 1.10.19 ©2008-2018 SpryMedia Ltd - datatables.net/license */ (function(h){"function"===typeof define&&define.amd?define(["jquery"],function(E){return h(E,window,document)}):"object"===typeof exports?module.exports=function(E,H){E||(E=window);H||(H="undefined"!==typeof window?require("jquery"):require("jquery")(E));return h(H,E,E.document)}:h(jQuery,window,document)})(function(h,E,H,k){function Z(a){var b,c,d={};h.each(a,function(e){if((b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=e.replace(b[0],b[2].toLowerCase()),d[c]=e,"o"===b[1]&&Z(a[e])});a._hungarianMap=d}function J(a,b,c){a._hungarianMap||Z(a);var d;h.each(b,function(e){d=a._hungarianMap[e];if(d!==k&&(c||b[d]===k))"o"===d.charAt(0)?(b[d]||(b[d]={}),h.extend(!0,b[d],b[e]),J(a[d],b[d],c)):b[d]=b[e]})}function Ca(a){var b=n.defaults.oLanguage,c=b.sDecimal;c&&Da(c);if(a){var d=a.sZeroRecords;!a.sEmptyTable&&(d&&"No data available in table"===b.sEmptyTable)&&F(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(d&&"Loading..."===b.sLoadingRecords)&&F(a,a,"sZeroRecords","sLoadingRecords");a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&c!==a&&Da(a)}}function fb(a){A(a,"ordering","bSort");A(a,"orderMulti","bSortMulti");A(a,"orderClasses","bSortClasses");A(a,"orderCellsTop","bSortCellsTop");A(a,"order","aaSorting");A(a,"orderFixed","aaSortingFixed");A(a,"paging","bPaginate");A(a,"pagingType","sPaginationType");A(a,"pageLength","iDisplayLength");A(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":"");"boolean"===typeof a.scrollX&&(a.scrollX=a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b").css({position:"fixed",top:0,left:-1*h(E).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(h("
").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(h("
").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}h.extend(a.oBrowser,n.__browser);a.oScroll.iBarWidth=n.__browser.barWidth} function ib(a,b,c,d,e,f){var g,j=!1;c!==k&&(g=c,j=!0);for(;d!==e;)a.hasOwnProperty(d)&&(g=j?b(g,a[d],d,a):a[d],j=!0,d+=f);return g}function Ea(a,b){var c=n.defaults.column,d=a.aoColumns.length,c=h.extend({},n.models.oColumn,c,{nTh:b?b:H.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=h.extend({},n.models.oSearch,c[d]);ka(a,d,h(b).data())}function ka(a,b,c){var b=a.aoColumns[b],d=a.oClasses,e=h(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var f=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==k&&null!==c&&(gb(c),J(n.defaults.column,c),c.mDataProp!==k&&!c.mData&&(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),c.sClass&&e.addClass(c.sClass),h.extend(b,c),F(b,c,"sWidth","sWidthOrig"),c.iDataSort!==k&&(b.aDataSort=[c.iDataSort]),F(b,c,"aDataSort"));var g=b.mData,j=S(g),i=b.mRender?S(b.mRender):null,c=function(a){return"string"===typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=h.isPlainObject(g)&&(c(g.sort)||c(g.type)||c(g.filter));b._setter=null;b.fnGetData=function(a,b,c){var d=j(a,b,k,c);return i&&b?i(d,b,a,c):d};b.fnSetData=function(a,b,c){return N(g)(a,b,c)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==h.inArray("asc",b.asSorting);c=-1!==h.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function $(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Fa(a);for(var c=0,d=b.length;cq[f])d(l.length+q[f],m);else if("string"===typeof q[f]){j=0;for(i=l.length;jb&&a[e]--;-1!=d&&c===k&&a.splice(d,1)}function da(a,b,c,d){var e=a.aoData[b],f,g=function(c,d){for(;c.childNodes.length;)c.removeChild(c.firstChild);c.innerHTML=B(a,b,d,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData=Ia(a,e,d,d===k?k:e._aData).data;else{var j=e.anCells;if(j)if(d!==k)g(j[d],d);else{c=0;for(f=j.length;c").appendTo(g));b=0;for(c=l.length;btr").attr("role","row");h(g).find(">tr>th, >tr>td").addClass(m.sHeaderTH);h(j).find(">tr>th, >tr>td").addClass(m.sFooterTH);if(null!==j){a=a.aoFooter[0];b=0;for(c=a.length;b=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart=-1);var g=a._iDisplayStart,m=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,C(a,!1);else if(j){if(!a.bDestroying&&!mb(a))return}else a.iDraw++;if(0!==i.length){f=j?a.aoData.length:m;for(j=j?0:g;j",{"class":e?d[0]:""}).append(h("",{valign:"top",colSpan:V(a),"class":a.oClasses.sRowEmpty}).html(c))[0];r(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Ka(a),g,m,i]);r(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],Ka(a),g,m,i]);d=h(a.nTBody);d.children().detach();d.append(h(b));r(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function T(a,b){var c=a.oFeatures,d=c.bFilter;c.bSort&&nb(a);d?ga(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;P(a);a._drawHold=!1}function ob(a){var b=a.oClasses,c=h(a.nTable),c=h("
").insertBefore(c),d=a.oFeatures,e=h("
",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var f=a.sDom.split(""),g,j,i,m,l,q,k=0;k")[0];m=f[k+1];if("'"==m||'"'==m){l="";for(q=2;f[k+q]!=m;)l+=f[k+q],q++;"H"==l?l=b.sJUIHeader:"F"==l&&(l=b.sJUIFooter);-1!=l.indexOf(".")?(m=l.split("."),i.id=m[0].substr(1,m[0].length-1),i.className=m[1]):"#"==l.charAt(0)?i.id=l.substr(1,l.length-1):i.className=l;k+=q}e.append(i);e=h(i)}else if(">"==j)e=e.parent();else if("l"==j&&d.bPaginate&&d.bLengthChange)g=pb(a);else if("f"==j&&d.bFilter)g=qb(a);else if("r"==j&&d.bProcessing)g=rb(a);else if("t"==j)g=sb(a);else if("i"==j&&d.bInfo)g=tb(a);else if("p"==j&&d.bPaginate)g=ub(a);else if(0!==n.ext.feature.length){i=n.ext.feature;q=0;for(m=i.length;q',j=d.sSearch,j=j.match(/_INPUT_/)?j.replace("_INPUT_",g):j+g,b=h("
",{id:!f.f?c+"_filter":null,"class":b.sFilter}).append(h("
").addClass(b.sLength);a.aanFeatures.l||(i[0].id=c+"_length");i.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));h("select",i).val(a._iDisplayLength).on("change.DT",function(){Ra(a,h(this).val());P(a)});h(a.nTable).on("length.dt.DT",function(b,c,d){a===c&&h("select",i).val(d)});return i[0]}function ub(a){var b=a.sPaginationType,c=n.ext.pager[b],d="function"===typeof c,e=function(a){P(a)},b=h("
").addClass(a.oClasses.sPaging+b)[0],f=a.aanFeatures;d||c.fnInit(a,b,e);f.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(a){if(d){var b=a._iDisplayStart,i=a._iDisplayLength,h=a.fnRecordsDisplay(),l=-1===i,b=l?0:Math.ceil(b/i),i=l?1:Math.ceil(h/i),h=c(b,i),k,l=0;for(k=f.p.length;lf&&(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e",{id:!a.aanFeatures.r?a.sTableId+"_processing":null,"class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]} function C(a,b){a.oFeatures.bProcessing&&h(a.aanFeatures.r).css("display",b?"block":"none");r(a,null,"processing",[a,b])}function sb(a){var b=h(a.nTable);b.attr("role","grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,f=a.oClasses,g=b.children("caption"),j=g.length?g[0]._captionSide:null,i=h(b[0].cloneNode(!1)),m=h(b[0].cloneNode(!1)),l=b.children("tfoot");l.length||(l=null);i=h("
",{"class":f.sScrollWrapper}).append(h("
",{"class":f.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:d?!d?null:v(d):"100%"}).append(h("
",{"class":f.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(i.removeAttr("id").css("margin-left",0).append("top"===j?g:null).append(b.children("thead"))))).append(h("
",{"class":f.sScrollBody}).css({position:"relative",overflow:"auto",width:!d?null:v(d)}).append(b));l&&i.append(h("
",{"class":f.sScrollFoot}).css({overflow:"hidden",border:0,width:d?!d?null:v(d):"100%"}).append(h("
",{"class":f.sScrollFootInner}).append(m.removeAttr("id").css("margin-left",0).append("bottom"===j?g:null).append(b.children("tfoot")))));var b=i.children(),k=b[0],f=b[1],t=l?b[2]:null;if(d)h(f).on("scroll.DT",function(){var a=this.scrollLeft;k.scrollLeft=a;l&&(t.scrollLeft=a)});h(f).css(e&&c.bCollapse?"max-height":"height",e);a.nScrollHead=k;a.nScrollBody=f;a.nScrollFoot=t;a.aoDrawCallback.push({fn:la,sName:"scrolling"});return i[0]}function la(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY,b=b.iBarWidth,f=h(a.nScrollHead),g=f[0].style,j=f.children("div"),i=j[0].style,m=j.children("table"),j=a.nScrollBody,l=h(j),q=j.style,t=h(a.nScrollFoot).children("div"),n=t.children("table"),o=h(a.nTHead),p=h(a.nTable),s=p[0],r=s.style,u=a.nTFoot?h(a.nTFoot):null,x=a.oBrowser,U=x.bScrollOversize,Xb=D(a.aoColumns,"nTh"),Q,L,R,w,Ua=[],y=[],z=[],A=[],B,C=function(a){a=a.style;a.paddingTop="0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};L=j.scrollHeight>j.clientHeight;if(a.scrollBarVis!==L&&a.scrollBarVis!==k)a.scrollBarVis=L,$(a);else{a.scrollBarVis=L;p.children("thead, tfoot").remove();u&&(R=u.clone().prependTo(p),Q=u.find("tr"),R=R.find("tr"));w=o.clone().prependTo(p);o=o.find("tr");L=w.find("tr");w.find("th, td").removeAttr("tabindex");c||(q.width="100%",f[0].style.width="100%");h.each(ra(a,w),function(b,c){B=aa(a,b);c.style.width=a.aoColumns[B].sWidth});u&&I(function(a){a.style.width=""},R);f=p.outerWidth();if(""===c){r.width="100%";if(U&&(p.find("tbody").height()>j.offsetHeight||"scroll"==l.css("overflow-y")))r.width=v(p.outerWidth()-b);f=p.outerWidth()}else""!==d&&(r.width=v(d),f=p.outerWidth());I(C,L);I(function(a){z.push(a.innerHTML);Ua.push(v(h(a).css("width")))},L);I(function(a,b){if(h.inArray(a,Xb)!==-1)a.style.width=Ua[b]},o);h(L).height(0);u&&(I(C,R),I(function(a){A.push(a.innerHTML);y.push(v(h(a).css("width")))},R),I(function(a,b){a.style.width=y[b]},Q),h(R).height(0));I(function(a,b){a.innerHTML='
'+z[b]+"
";a.childNodes[0].style.height="0";a.childNodes[0].style.overflow="hidden";a.style.width=Ua[b]},L);u&&I(function(a,b){a.innerHTML='
'+A[b]+"
";a.childNodes[0].style.height="0";a.childNodes[0].style.overflow="hidden";a.style.width=y[b]},R);if(p.outerWidth()j.offsetHeight||"scroll"==l.css("overflow-y")?f+b:f;if(U&&(j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")))r.width=v(Q-b);(""===c||""!==d)&&K(a,1,"Possible column misalignment",6)}else Q="100%";q.width=v(Q);g.width=v(Q);u&&(a.nScrollFoot.style.width=v(Q));!e&&U&&(q.height=v(s.offsetHeight+b));c=p.outerWidth();m[0].style.width=v(c);i.width=v(c);d=p.height()>j.clientHeight||"scroll"==l.css("overflow-y");e="padding"+(x.bScrollbarLeft?"Left":"Right");i[e]=d?b+"px":"0px";u&&(n[0].style.width=v(c),t[0].style.width=v(c),t[0].style[e]=d?b+"px":"0px");p.children("colgroup").insertBefore(p.children("thead"));l.scroll();if((a.bSorted||a.bFiltered)&&!a._drawHold)j.scrollTop=0}}function I(a,b,c){for(var d=0,e=0,f=b.length,g,j;e").appendTo(j.find("tbody"));j.find("thead, tfoot").remove();j.append(h(a.nTHead).clone()).append(h(a.nTFoot).clone());j.find("tfoot th, tfoot td").css("width","");m=ra(a,j.find("thead")[0]);for(n=0;n").css({width:o.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(n=0;n").css(f||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(j).appendTo(k);f&&g?j.width(g):f?(j.css("width","auto"),j.removeAttr("width"),j.width()").css("width",v(a)).appendTo(b||H.body),d=c[0].offsetWidth;c.remove();return d}function Gb(a,b){var c=Hb(a,b);if(0>c)return null;var d=a.aoData[c];return!d.nTr?h("").html(B(a,c,b,"display"))[0]:d.anCells[b]}function Hb(a,b){for(var c,d=-1,e=-1,f=0,g=a.aoData.length;fd&&(d=c.length,e=f);return e}function v(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function X(a){var b,c,d=[],e=a.aoColumns,f,g,j,i;b=a.aaSortingFixed;c=h.isPlainObject(b);var m=[];f=function(a){a.length&&!h.isArray(a[0])?m.push(a):h.merge(m,a)};h.isArray(b)&&f(b);c&&b.pre&&f(b.pre);f(a.aaSorting);c&&b.post&&f(b.post);for(a=0;ae?1:0,0!==c)return"asc"===j.dir?c:-c;c=d[a];e=d[b];return ce?1:0}):i.sort(function(a,b){var c,g,j,i,k=h.length,n=f[a]._aSortData,o=f[b]._aSortData;for(j=0;jg?1:0})}a.bSorted=!0}function Jb(a){for(var b,c,d=a.aoColumns,e=X(a),a=a.oLanguage.oAria,f=0,g=d.length;f/g,"");var i=c.nTh;i.removeAttribute("aria-sort");c.bSortable&&(0e?e+1:3));e=0;for(f=d.length;ee?e+1:3))}a.aLastSort=d}function Ib(a,b){var c=a.aoColumns[b],d=n.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,ba(a,b)));for(var f,g=n.ext.type.order[c.sType+"-pre"],j=0,i=a.aoData.length;j=f.length?[0,c[1]]:c)}));b.search!==k&&h.extend(a.oPreviousSearch,Cb(b.search));if(b.columns){d=0;for(e=b.columns.length;d=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function Na(a,b){var c=a.renderer,d=n.ext.renderer[b];return h.isPlainObject(c)&&c[b]?d[c[b]]||d._:"string"===typeof c?d[c]||d._:d._}function y(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function ia(a,b){var c=[],c=Lb.numbers_length,d=Math.floor(c/2);b<=c?c=Y(0,b):a<=d?(c=Y(0,c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=Y(b-(c-2),b):(c=Y(a-d+2,a+d-1),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function Da(a){h.each({num:function(b){return za(b,a)},"num-fmt":function(b){return za(b,a,Ya)},"html-num":function(b){return za(b,a,Aa)},"html-num-fmt":function(b){return za(b,a,Aa,Ya)}},function(b,c){x.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(x.type.search[b+a]=x.type.search.html)})}function Mb(a){return function(){var b=[ya(this[n.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return n.ext.internal[a].apply(this,b)}}var n=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new s(ya(this[x.iApiIndex])):new s(this)};this.fnAddData=function(a,b){var c=this.api(!0),d=h.isArray(a)&&(h.isArray(a[0])||h.isPlainObject(a[0]))?c.rows.add(a):c.row.add(a);(b===k||b)&&c.draw();return d.flatten().toArray()};this.fnAdjustColumnSizing=function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],d=c.oScroll;a===k||a?b.draw(!1):(""!==d.sX||""!==d.sY)&&la(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===k||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a,b,c){var d=this.api(!0),a=d.rows(a),e=a.settings()[0],h=e.aoData[a[0][0]];a.remove();b&&b.call(this,e,h);(c===k||c)&&d.draw();return h};this.fnDestroy=function(a){this.api(!0).destroy(a)};this.fnDraw=function(a){this.api(!0).draw(a)};this.fnFilter=function(a,b,c,d,e,h){e=this.api(!0);null===b||b===k?e.search(a,c,d,h):e.column(b).search(a,c,d,h);e.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==k){var d=a.nodeName?a.nodeName.toLowerCase():"";return b!==k||"td"==d||"th"==d?c.cell(a,b).data():c.row(a).data()||null}return c.data().toArray()};this.fnGetNodes=function(a){var b=this.api(!0);return a!==k?b.row(a).node():b.rows().nodes().flatten().toArray()};this.fnGetPosition=function(a){var b=this.api(!0),c=a.nodeName.toUpperCase();return"TR"==c?b.row(a).index():"TD"==c||"TH"==c?(a=b.cell(a).index(),[a.row,a.columnVisible,a.column]):null};this.fnIsOpen=function(a){return this.api(!0).row(a).child.isShown()};this.fnOpen=function(a,b,c){return this.api(!0).row(a).child(b,c).show().child()[0]};this.fnPageChange=function(a,b){var c=this.api(!0).page(a);(b===k||b)&&c.draw(!1)};this.fnSetColumnVis=function(a,b,c){a=this.api(!0).column(a).visible(b);(c===k||c)&&a.columns.adjust().draw()};this.fnSettings=function(){return ya(this[x.iApiIndex])};this.fnSort=function(a){this.api(!0).order(a).draw()};this.fnSortListener=function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,d,e){var h=this.api(!0);c===k||null===c?h.row(b).data(a):h.cell(b,c).data(a);(e===k||e)&&h.columns.adjust();(d===k||d)&&h.draw();return 0};this.fnVersionCheck=x.fnVersionCheck;var b=this,c=a===k,d=this.length;c&&(a={});this.oApi=this.internal=x.internal;for(var e in n.ext.internal)e&&(this[e]=Mb(e));this.each(function(){var e={},g=1").appendTo(q));p.nTHead=b[0];b=q.children("tbody");b.length===0&&(b=h("").appendTo(q));p.nTBody=b[0];b=q.children("tfoot");if(b.length===0&&a.length>0&&(p.oScroll.sX!==""||p.oScroll.sY!==""))b=h("").appendTo(q);if(b.length===0||b.children().length===0)q.addClass(u.sNoFooter);else if(b.length>0){p.nTFoot=b[0];ea(p.aoFooter,p.nTFoot)}if(g.aaData)for(j=0;j/g,Zb=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,$b=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),Ya=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,M=function(a){return!a||!0===a||"-"===a?!0:!1},Ob=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},Pb=function(a,b){Za[b]||(Za[b]=RegExp(Qa(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(Za[b],"."):a},$a=function(a,b,c){var d="string"===typeof a;if(M(a))return!0;b&&d&&(a=Pb(a,b));c&&d&&(a=a.replace(Ya,""));return!isNaN(parseFloat(a))&&isFinite(a)},Qb=function(a,b,c){return M(a)?!0:!(M(a)||"string"===typeof a)?null:$a(a.replace(Aa,""),b,c)?!0:null},D=function(a,b,c){var d=[],e=0,f=a.length;if(c!==k)for(;ea.length)){b=a.slice().sort();for(var c=b[0],d=1,e=b.length;d")[0],Wb=va.textContent!==k,Yb=/<.*?>/g,Oa=n.util.throttle,Sb=[],w=Array.prototype,ac=function(a){var b,c,d=n.settings,e=h.map(d,function(a){return a.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase())return b=h.inArray(a,e),-1!==b?[d[b]]:null;if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?c=h(a):a instanceof h&&(c=a)}else return[];if(c)return c.map(function(){b=h.inArray(this,e);return-1!==b?d[b]:null}).toArray()};s=function(a,b){if(!(this instanceof s))return new s(a,b);var c=[],d=function(a){(a=ac(a))&&(c=c.concat(a))};if(h.isArray(a))for(var e=0,f=a.length;ea?new s(b[a],this[a]):null},filter:function(a){var b=[];if(w.filter)b=w.filter.call(this,a,this);else for(var c=0,d=this.length;c").addClass(b),h("td",c).addClass(b).html(a)[0].colSpan=V(d),e.push(c[0]))};f(a,b);c._details&&c._details.detach();c._details=h(e);c._detailsShow&&c._details.insertAfter(c.nTr)}return this});o(["row().child.show()","row().child().show()"],function(){Ub(this,!0);return this});o(["row().child.hide()","row().child().hide()"],function(){Ub(this,!1);return this});o(["row().child.remove()","row().child().remove()"],function(){db(this);return this});o("row().child.isShown()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var bc=/^([^:]+):(name|visIdx|visible)$/,Vb=function(a,b,c,d,e){for(var c=[],d=0,f=e.length;d=0?b:g.length+b];if(typeof a==="function"){var e=Ba(c,f);return h.map(g,function(b,f){return a(f,Vb(c,f,0,0,e),i[f])?f:null})}var k=typeof a==="string"?a.match(bc):"";if(k)switch(k[2]){case "visIdx":case "visible":b=parseInt(k[1],10);if(b<0){var n=h.map(g,function(a,b){return a.bVisible?b:null});return[n[n.length+b]]}return[aa(c,b)];case "name":return h.map(j,function(a,b){return a===k[1]?b:null});default:return[]}if(a.nodeName&&a._DT_CellIndex)return[a._DT_CellIndex.column];b=h(i).filter(a).map(function(){return h.inArray(this,i)}).toArray();if(b.length||!a.nodeName)return b;b=h(a).closest("*[data-dt-column]");return b.length?[b.data("dt-column")]:[]},c,f)},1);c.selector.cols=a;c.selector.opts=b;return c});u("columns().header()","column().header()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTh},1)});u("columns().footer()","column().footer()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTf},1)});u("columns().data()","column().data()",function(){return this.iterator("column-rows",Vb,1)});u("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});u("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,c,d,e,f){return ja(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)},1)});u("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return ja(a.aoData,e,"anCells",b)},1)});u("columns().visible()","column().visible()",function(a,b){var c=this.iterator("column",function(b,c){if(a===k)return b.aoColumns[c].bVisible;var f=b.aoColumns,g=f[c],j=b.aoData,i,m,l;if(a!==k&&g.bVisible!==a){if(a){var n=h.inArray(!0,D(f,"bVisible"),c+1);i=0;for(m=j.length;id;return!0};n.isDataTable=n.fnIsDataTable=function(a){var b=h(a).get(0),c=!1;if(a instanceof n.Api)return!0;h.each(n.settings,function(a,e){var f=e.nScrollHead?h("table",e.nScrollHead)[0]:null,g=e.nScrollFoot?h("table",e.nScrollFoot)[0]:null;if(e.nTable===b||f===b||g===b)c=!0});return c};n.tables=n.fnTables=function(a){var b=!1;h.isPlainObject(a)&&(b=a.api,a=a.visible);var c=h.map(n.settings,function(b){if(!a||a&&h(b.nTable).is(":visible"))return b.nTable});return b?new s(c):c};n.camelToHungarian=J;o("$()",function(a,b){var c=this.rows(b).nodes(),c=h(c);return h([].concat(c.filter(a).toArray(),c.find(a).toArray()))});h.each(["on","one","off"],function(a,b){o(b+"()",function(){var a=Array.prototype.slice.call(arguments);a[0]=h.map(a[0].split(/\s/),function(a){return!a.match(/\.dt\b/)?a+".dt":a}).join(" ");var d=h(this.tables().nodes());d[b].apply(d,a);return this})});o("clear()",function(){return this.iterator("table",function(a){oa(a)})});o("settings()",function(){return new s(this.context,this.context)});o("init()",function(){var a=this.context;return a.length?a[0].oInit:null});o("data()",function(){return this.iterator("table",function(a){return D(a.aoData,"_aData")}).flatten()});o("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,d=b.oClasses,e=b.nTable,f=b.nTBody,g=b.nTHead,j=b.nTFoot,i=h(e),f=h(f),k=h(b.nTableWrapper),l=h.map(b.aoData,function(a){return a.nTr}),o;b.bDestroying=!0;r(b,"aoDestroyCallback","destroy",[b]);a||(new s(b)).columns().visible(!0);k.off(".DT").find(":not(tbody *)").off(".DT");h(E).off(".DT-"+b.sInstance);e!=g.parentNode&&(i.children("thead").detach(),i.append(g));j&&e!=j.parentNode&&(i.children("tfoot").detach(),i.append(j));b.aaSorting=[];b.aaSortingFixed=[];wa(b);h(l).removeClass(b.asStripeClasses.join(" "));h("th, td",g).removeClass(d.sSortable+" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);f.children().detach();f.append(l);g=a?"remove":"detach";i[g]();k[g]();!a&&c&&(c.insertBefore(e,b.nTableReinsertBefore),i.css("width",b.sDestroyWidth).removeClass(d.sTable),(o=b.asDestroyStripes.length)&&f.children().each(function(a){h(this).addClass(b.asDestroyStripes[a%o])}));c=h.inArray(b,n.settings);-1!==c&&n.settings.splice(c,1)})});h.each(["column","row","cell"],function(a,b){o(b+"s().every()",function(a){var d=this.selector.opts,e=this;return this.iterator(b,function(f,g,h,i,m){a.call(e[b](g,"cell"===b?h:d,"cell"===b?d:k),g,h,i,m)})})});o("i18n()",function(a,b,c){var d=this.context[0],a=S(a)(d.oLanguage);a===k&&(a=b);c!==k&&h.isPlainObject(a)&&(a=a[c]!==k?a[c]:a._);return a.replace("%d",c)});n.version="1.10.19";n.settings=[];n.models={};n.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};n.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};n.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};n.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:h.extend({},n.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};Z(n.defaults);n.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};Z(n.defaults.column);n.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:k,oAjaxData:k,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==y(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==y(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,f=e.bPaginate;return e.bServerSide?!1===f||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!f||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};n.ext=x={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:n.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:n.version};h.extend(x,{afnFiltering:x.search,aTypes:x.type.detect,ofnSearch:x.type.search,oSort:x.type.order,afnSortData:x.order,aoFeatures:x.feature,oApi:x.internal,oStdClasses:x.classes,oPagination:x.pager});h.extend(n.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var Lb=n.ext.pager;h.extend(Lb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},numbers:function(a,b){return[ia(a,b)]},simple_numbers:function(a,b){return["previous",ia(a,b),"next"]},full_numbers:function(a,b){return["first","previous",ia(a,b),"next","last"]},first_last_numbers:function(a,b){return["first",ia(a,b),"last"]},_numbers:ia,numbers_length:7});h.extend(!0,n.ext.renderer,{pageButton:{_:function(a,b,c,d,e,f){var g=a.oClasses,j=a.oLanguage.oPaginate,i=a.oLanguage.oAria.paginate||{},m,l,n=0,o=function(b,d){var k,s,u,r,v=function(b){Ta(a,b.data.action,!0)};k=0;for(s=d.length;k").appendTo(b);o(u,r)}else{m=null;l="";switch(r){case "ellipsis":b.append('');break;case "first":m=j.sFirst;l=r+(e>0?"":" "+g.sPageButtonDisabled);break;case "previous":m=j.sPrevious;l=r+(e>0?"":" "+g.sPageButtonDisabled);break;case "next":m=j.sNext;l=r+(e",{"class":g.sPageButton+" "+l,"aria-controls":a.sTableId,"aria-label":i[r],"data-dt-idx":n,tabindex:a.iTabIndex,id:c===0&&typeof r==="string"?a.sTableId+"_"+r:null}).html(m).appendTo(b);Wa(u,{action:r},v);n++}}}},s;try{s=h(b).find(H.activeElement).data("dt-idx")}catch(u){}o(h(b).empty(),d);s!==k&&h(b).find("[data-dt-idx="+s+"]").focus()}}});h.extend(n.ext.type.detect,[function(a,b){var c=b.oLanguage.sDecimal;return $a(a,c)?"num"+c:null},function(a){if(a&&!(a instanceof Date)&&!Zb.test(a))return null;var b=Date.parse(a);return null!==b&&!isNaN(b)||M(a)?"date":null},function(a,b){var c=b.oLanguage.sDecimal;return $a(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Qb(a,c)?"html-num"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Qb(a,c,!0)?"html-num-fmt"+c:null},function(a){return M(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);h.extend(n.ext.type.search,{html:function(a){return M(a)?a:"string"===typeof a?a.replace(Nb," ").replace(Aa,""):""},string:function(a){return M(a)?a:"string"===typeof a?a.replace(Nb," "):a}});var za=function(a,b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Pb(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};h.extend(x.type.order,{"date-pre":function(a){a=Date.parse(a);return isNaN(a)?-Infinity:a},"html-pre":function(a){return M(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return M(a)?"":"string"===typeof a?a.toLowerCase():!a.toString?"":a.toString()},"string-asc":function(a,b){return ab?1:0},"string-desc":function(a,b){return ab?-1:0}});Da("");h.extend(!0,n.ext.renderer,{header:{_:function(a,b,c,d){h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(c.sSortingClass+" "+d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass)}})},jqueryui:function(a,b,c,d){h("
").addClass(d.sSortJUIWrapper).append(b.contents()).append(h("").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass);b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass(h[e]=="asc"?d.sSortJUIAsc:h[e]=="desc"?d.sSortJUIDesc:c.sSortingClassJUI)}})}}});var eb=function(a){return"string"===typeof a?a.replace(//g,">").replace(/"/g,"""):a};n.render={number:function(a,b,c,d,e){return{display:function(f){if("number"!==typeof f&&"string"!==typeof f)return f;var g=0>f?"-":"",h=parseFloat(f);if(isNaN(h))return eb(f);h=h.toFixed(c);f=Math.abs(h);h=parseInt(f,10);f=c?b+(f-h).toFixed(c).substring(2):"";return g+(d||"")+h.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+f+(e||"")}}},text:function(){return{display:eb,filter:eb}}};h.extend(n.ext.internal,{_fnExternApiFunc:Mb,_fnBuildAjax:sa,_fnAjaxUpdate:mb,_fnAjaxParameters:vb,_fnAjaxUpdateDraw:wb,_fnAjaxDataSrc:ta,_fnAddColumn:Ea,_fnColumnOptions:ka,_fnAdjustColumnSizing:$,_fnVisibleToColumnIndex:aa,_fnColumnIndexToVisible:ba,_fnVisbleColumns:V,_fnGetColumns:ma,_fnColumnTypes:Ga,_fnApplyColumnDefs:jb,_fnHungarianMap:Z,_fnCamelToHungarian:J,_fnLanguageCompat:Ca,_fnBrowserDetect:hb,_fnAddData:O,_fnAddTr:na,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==k?b._DT_RowIndex:null},_fnNodeToColumnIndex:function(a,b,c){return h.inArray(c,a.aoData[b].anCells)},_fnGetCellData:B,_fnSetCellData:kb,_fnSplitObjNotation:Ja,_fnGetObjectDataFn:S,_fnSetObjectDataFn:N,_fnGetDataMaster:Ka,_fnClearTable:oa,_fnDeleteIndex:pa,_fnInvalidate:da,_fnGetRowElements:Ia,_fnCreateTr:Ha,_fnBuildHead:lb,_fnDrawHead:fa,_fnDraw:P,_fnReDraw:T,_fnAddOptionsHtml:ob,_fnDetectHeader:ea,_fnGetUniqueThs:ra,_fnFeatureHtmlFilter:qb,_fnFilterComplete:ga,_fnFilterCustom:zb,_fnFilterColumn:yb,_fnFilter:xb,_fnFilterCreateSearch:Pa,_fnEscapeRegex:Qa,_fnFilterData:Ab,_fnFeatureHtmlInfo:tb,_fnUpdateInfo:Db,_fnInfoMacros:Eb,_fnInitialise:ha,_fnInitComplete:ua,_fnLengthChange:Ra,_fnFeatureHtmlLength:pb,_fnFeatureHtmlPaginate:ub,_fnPageChange:Ta,_fnFeatureHtmlProcessing:rb,_fnProcessingDisplay:C,_fnFeatureHtmlTable:sb,_fnScrollDraw:la,_fnApplyToChildren:I,_fnCalculateColumnWidths:Fa,_fnThrottle:Oa,_fnConvertToWidth:Fb,_fnGetWidestNode:Gb,_fnGetMaxLenString:Hb,_fnStringToCss:v,_fnSortFlatten:X,_fnSort:nb,_fnSortAria:Jb,_fnSortListener:Va,_fnSortAttachListener:Ma,_fnSortingClasses:wa,_fnSortData:Ib,_fnSaveState:xa,_fnLoadState:Kb,_fnSettingsFromNode:ya,_fnLog:K,_fnMap:F,_fnBindAction:Wa,_fnCallbackReg:z,_fnCallbackFire:r,_fnLengthOverflow:Sa,_fnRenderer:Na,_fnDataSource:y,_fnRowAttributes:La,_fnExtend:Xa,_fnCalculateEnd:function(){}});h.fn.dataTable=n;n.$=h;h.fn.dataTableSettings=n.settings;h.fn.dataTableExt=n.ext;h.fn.DataTable=function(a){return h(this).dataTable(a).api()};h.each(n,function(a,b){h.fn.DataTable[a]=b});return h.fn.dataTable});(function($){$.fn.columnFilter=function(options){var customSearchIndexes=[];var properties={sPlaceHolder:"foot",sRangeSeparator:"|",aoColumns:null,sRangeFormat:"From {from} to {to}"};$.extend(properties,options);var oTable=this,columnIndex,sColumnLabel,th,tr,aoFilterCells;var serverSide=oTable.fnSettings().oFeatures.bServerSide;var afnSearch_=[];return this.each(function(){if(properties.sPlaceHolder==='head:before'){tr=$("tr:first",oTable.fnSettings().nTHead).detach();tr.appendTo($(oTable.fnSettings().nTHead));aoFilterCells=oTable.fnSettings().aoHeader[0]}else{aoFilterCells=oTable.fnSettings().aoFooter[0]} $(aoFilterCells).each(function(index){columnIndex=index;var aoColumn={type:"text",bRegex:!1,bSmart:!0,iMaxLength:-1,iFilterLength:0};sColumnLabel=$($(this)[0].cell).text();if(properties.aoColumns!==null){if(properties.aoColumns.length');th.html(input);if(bIsNumber) th.wrapInner('');else th.wrapInner('');input.on('keyup input',_.debounce(function(e){inputSearch(this.value,e.keyCode)},500)) function inputSearch(value,keyCode){if(typeof keyCode!=='undefined'&&jQuery.inArray(keyCode,[16,37,38,39,40])!==-1){return} var tableId=oTable.attr('id');var search='';if(aoColumn.exactFiltering){search=serverSide?value:"^"+value+"$";oTable.api().column(columnIndex).search(value?search:'',!0,!1)}else{if(bIsNumber&&!serverSide){search="^";for(var i=0;i');th.append(from);var sToId=oTable.attr("id")+'_range_to_'+columnIndex;var to=jQuery('');th.append(to);th.wrapInner('');customSearchIndexes.push(columnIndex);oTable.dataTableExt.afnFiltering.push(function(oSettings,aData,iDataIndex){if(oTable.attr("id")!==oSettings.sTableId) return!0;if(document.getElementById(sFromId)==null) return!0;var iMin=document.getElementById(sFromId).value.replace(replaceFormat,'');var iMax=document.getElementById(sToId).value.replace(replaceFormat,'');var iValue=aData[columnIndex]=="-"?'0':aData[columnIndex].replace(replaceFormat,'');if(numberFormat===1){iMin=iMin.replace(/,/g,'.');iMax=iMax.replace(/,/g,'.');iValue=iValue.replace(/,/g,'.')} if(iMin!==''){iMin=iMin*1} if(iMax!==''){iMax=iMax*1} iValue=iValue*1;return(iMin===""&&iMax==="")||(iMin===""&&iValue<=iMax)||(iMin<=iValue&&""===iMax)||(iMin<=iValue&&iValue<=iMax)});jQuery('#'+sFromId+', #'+sToId,th).keyup(function(){numberRangeSearch()});if(fromDefaultValue){jQuery(from).val(fromDefaultValue);if(!serverSide){jQuery(document).ready(function(){jQuery(from).keyup()})}} if(toDefaultValue){jQuery(to).val(toDefaultValue);if(!serverSide){jQuery(document).ready(function(){jQuery(to).keyup()})}} function numberRangeSearch(){var iMin=document.getElementById(sFromId).value*1;var iMax=document.getElementById(sToId).value*1;if(iMin!=0&&iMax!=0&&iMin>iMax) return;if(typeof wpDataTables[tableId].drawTable==='undefined'||wpDataTables[tableId].drawTable===!0){oTable.api().draw()} fnOnFiltered()}}else{th.append('
');th.wrapInner('');var slider=th.find('#wdt-number-range-slider')[0];customSearchIndexes.push(columnIndex);var numberArray=oTable.api().column(columnIndex).data();var formattedNumber=numberArray.map(function(numberArray){if(numberFormat===1){return parseFloat(numberArray.replace(/\./g,'').replace(',','.'))} return parseFloat(numberArray.replace(/,/g,''))}) var minValue=serverSide===!1?Math.min.apply(Math,formattedNumber):aoColumn.minValue var maxValue=serverSide===!1?Math.max.apply(Math,formattedNumber):aoColumn.maxValue noUiSlider.create(slider,{start:[fromDefaultValue?fromDefaultValue:minValue,toDefaultValue?toDefaultValue:maxValue],tooltips:!0,connect:!0,behaviour:'drag',range:{'min':minValue,'max':maxValue},format:wNumb({decimals:aoColumn.columnType==='int'?0:aoColumn.numberOfDecimalPlaces,thousand:numberFormat===1?aoColumn.columnType==='float'?aoColumn.thousandsSeparator:'.':',',mark:numberFormat===1?',':'.'})});slider.noUiSlider.on('end',function(){slider.value=slider.noUiSlider.get();numberRangeSliderSearch()});slider.noUiSlider.on('set',function(){slider.value=slider.noUiSlider.get();numberRangeSliderSearch()});function numberRangeSliderSearch(){if(typeof wpDataTables[tableId].drawTable==='undefined'||wpDataTables[tableId].drawTable===!0){oTable.api().draw()} oTable.dataTableExt.afnFiltering.push(function(oSettings,aData,iDataIndex){if(oTable.attr("id")!==oSettings.sTableId) return!0;var iMin=numberFormat===1?parseFloat(slider.value[0].replace(/\./g,'').replace(',','.')):parseFloat(slider.value[0].replace(/,/g,'')) var iMax=numberFormat===1?parseFloat(slider.value[1].replace(/\./g,'').replace(',','.')):parseFloat(slider.value[1].replace(/,/g,'')) var iValue=aData[columnIndex]=="-"?'0':aData[columnIndex];iValue=numberFormat===1?parseFloat(iValue.replace(/\./g,'').replace(',','.')):parseFloat(aData[columnIndex].replace(/,/g,''));return iMin<=iValue&&iValue<=iMax});fnOnFiltered()} if(fromDefaultValue){if(!serverSide){slider.value=slider.noUiSlider.get();numberRangeSliderSearch()}} if(toDefaultValue){if(!serverSide){slider.value=slider.noUiSlider.get();numberRangeSliderSearch()}}}}else{var sFromId=oTable.attr("id")+'_range_from_'+columnIndex;var from=jQuery('');th.append(from);var sToId=oTable.attr("id")+'_range_to_'+columnIndex;var to=jQuery('');th.append(to);th.wrapInner('');customSearchIndexes.push(columnIndex);oTable.dataTableExt.afnFiltering.push(function(oSettings,aData,iDataIndex){if(oTable.attr("id")!==oSettings.sTableId) return!0;if(document.getElementById(sFromId)==null) return!0;var iMin=document.getElementById(sFromId).value.replace(replaceFormat,'');var iMax=document.getElementById(sToId).value.replace(replaceFormat,'');var iValue=aData[columnIndex]=="-"?'0':aData[columnIndex].replace(replaceFormat,'');if(numberFormat===1){iMin=iMin.replace(/,/g,'.');iMax=iMax.replace(/,/g,'.');iValue=iValue.replace(/,/g,'.')} if(iMin!==''){iMin=iMin*1} if(iMax!==''){iMax=iMax*1} iValue=iValue*1;return(iMin===""&&iMax==="")||(iMin===""&&iValue<=iMax)||(iMin<=iValue&&""===iMax)||(iMin<=iValue&&iValue<=iMax)});jQuery('#'+sFromId+', #'+sToId,th).keyup(function(){numberRangeSearch()});if(fromDefaultValue){jQuery(from).val(fromDefaultValue);if(!serverSide){jQuery(document).ready(function(){jQuery(from).keyup()})}} if(toDefaultValue){jQuery(to).val(toDefaultValue);if(!serverSide){jQuery(document).ready(function(){jQuery(to).keyup()})}} function numberRangeSearch(){var iMin=document.getElementById(sFromId).value*1;var iMax=document.getElementById(sToId).value*1;if(iMin!=0&&iMax!=0&&iMin>iMax) return;if(typeof wpDataTables[tableId].drawTable==='undefined'||wpDataTables[tableId].drawTable===!0){oTable.api().draw()} fnOnFiltered()}}} function wdtCreateDateRangeInput(oTable,aoColumn,columnIndex,sColumnLabel,th,customSearchIndexes,serverSide){var tableId=oTable.attr('id');var fromDefaultValue='',toDefaultValue='',defaultValue=aoColumn.defaultValue;var dateFormat=getMomentWdtDateFormat();if(defaultValue!==''){fromDefaultValue=defaultValue[0];toDefaultValue=defaultValue[1]} th.html('');var sFromId=oTable.attr("id")+'_range_from_'+columnIndex;var from=jQuery('');var sToId=oTable.attr("id")+'_range_to_'+columnIndex;var to=jQuery('');th.append(from).append(to);th.wrapInner('');customSearchIndexes.push(columnIndex);oTable.dataTableExt.afnFiltering.push(function(oSettings,aData,iDataIndex){if(oTable.attr("id")!=oSettings.sTableId) return!0;var dStartDate=moment(from.val(),dateFormat).toDate();var dEndDate=moment(to.val(),dateFormat).toDate();if(isNaN(dStartDate.getTime())&&isNaN(dEndDate.getTime())){return!0} var dCellDate=null;try{if(aData[columnIndex]===null||aData[columnIndex]==="") return!1;dCellDate=moment(aData[columnIndex],dateFormat).toDate()}catch(ex){return!1} if(isNaN(dCellDate.getTime())) return!1;return(isNaN(dStartDate.getTime())&&dCellDate<=dEndDate)||(dStartDate<=dCellDate&&isNaN(dEndDate.getTime()))||(dStartDate<=dCellDate&&dCellDate<=dEndDate)});jQuery('#'+sFromId+', #'+sToId,th).on('blur',function(e){if((typeof wpDataTables[tableId].drawTable==='undefined')||wpDataTables[tableId].drawTable===!0){oTable.api().draw()} fnOnFiltered()});if(fromDefaultValue){jQuery(from).val(fromDefaultValue);if(!serverSide){jQuery(document).ready(function(){jQuery(from).trigger('blur')})}} if(toDefaultValue){jQuery(to).val(toDefaultValue);if(!serverSide){jQuery(document).ready(function(){jQuery(to).trigger('blur')})}}} function wdtCreateDateTimeRangeInput(oTable,aoColumn,columnIndex,sColumnLabel,th,customSearchIndexes,serverSide){var tableId=oTable.attr('id');var fromDefaultValue='',toDefaultValue='',defaultValue=aoColumn.defaultValue;var dateFormat=getMomentWdtDateFormat();var timeFormat=getMomentWdtTimeFormat();if(defaultValue!==''){fromDefaultValue=defaultValue[0];toDefaultValue=defaultValue[1]} th.html('');var sFromId=oTable.attr("id")+'_range_from_'+columnIndex;var fromHTML='';var from=jQuery(fromHTML);var sToId=oTable.attr("id")+'_range_to_'+columnIndex;var toHTML='';var to=jQuery(toHTML);th.append(from).append(to);th.wrapInner('');customSearchIndexes.push(columnIndex);oTable.dataTableExt.afnFiltering.push(function(oSettings,aData,iDataIndex){if(oTable.attr("id")!=oSettings.sTableId) return!0;var dStartDate=moment(from.val(),dateFormat+' '+timeFormat).toDate();var dEndDate=moment(to.val(),dateFormat+' '+timeFormat).toDate();if(isNaN(dStartDate.getTime())&&isNaN(dEndDate.getTime())){return!0} var dCellDate=null;try{if(aData[columnIndex]===null||aData[columnIndex]==='') return!1;dCellDate=moment(aData[columnIndex],dateFormat+' '+timeFormat).toDate()}catch(ex){return!1} if(isNaN(dCellDate.getTime())) return!1;return(isNaN(dStartDate.getTime())&&dCellDate<=dEndDate)||(dStartDate<=dCellDate&&isNaN(dEndDate.getTime()))||(dStartDate<=dCellDate&&dCellDate<=dEndDate)});jQuery('#'+sFromId+', #'+sToId,th).on('blur',function(e){if(((typeof wpDataTables[tableId].drawTable==='undefined')||wpDataTables[tableId].drawTable===!0)&&e.oldDate!==null){oTable.api().draw()} fnOnFiltered()});if(fromDefaultValue){jQuery(from).val(fromDefaultValue);if(!serverSide){jQuery(document).ready(function(){jQuery(to).trigger('blur')})}} if(toDefaultValue){jQuery(to).val(toDefaultValue);if(!serverSide){jQuery(document).ready(function(){jQuery(to).trigger('blur')})}}} function wdtCreateTimeRangeInput(oTable,aoColumn,columnIndex,sColumnLabel,th,customSearchIndexes,serverSide){var tableId=oTable.attr('id');var fromDefaultValue='',toDefaultValue='',defaultValue=aoColumn.defaultValue;var timeFormat=getMomentWdtTimeFormat();if(defaultValue!==''){fromDefaultValue=defaultValue[0];toDefaultValue=defaultValue[1]} th.html('');var sFromId=oTable.attr("id")+'_range_from_'+columnIndex;var fromHTML='';var from=jQuery(fromHTML);var sToId=oTable.attr("id")+'_range_to_'+columnIndex;var toHTML='';var to=jQuery(toHTML);th.append(from).append(to);th.wrapInner('');customSearchIndexes.push(columnIndex);oTable.dataTableExt.afnFiltering.push(function(oSettings,aData,iDataIndex){if(oTable.attr("id")!=oSettings.sTableId) return!0;var dStartTime=moment(from.val(),timeFormat).toDate();var dEndTime=moment(to.val(),timeFormat).toDate();if(isNaN(dStartTime.getTime())&&isNaN(dEndTime.getTime())){return!0} var dCellTime=null;try{if(aData[columnIndex]===null||aData[columnIndex]==='') return!1;dCellTime=moment(aData[columnIndex],timeFormat).toDate()}catch(ex){return!1} if(isNaN(dCellTime.getTime())) return!1;return(isNaN(dStartTime.getTime())&&dCellTime<=dEndTime)||(dStartTime<=dCellTime&&isNaN(dEndTime.getTime()))||(dStartTime<=dCellTime&&dCellTime<=dEndTime)});jQuery('#'+sFromId+', #'+sToId,th).on('blur',function(e){if(((typeof wpDataTables[tableId].drawTable==='undefined')||wpDataTables[tableId].drawTable===!0)&&e.oldDate!==null){oTable.api().draw()} fnOnFiltered()});if(fromDefaultValue){jQuery(from).val(fromDefaultValue);if(!serverSide){jQuery(document).ready(function(){jQuery(to).trigger('blur')})}} if(toDefaultValue){jQuery(to).val(toDefaultValue);if(!serverSide){jQuery(document).ready(function(){jQuery(to).trigger('blur')})}}} function wdtCreateSelectbox(oTable,aoColumn,columnIndex,sColumnLabel,th,serverSide){var tableId=oTable.attr('id'),selected;if(aoColumn.values===null) aoColumn.values=getColumnDistinctValues(tableId,columnIndex,!1);if(aoColumn.possibleValuesAddEmpty===!0&&!serverSide){aoColumn.values.unshift('possibleValuesAddEmpty')} if(aoColumn.defaultValue!==''){if(jQuery.isArray(aoColumn.defaultValue)){aoColumn.defaultValue=aoColumn.defaultValue[0]}} var selectTitle=aoColumn.filterLabel?aoColumn.filterLabel:wpdatatables_frontend_strings.nothingSelected;var select='');th.html(select);th.wrapInner('');select.on('change.selectChange',function(){selectboxSearch.call(jQuery(this))});if(aoColumn.possibleValuesAjax!==-1){select.on('show.bs.select',function(e){select.closest('.filter_column').find('.bs-searchbox .form-control').val('').trigger('keyup')});select.selectpicker('refresh').ajaxSelectPicker({ajax:{url:wdt_ajax_object.ajaxurl,method:'POST',data:{wdtNonce:jQuery('#wdtNonce').val(),action:'wpdatatables_get_column_possible_values',tableId:oTable.data('wpdatatable_id'),originalHeader:aoColumn.origHeader}},cache:!1,preprocessData:function(data){if(aoColumn.possibleValuesAddEmpty===!0){data.unshift({value:'possibleValuesAddEmpty',text:' '})} data.unshift({value:''});return data},preserveSelected:!0,emptyRequest:!0,preserveSelectedPosition:'before',locale:{emptyTitle:wpdatatables_frontend_strings.nothingSelected,statusSearching:wpdatatables_frontend_strings.sLoadingRecords,currentlySelected:wpdatatables_frontend_strings.currentlySelected,errorText:wpdatatables_frontend_strings.errorText,searchPlaceholder:wpdatatables_frontend_strings.search,statusInitialized:wpdatatables_frontend_strings.statusInitialized,statusNoResults:wpdatatables_frontend_strings.statusNoResults,statusTooShort:wpdatatables_frontend_strings.statusTooShort}});if(aoColumn.defaultValue&&!serverSide){select.trigger('change').data('AjaxBootstrapSelect').list.cache={}} if(aoColumn.searchInSelectBox!==1){jQuery(th).find('.bs-searchbox').hide()}else{jQuery(th).find('.bs-searchbox').show()}}else{select.selectpicker('refresh');if(aoColumn.searchInSelectBox!==1){jQuery(th).find('.bs-searchbox').hide()}else{jQuery(th).find('.bs-searchbox').show()} if(aoColumn.defaultValue&&!serverSide){oTable.fnFilter(aoColumn.defaultValue,columnIndex)}} function selectboxSearch(){if(jQuery(this).val()!==null){var search='';if(jQuery(this).val()==='possibleValuesAddEmpty'&&!serverSide){oTable.api().column(columnIndex).search('^$',!0,!1)}else{if(aoColumn.exactFiltering){search=serverSide?decodeURIComponent(jQuery(this).val()):'^'+decodeURIComponent(jQuery(this).val())+'$';oTable.api().column(columnIndex).search(jQuery(this).val()?search:'',!0,!1)}else{oTable.api().column(columnIndex).search(decodeURIComponent(jQuery(this).val()),!0,!1)}} if(typeof wpDataTables[tableId].drawTable==='undefined'||wpDataTables[tableId].drawTable===!0){oTable.api().draw()} fnOnFiltered()}}} function wdtCreateMultiSelectbox(oTable,aoColumn,columnIndex,sColumnLabel,th,serverSide){var tableId=oTable.attr('id'),selected;if(aoColumn.values===null) aoColumn.values=getColumnDistinctValues(tableId,columnIndex,!1);if(!jQuery.isArray(aoColumn.defaultValue)){aoColumn.defaultValue=[aoColumn.defaultValue]} var selectTitle=aoColumn.filterLabel?aoColumn.filterLabel:wpdatatables_frontend_strings.nothingSelected;var select='');th.html(select);th.wrapInner('');select.on('change.selectChange',function(e){multiSelectboxSearch.call(jQuery(this))});if(aoColumn.possibleValuesAjax!==-1){select.on('show.bs.select',function(e){select.closest('.filter_column').find('.bs-searchbox .form-control').val('').trigger('keyup')});select.selectpicker('refresh').ajaxSelectPicker({ajax:{url:wdt_ajax_object.ajaxurl,method:'POST',data:{wdtNonce:jQuery('#wdtNonce').val(),action:'wpdatatables_get_column_possible_values',tableId:oTable.data('wpdatatable_id'),originalHeader:aoColumn.origHeader}},cache:!1,preprocessData:function(data){return data},preserveSelected:!0,emptyRequest:!0,preserveSelectedPosition:'before',locale:{emptyTitle:wpdatatables_frontend_strings.nothingSelected,statusSearching:wpdatatables_frontend_strings.sLoadingRecords,currentlySelected:wpdatatables_frontend_strings.currentlySelected,errorText:wpdatatables_frontend_strings.errorText,searchPlaceholder:wpdatatables_frontend_strings.search,statusInitialized:wpdatatables_frontend_strings.statusInitialized,statusNoResults:wpdatatables_frontend_strings.statusNoResults,statusTooShort:wpdatatables_frontend_strings.statusTooShort}});if(aoColumn.defaultValue[0]&&!serverSide){select.trigger('change').data('AjaxBootstrapSelect').list.cache={}} if(aoColumn.searchInSelectBox!==1){jQuery(th).find('.bs-searchbox').hide()}else{jQuery(th).find('.bs-searchbox').show()}}else{select.selectpicker('refresh');if(aoColumn.searchInSelectBox!==1){jQuery(th).find('.bs-searchbox').hide()}else{jQuery(th).find('.bs-searchbox').show()} if(aoColumn.defaultValue[0]&&!serverSide){var search='';for(var i=0;i '+labelBtn+''} r+='
';var search='';for(j=0;j'+''+''+label+''+''+'
'} if(checked){search+=buildSearchStringForMultiFilters(encodeURI(value),aoColumn.exactFiltering);oTable.api().column(columnIndex).search(search.substring(0,search.length-1))}} jQuery(th).off('change.checkboxChange').on('change.checkboxChange','#'+checkboxesDivId+' input.wdt-checkbox-filter',function(){checkboxSearch.call(jQuery(this),columnIndex,checkboxesDivId)});th.html(r);th.wrapInner('');if(aoColumn.defaultValue[0]&&!serverSide){var search='';for(var i=0;i').hide();var $modal=jQuery('#wdt-frontend-modal');var tableDesc=JSON.parse(jQuery('#'+oTable.data('described-by')).val());$modal.on('click','button.close',function(e){$modal.fadeOut(300,function(){jQuery(this).find('#'+checkboxesDivId).remove();$modal.removeClass('wdt-skin-'+tableDesc.tableSkin)})});$modal.on('keydown',function(e){if(e.keyCode===27){$modal.fadeOut(300,function(){jQuery(this).find('#'+checkboxesDivId).remove();$modal.removeClass('wdt-skin-'+tableDesc.tableSkin)})}});jQuery('#'+buttonId).on('click',function(e){e.preventDefault();jQuery('#wdt-frontend-modal .modal-title').html(labelBtn);jQuery('#wdt-frontend-modal .modal-body').append(dlg.show());jQuery('#wdt-frontend-modal .modal-footer').html('');jQuery('#wdt-frontend-modal input.wdt-checkbox-filter').off('change').on('change',function(){checkboxSearch.call(jQuery(this),columnIndex,checkboxesDivId)});if(typeof wpDataTables[tableId].onRenderCheckboxFilterModal!=='undefined'){for(var i in wpDataTables[tableId].onRenderCheckboxFilterModal){wpDataTables[tableId].onRenderCheckboxFilterModal[i]($modal,columnIndex)}} $modal.attr('data-current-checkbox-dialog',dlg.attr('id'));$modal.addClass('wdt-skin-'+tableDesc.tableSkin);$modal.modal('show')});$modal.on('shown.bs.modal',function(){jQuery(this).off('click','#wdt-checkbox-filter-close').on('click','#wdt-checkbox-filter-close',function(e){e.preventDefault();e.stopImmediatePropagation();$modal.modal('hide');if(jQuery('#'+$modal.attr('data-current-checkbox-dialog')).length){jQuery('.wdt-checkbox-modal-wrap.'+$modal.attr('data-current-checkbox-dialog')).html(jQuery('#'+$modal.attr('data-current-checkbox-dialog'))).hide()} $modal.find('.modal-body').html('')});jQuery(this).off('click','#wdt-checkbox-filter-reset').on('click.resetCheckboxFilter','#wdt-checkbox-filter-reset',function(e){e.preventDefault();e.stopImmediatePropagation();if(jQuery('#'+$modal.attr('data-current-checkbox-dialog')).length){jQuery('#'+$modal.attr('data-current-checkbox-dialog')).find(jQuery('input.wdt-checkbox-filter:checkbox:checked')).each(function(){jQuery(this).prop('checked',!1).change()})} oTable.api().column(columnIndex).search('');fnOnFiltered()})})} function checkboxSearch(columnIndex,checkboxesDivId){var tableDescription=JSON.parse(jQuery('#'+oTable.data('described-by')).val());var columnType=tableDescription.dataTableParams.columnDefs[columnIndex].wdtType;var search='',checkedInputs;checkedInputs=jQuery(this).closest('#'+checkboxesDivId).find('input:checkbox:checked');jQuery.each(checkedInputs,function(){if(columnType==='email'&&serverSide===!1){var startIndex=jQuery(this).val().indexOf('mailto:')+7;var endIndex=jQuery(this).val().lastIndexOf("%22");var value=jQuery(this).val().substr(startIndex,endIndex-startIndex)}else{value=jQuery(this).val()} search+=buildSearchStringForMultiFilters(value,aoColumn.exactFiltering)});oTable.api().column(columnIndex).search(search.substring(0,search.length-1),!0,!1);if(typeof wpDataTables[tableId].drawTable==='undefined'||wpDataTables[tableId].drawTable===!0){oTable.api().draw()} fnOnFiltered()}} function getColumnDistinctValues(tableId,columnIndex,applySearch){applySearch=applySearch?'applied':'none';var values=wpDataTables[tableId].api().column(columnIndex,{search:applySearch}).data().unique().toArray().filter(Boolean).sort();var result=[];for(var i=0;i-1) !0;else if(bInitialGrouping&&(asExpandedGroups==null||asExpandedGroups.length==0)) return!1;else return($.inArray(sGroup,asExpandedGroups)==-1)} function _fnGetYear(x){if(x.length<(iYearIndex+iYearLength)) return x;else return x.substr(iYearIndex,iYearLength)} function _fnGetGroupByName(x){return x} function _fnGetGroupByLetter(x){return x.substr(0,1)} function _fnGetGroupByYear(x){return _fnGetYear(x)} function _fnGetGroupByYearMonth(x){return x.substr(iYearIndex,iYearLength)+' '+_getMonthName(x.substr(iMonthIndex,iMonthLength))} function _fnGetCleanedGroup(sGroup){if(typeof sGroup==="undefined"||sGroup==="")return properties.sEmptyGroupLabel;return sGroup.toLowerCase().replace(/[^a-zA-Z0-9\u0080-\uFFFF]+/g,"-")} function _rowGroupingRowFilter(oSettings,aData,iDataIndex){if(oSettings.nTable.id!==oTable[0].id)return!0;var sColData=aData[properties.iGroupingColumnIndex];if(typeof sColData==="undefined") sColData=aData[oSettings.aoColumns[properties.iGroupingColumnIndex].mData];if(_fnIsGroupCollapsed(_fnGetCleanedGroup(sColData))){if(oTable.fnIsOpen(oTable.fnGetNodes(iDataIndex))){if(properties.fnOnRowClosed!=null){properties.fnOnRowClosed(this)} oTable.fnClose(oTable.fnGetNodes(iDataIndex))} return!1};return!0} function fnExpandGroup(sGroup){aoGroups[sGroup].state="expanded";$("td[data-group='"+sGroup+"']").removeClass("collapsed-group");$("td[data-group='"+sGroup+"']").addClass("expanded-group");if(properties.bUseFilteringForGrouping){oTable.fnDraw();return} if(jQuery.inArray(sGroup,asExpandedGroups)==-1) asExpandedGroups.push(sGroup);if(properties.oHideEffect!=null) $(".group-item-"+sGroup,oTable)[properties.oShowEffect.method](properties.oShowEffect.duration,properties.oShowEffect.easing,function(){});else $(".group-item-"+sGroup,oTable).show()} function fnCollapseGroup(sGroup){aoGroups[sGroup].state="collapsed";$("td[data-group='"+sGroup+"']").removeClass("expanded-group");$("td[data-group='"+sGroup+"']").addClass("collapsed-group");if(properties.bUseFilteringForGrouping){oTable.fnDraw();return} $('.group-item-'+sGroup).each(function(){if(oTable.fnIsOpen(this)){if(properties.fnOnRowClosed!=null){properties.fnOnRowClosed(this)} oTable.fnClose(this)}});if(properties.oHideEffect!=null) $(".group-item-"+sGroup,oTable)[properties.oHideEffect.method](properties.oHideEffect.duration,properties.oHideEffect.easing,function(){});else $(".group-item-"+sGroup,oTable).hide()} function _fnOnGroupClick(e){var sGroup=$(this).attr("data-group");var iGroupLevel=$(this).attr("data-group-level");var bIsExpanded=!_fnIsGroupCollapsed(sGroup);if(properties.bExpandSingleGroup){if(!bIsExpanded){var sCurrentGroup=$("td.expanded-group").attr("data-group");fnCollapseGroup(sCurrentGroup);fnExpandGroup(sGroup);if(properties.iExpandGroupOffset!=-1){var position=$("#group-id-"+oTable.attr("id")+"_"+sGroup).offset().top-properties.iExpandGroupOffset;window.scroll(0,position)}else{var position=oTable.offset().top;window.scroll(0,position)}}}else{if(bIsExpanded){fnCollapseGroup(sGroup)}else{fnExpandGroup(sGroup)}} e.preventDefault()};function _fnDrawCallBackWithGrouping(oSettings){if(oTable.fnSettings().oFeatures.bServerSide) bInitialGrouping=!0;var bUseSecondaryGrouping=!1;if(properties.iGroupingColumnIndex2!=-1) bUseSecondaryGrouping=!0;if(oSettings.aiDisplayMaster.length==0){return} var nTrs=$('tbody tr',oTable);var iColspan=0;for(var iColIndex=0;iColIndex0){for(var i=0;i").addClass(this.c.dom.container.className)};this._constructor()};d.extend(m.prototype,{action:function(a,b){var c=this._nodeToButton(a);if(b===l)return c.conf.action;c.conf.action=b;return this},active:function(a,b){var c=this._nodeToButton(a),e=this.c.dom.button.active,c=d(c.node);if(b===l)return c.hasClass(e);c.toggleClass(e,b===l?!0:b);return this},add:function(a,b){var c=this.s.buttons;if("string"===typeof b){for(var e=b.split("-"),c=this.s,d=0,h=e.length-1;d").addClass(s.className).attr("role","menu");p.conf._collection=p.collection;this._expandButton(p.buttons,p.conf.buttons,!0,e)}k.init&&k.init.call(g.button(p.node),g,d(p.node),k);h++}}}},_buildButton:function(a,b){var c=this.c.dom.button,e=this.c.dom.buttonLiner,g=this.c.dom.collection,h=this.s.dt,f=function(b){return"function"===typeof b?b(h,k,a):b};b&&g.button&&(c=g.button);b&&g.buttonLiner&&(e=g.buttonLiner);if(a.available&&!a.available(h,a))return!1;var r=function(a,b,c,e){e.action.call(b.button(c),a,b,c,e);d(b.table().node()).triggerHandler("buttons-action.dt",[b.button(c),b,c,e])},k=d("<"+c.tag+"/>").addClass(c.className).attr("tabindex",this.s.dt.settings()[0].iTabIndex).attr("aria-controls",this.s.dt.table().node().id).on("click.dtb",function(b){b.preventDefault();!k.hasClass(c.disabled)&&a.action&&r(b,h,k,a);k.blur()}).on("keyup.dtb",function(b){b.keyCode===13&&!k.hasClass(c.disabled)&&a.action&&r(b,h,k,a)});"a"===c.tag.toLowerCase()&&k.attr("href","#");e.tag?(g=d("<"+e.tag+"/>").html(f(a.text)).addClass(e.className),"a"===e.tag.toLowerCase()&&g.attr("href","#"),k.append(g)):k.html(f(a.text));!1===a.enabled&&k.addClass(c.disabled);a.className&&k.addClass(a.className);a.titleAttr&&k.attr("title",f(a.titleAttr));a.namespace||(a.namespace=".dt-button-"+v++);e=(e=this.c.dom.buttonContainer)&&e.tag?d("<"+e.tag+"/>").addClass(e.className).append(k):k;this._addKey(a);return{conf:a,node:k.get(0),inserter:e,buttons:[],inCollection:b,collection:null}},_nodeToButton:function(a,b){b||(b=this.s.buttons);for(var c=0,e=b.length;c").addClass(b).css("display","none").appendTo("body").fadeIn(c):d("body > div."+b).fadeOut(c,function(){d(this).removeClass(b).remove()})};m.instanceSelector=function(a,b){if(!a)return d.map(b,function(a){return a.inst});var c=[],e=d.map(b,function(a){return a.name}),g=function(a){if(d.isArray(a))for(var f=0,r=a.length;fg&&e._collection.css("left",a.left-(c-g))):(a=e._collection.height()/2,a>d(n).height()/2&&(a=d(n).height()/2),e._collection.css("marginTop",-1*a));e.background&&m.background(!0,e.backgroundClassName,e.fade);setTimeout(function(){d("div.dt-button-background").on("click.dtb-collection",function(){});d("body").on("click.dtb-collection",function(a){var c=d.fn.addBack?"addBack":"andSelf";if(!d(a.target).parents()[c]().filter(e._collection).length){e._collection.fadeOut(e.fade,function(){e._collection.detach()});d("div.dt-button-background").off("click.dtb-collection");m.background(!1,e.backgroundClassName,e.fade);d("body").off("click.dtb-collection");b.off("buttons-action.b-internal")}})},10);if(e.autoClose)b.on("buttons-action.b-internal",function(){d("div.dt-button-background").click()})},background:!0,collectionLayout:"",backgroundClassName:"dt-button-background",autoClose:!1,fade:400},copy:function(a,b){if(j.copyHtml5)return"copyHtml5";if(j.copyFlash&&j.copyFlash.available(a,b))return"copyFlash"},csv:function(a,b){if(j.csvHtml5&&j.csvHtml5.available(a,b))return"csvHtml5";if(j.csvFlash&&j.csvFlash.available(a,b))return"csvFlash"},excel:function(a,b){if(j.excelHtml5&&j.excelHtml5.available(a,b))return"excelHtml5";if(j.excelFlash&&j.excelFlash.available(a,b))return"excelFlash"},pdf:function(a,b){if(j.pdfHtml5&&j.pdfHtml5.available(a,b))return"pdfHtml5";if(j.pdfFlash&&j.pdfFlash.available(a,b))return"pdfFlash"},pageLength:function(a){var a=a.settings()[0].aLengthMenu,b=d.isArray(a[0])?a[0]:a,c=d.isArray(a[0])?a[1]:a,e=function(a){return a.i18n("buttons.pageLength",{"-1":"Show all rows",_:"Show %d rows"},a.page.len())};return{extend:"collection",text:e,className:"buttons-page-length",autoClose:!0,buttons:d.map(b,function(a,b){return{text:c[b],className:"button-page-length",action:function(b,c){c.page.len(a).draw()},init:function(b,c,d){var e=this,c=function(){e.active(b.page.len()===a)};b.on("length.dt"+d.namespace,c);c()},destroy:function(a,b,c){a.off("length.dt"+c.namespace)}}}),init:function(a,b,c){var d=this;a.on("length.dt"+c.namespace,function(){d.text(e(a))})},destroy:function(a,b,c){a.off("length.dt"+c.namespace)}}}});i.Api.register("buttons()",function(a,b){b===l&&(b=a,a=l);this.selector.buttonGroup=a;var c=this.iterator(!0,"table",function(c){if(c._buttons)return m.buttonSelector(m.instanceSelector(a,c._buttons),b)},!0);c._groupSelector=a;return c});i.Api.register("button()",function(a,b){var c=this.buttons(a,b);1').html(a?"

"+a+"

":"").append(d("
")["string"===typeof b?"html":"append"](b)).css("display","none").appendTo("body").fadeIn();c!==l&&0!==c&&(q=setTimeout(function(){e.buttons.info(!1)},c));return this});i.Api.register("buttons.exportData()",function(a){if(this.context.length){for(var b=new i.Api(this.context[0]),c=d.extend(!0,{},{rows:null,columns:"",modifier:{search:"applied",order:"applied"},orthogonal:"display",stripHtml:!0,stripNewlines:!0,decodeEntities:!0,trim:!0,format:{header:function(a){return e(a)},footer:function(a){return e(a)},body:function(a){return e(a)}}},a),e=function(a){if("string"!==typeof a)return a;a=a.replace(/)<[^<]*)*<\/script>/gi,"");c.stripHtml&&(a=a.replace(/<[^>]*>/g,""));c.trim&&(a=a.replace(/^\s+|\s+$/g,""));c.stripNewlines&&(a=a.replace(/\n/g," "));c.decodeEntities&&(t.innerHTML=a,a=t.value);return a},a=b.columns(c.columns).indexes().map(function(a){var d=b.column(a).header();return c.format.header(d.innerHTML,a,d)}).toArray(),g=b.table().footer()?b.columns(c.columns).indexes().map(function(a){var d=b.column(a).footer();return c.format.footer(d?d.innerHTML:"",a,d)}).toArray():null,h=b.rows(c.rows,c.modifier).indexes().toArray(),f=b.cells(h,c.columns),h=f.render(c.orthogonal).toArray(),f=f.nodes().toArray(),j=a.length,k=0")[0];d.fn.dataTable.Buttons=m;d.fn.DataTable.Buttons=m;d(o).on("init.dt plugin-init.dt",function(a,b){if("dt"===a.namespace){var c=b.oInit.buttons||i.defaults.buttons;c&&!b._buttons&&(new m(b,c)).container()}});i.ext.feature.push({fnInit:function(a){var a=new i.Api(a),b=a.init().buttons||i.defaults.buttons;return(new m(a,b)).container()},cFeature:"B"});return m});(function(i){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(g){return i(g,window,document)}):"object"===typeof exports?module.exports=function(g,l,r,s){g||(g=window);if(!l||!l.fn.dataTable)l=require("datatables.net")(g,l).$;l.fn.dataTable.Buttons||require("datatables.net-buttons")(g,l);return i(l,g,g.document,r,s)}:i(jQuery,window,document)})(function(i,g,l,r,s,o){function z(a,c){t===o&&(t=-1===x.serializeToString(i.parseXML(A["xl/worksheets/sheet1.xml"])).indexOf("xmlns:r"));i.each(c,function(c,b){if(i.isPlainObject(b)){var e=a.folder(c);z(e,b)}else{if(t){var e=b.childNodes[0],h,f,u=[];for(h=e.attributes.length-1;0<=h;h--){f=e.attributes[h].nodeName;var m=e.attributes[h].nodeValue;-1!==f.indexOf(":")&&(u.push({name:f,value:m}),e.removeAttribute(f))}h=0;for(f=u.length;h'+e),e=e.replace(/_dt_b_namespace_token_/g,":"));e=e.replace(/<([^<>]*?) xmlns=""([^<>]*?)>/g,"<$1 $2>");a.file(c,e)}})}function p(a,c,d){var b=a.createElement(c);d&&(d.attr&&i(b).attr(d.attr),d.children&&i.each(d.children,function(a,c){b.appendChild(c)}),d.text&&b.appendChild(a.createTextNode(d.text)));return b}function I(a,c){var d=a.header[c].length,b;a.footer&&a.footer[c].length>d&&(d=a.footer[c].length);for(var e=0,h=a.body.length;ed&&(d=b),401*a[1]?!0:!1};try{var x=new XMLSerializer,t}catch(P){}var A={"_rels/.rels":'',"xl/_rels/workbook.xml.rels":'',"[Content_Types].xml":'',"xl/workbook.xml":'',"xl/worksheets/sheet1.xml":'',"xl/styles.xml":''},H=[{match:/^\-?\d+\.\d%$/,style:60,fmt:function(a){return a/100}},{match:/^\-?\d+\.?\d*%$/,style:56,fmt:function(a){return a/100}},{match:/^\-?\$[\d,]+.?\d*$/,style:57},{match:/^\-?£[\d,]+.?\d*$/,style:58},{match:/^\-?€[\d,]+.?\d*$/,style:59},{match:/^\-?\d+$/,style:65},{match:/^\-?\d+\.\d{2}$/,style:66},{match:/^\([\d,]+\)$/,style:61,fmt:function(a){return-1*a.replace(/[\(\)]/g,"")}},{match:/^\([\d,]+\.\d{2}\)$/,style:62,fmt:function(a){return-1*a.replace(/[\(\)]/g,"")}},{match:/^\-?[\d,]+$/,style:63},{match:/^\-?[\d,]+\.\d{2}$/,style:64}];n.ext.buttons.copyHtml5={className:"buttons-copy buttons-html5",text:function(a){return a.i18n("buttons.copy","Copy")},action:function(a,c,d,b){this.processing(!0);var e=this,a=F(c,b),h=a.str,d=i("
").css({height:1,width:1,overflow:"hidden",position:"fixed",top:0,left:0});b.customize&&(h=b.customize(h,b));b=i("';obj.params.currentCell.empty().append(obj.params.code);$(obj.params.editSelector).focus();$(obj.params.editSelector).blur(function(){obj.params.value=$(this).val();obj.validateAndSave($(this))})},tinymceCell:function(){obj.parseLink();if(obj.params.value.indexOf('
')!=-1){obj.params.value=(obj.params.value).replace(//g,"\n")} obj.params.code='';obj.params.currentCell.empty().append(obj.params.code);tinymce.init({selector:obj.params.editSelector,auto_focus:obj.params.editInputId,menubar:!1,plugins:'link image media lists hr colorpicker fullscreen textcolor code',toolbar:'undo redo formatselect bold italic underline strikethrough subscript superscript | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent blockquote | hr fullscreen | link unlink image | forecolor backcolor removeformat | code',init_instance_callback:function(editor){editor.on('blur',function(e){tinymce.triggerSave();obj.params.value=$(obj.params.editSelector).val();obj.validateAndSave($(obj.params.editSelector))})}})},linkCell:function(){obj.parseLink();if(obj.params.value==null){obj.params.value=''} obj.params.code='';obj.params.currentCell.empty().append(obj.params.code);$(obj.params.editSelector).focus();$(obj.params.editSelector).blur(function(){if(obj.params.columnType=='icon'){obj.params.value=''}else{obj.params.value=$(this).val()} obj.validateAndSave($(this))})},dateCell:function(){obj.params.code='';obj.params.currentCell.empty().append(obj.params.code);$(obj.params.editSelector).focus();var hasFired=!1;$(obj.params.editSelector).blur(function(){if(!hasFired){hasFired=!0;obj.params.value=$(this).val();obj.validateAndSave($(this))}})},timeCell:function(){obj.params.code='';obj.params.currentCell.empty().append(obj.params.code);$(obj.params.editSelector).focus();$(obj.params.editSelector).blur(function(){obj.params.value=$(this).val();obj.validateAndSave($(this))})},datetimeCell:function(){obj.params.code='';obj.params.currentCell.empty().append(obj.params.code);$(obj.params.editSelector).focus();$(obj.params.editSelector).blur(function(){obj.params.value=$(this).val();obj.validateAndSave($(this))})},selectboxCell:function(){obj.params.code=$('#'+tableDescription.tableId+'_'+obj.params.columnHeader).clone();obj.params.currentCell.empty().append(obj.params.code.attr('id',obj.params.editInputId).removeClass('selecter-element'));if(obj.params.possibleValuesAjax===-1){if(obj.params.value!==null){$.each(obj.params.value.split(", "),function(i,e){$(obj.params.editSelector+' option[value="'+e+'"]').prop("selected",!0)})}} $(obj.params.editSelector).selectpicker();if(obj.params.possibleValuesAjax!==-1){$(obj.params.editSelector).html('');$(obj.params.editSelector).selectpicker('refresh').ajaxSelectPicker({ajax:{url:tableDescription.adminAjaxBaseUrl,method:'POST',data:{wdtNonce:$('#wdtNonce').val(),action:'wpdatatables_get_column_possible_values',tableId:tableDescription.tableWpId,originalHeader:obj.params.columnHeader}},cache:!1,preprocessData:function(data){if(obj.params.inputType==='selectbox'){data.unshift({value:''})} return data},preserveSelected:!0,emptyRequest:!0,preserveSelectedPosition:'before',locale:{emptyTitle:wpdatatables_frontend_strings.nothingSelected,statusSearching:wpdatatables_frontend_strings.sLoadingRecords,currentlySelected:wpdatatables_frontend_strings.currentlySelected,errorText:wpdatatables_frontend_strings.errorText,searchPlaceholder:wpdatatables_frontend_strings.search,statusInitialized:wpdatatables_frontend_strings.statusInitialized,statusNoResults:wpdatatables_frontend_strings.statusNoResults,statusTooShort:wpdatatables_frontend_strings.statusTooShort}});$(obj.params.editSelector).on('show.bs.select',function(e){setTimeout(function(){$(obj.params.editSelector).trigger('change').data('AjaxBootstrapSelect').list.cache={};$(obj.params.editSelector).closest('.bootstrap-select').find('.bs-searchbox .form-control').val('').trigger('keyup')},500);if(obj.params.value!==null){if(obj.params.inputType==='multi-selectbox'){var selectedValues=!Array.isArray(obj.params.value)?obj.params.value.split(', '):obj.params.value;$.each(selectedValues,function(index,value){if(value){$(obj.params.editSelector).append('')}})}else{$(obj.params.editSelector).append('')} $(obj.params.editSelector).selectpicker('refresh')}})} obj.params.currentCell.css({'overflow':'initial'});$(obj.params.editSelector).selectpicker('toggle');if(obj.params.possibleValuesAjax===-1){if(obj.params.inputType==='selectbox'){$(obj.params.editSelector).on('changed.bs.select',function(){$(obj.params.editSelector).data('changed',!0);obj.params.value=$(this).val();if($.type(obj.params.value)==='array'){obj.params.value=obj.params.value.join(', ')} obj.validateAndSave($(this))})}} $(obj.params.editSelector).on('hidden.bs.select',function(){obj.params.value=$('#'+obj.params.editInputId).val();if($.type(obj.params.value)==='array'){obj.params.value=obj.params.value.join(', ')} obj.validateAndSave($(this))})},attachmentCell:function(){obj.params.value='';var src='';if(obj.params.currentCell.find('img').length>0){if(obj.params.currentCell.find('img').attr('src').length>0){src=obj.params.currentCell.find('img').attr('src')}}else if(obj.params.currentCell.find('a').length>0){if(obj.params.currentCell.find('a').attr('href').length>0){src=obj.params.currentCell.find('a').attr('href')}}else{src=obj.params.currentCell.html()} var fileName=src.substring(src.lastIndexOf('/')+1);obj.params.code=''+''+wpdatatables_frontend_strings.selectFileAttachment+''+''+wpdatatables_frontend_strings.changeFileAttachment+''+''+''+''+''+'';obj.params.currentCell.empty().append(obj.params.code);obj.fileUploadInit('row_edit_'+tableDescription.tableId);var $inputElement=$('#row_edit_'+tableDescription.tableId+'_sets');if(fileName!=''){$inputElement.parent().parent().removeClass('fileinput-new').addClass('fileinput-exists');$inputElement.parent().parent().find('.fileinput-filename').text(fileName)}else{$inputElement.parent().parent().removeClass('fileinput-exists').addClass('fileinput-new');$inputElement.parent().parent().find('.fileinput-filename').text('')} $('.fileinput-save').click(function(){obj.params.value=$('#row_edit_'+tableDescription.tableId+'_sets').val();obj.params.value='';$('#row_edit_'+tableDescription.tableId+'_sets').closest('td').empty().html(obj.params.value);obj.validateAndSave($(this))})}},fileUploadInit:function(selector){if($('.fileupload_'+selector).length){var attachment=null;wdtCustomUploader=wp.media({title:wpdatatables_frontend_strings.select_upload_file,button:{text:wpdatatables_frontend_strings.choose_file},multiple:!1});$('.fileupload_'+selector).click(function(e){e.preventDefault();var $button=$(this);var $relInput=$('#'+$button.data('rel_input'));if(obj.params.columnType=='icon'){wdtCustomUploader=wp.media({title:wpdatatables_frontend_strings.select_upload_file,button:{text:wpdatatables_frontend_strings.choose_file},multiple:!1,library:{type:'image'}});wdtCustomUploader.off('select').on('select',function(){attachment=wdtCustomUploader.state().get('selection').first().toJSON();var val=attachment.url;$relInput.parent().parent().parent().find('.fileinput-preview').html('');$relInput.parent().parent().parent().removeClass('fileinput-new').addClass('fileinput-exists');$relInput.parent().parent().removeClass('fileinput-new').addClass('fileinput-exists');if(attachment.sizes.thumbnail){val=attachment.sizes.thumbnail.url+'||'+val} $relInput.val(val)})}else{wdtCustomUploader.off('select').on('select',function(){attachment=wdtCustomUploader.state().get('selection').first().toJSON();$relInput.val(attachment.url);$relInput.parent().parent().removeClass('fileinput-new').addClass('fileinput-exists');$relInput.parent().parent().find('.fileinput-filename').text(attachment.filename)})} wdtCustomUploader.open()});$('.wdt-detach-attachment-file-inline').click(function(e){e.preventDefault();e.stopImmediatePropagation();if($(this).parent().find('span.fileupload-'+tableDescription.tableId).data('column_type')=='icon'){$(this).parent().find('input.editDialogInput').val('');$(this).parent().parent().find('.fileinput-preview').html('');$(this).parent().parent().removeClass('fileinput-exists').addClass('fileinput-new');$(this).parent().removeClass('fileinput-exists').addClass('fileinput-new')}else{$(this).parent().find('input.editDialogInput').val('');$(this).parent().find('.fileinput-filename').text('');$(this).parent().removeClass('fileinput-exists').addClass('fileinput-new')}})}},bindClickEvent:function(){$(tableDescription.selector+' tbody').on('dblclick','td',function(e){e.preventDefault();e.stopImmediatePropagation();var target=e.target||e.srcElement;var elementName=target.tagName.toLowerCase();if(elementName=='input'||elementName=='span'||!obj.params.valid||$(this).hasClass('editing')){return!1} obj.removeSelection();if(!$(this).hasClass("dataTables_empty")){$(this).addClass('editing')} obj.params.table=$(tableDescription.selector).DataTable();if(wpDataTables[obj.params.tableId].fnSettings().fnRecordsTotal()==0){return!1} obj.params.cellData=obj.params.table.cell(this).data();obj.params.cellInfo=obj.params.table.cell(this).index();obj.params.columnId=obj.params.cellInfo.column;obj.params.columnType=wpDataTables[obj.params.tableId].fnSettings().aoColumns[obj.params.columnId].wdtType;obj.params.rowId=obj.params.cellInfo.row;obj.params.inputType=dataTableOptions.aoColumnDefs[obj.params.columnId].InputType;obj.params.columnHeader=dataTableOptions.aoColumnDefs[obj.params.columnId].origHeader;obj.params.notNull=dataTableOptions.aoColumnDefs[obj.params.columnId].notNull;obj.params.value=obj.params.cellData;obj.params.currentCell=$(this);obj.params.possibleValuesAjax=tableDescription.advancedEditingOptions.aoColumns[obj.params.columnId].possibleValuesAjax;if($(this).children('.responsiveExpander')!=''){obj.params.expandButton=$(this).children('.responsiveExpander')} switch(obj.params.inputType){case 'none':obj.FieldTypeMethods.noneditableCell();break;case 'text':obj.FieldTypeMethods.textCell();break;case 'textarea':obj.FieldTypeMethods.textareaCell();break;case 'mce-editor':obj.FieldTypeMethods.tinymceCell();break;case 'link':case 'email':obj.FieldTypeMethods.linkCell();break;case 'date':obj.FieldTypeMethods.dateCell();break;case 'time':obj.FieldTypeMethods.timeCell();break;case 'datetime':obj.FieldTypeMethods.datetimeCell();break;case 'multi-selectbox':case 'selectbox':obj.FieldTypeMethods.selectboxCell();break;case 'attachment':obj.FieldTypeMethods.attachmentCell();break}})}};obj.bindClickEvent()};'use strict';function ResponsiveDatatablesHelper(tableSelector,breakpoints,options){if(typeof tableSelector==='string'){this.tableElement=jQuery(tableSelector)}else{this.tableElement=tableSelector} this.api=this.tableElement.dataTable().api();this.columnIndexes=[];this.columnsShownIndexes=[];this.columnsHiddenIndexes=[];this.currentBreakpoint='';this.lastBreakpoint='';this.lastColumnsHiddenIndexes=[];var fileName=window.location.pathname.split("/").pop();var context=this.api.settings().context[0];this.tableId=context.sTableId;this.saveState=context.oInit.bStateSave;this.cookieName='DataTablesResponsiveHelper_'+this.tableId+(fileName?'_'+fileName:'');this.lastStateExists=!1;this.expandColumn=undefined;this.origBreakpointsDefs=undefined;this.breakpoints={};this.options={hideEmptyColumnsInRowDetail:!1,clickOn:'icon',showDetail:null,hideDetail:null};this.expandIconTemplate='';this.rowTemplate='
';this.rowLiTemplate='
  • :
  • ';this.disabled=!0;this.skipNextWindowsWidthChange=!1;this.init(breakpoints,options)} ResponsiveDatatablesHelper.prototype.init=function(breakpoints,options){this.origBreakpointsDefs=breakpoints;this.initBreakpoints();this.disable(!1);jQuery.extend(this.options,options)};ResponsiveDatatablesHelper.prototype.initBreakpoints=function(){if(this.saveState){this.getState()} if(!this.lastStateExists){var breakpointsSorted=[];for(var prop in this.origBreakpointsDefs){breakpointsSorted.push({name:prop,upperLimit:this.origBreakpointsDefs[prop],columnsToHide:[]})} breakpointsSorted.sort(function(a,b){return a.upperLimit-b.upperLimit});var lowerLimit=0;for(var i=0;ielement.lowerLimit)&&(!element.upperLimit||newWindowWidth<=element.upperLimit)){this.currentBreakpoint=element.name;newColumnsToHide=element.columnsToHide}} var columnShowHide=!1;if(!this.skipNextWindowsWidthChange){if(this.lastBreakpoint.length===0&&newColumnsToHide.length){columnShowHide=!0}else if(this.lastBreakpoint!=this.currentBreakpoint){columnShowHide=!0}else if(this.columnsHiddenIndexes.length!==newColumnsToHide.length){columnShowHide=!0}else{var d1=this.difference(this.columnsHiddenIndexes,newColumnsToHide).length;var d2=this.difference(newColumnsToHide,this.columnsHiddenIndexes).length;columnShowHide=d1+d2>0}} if(columnShowHide){this.skipNextWindowsWidthChange=!0;this.columnsHiddenIndexes=newColumnsToHide;this.columnsShownIndexes=this.difference(this.columnIndexes,this.columnsHiddenIndexes);this.showHideColumns();this.lastBreakpoint=this.currentBreakpoint;this.setState();this.skipNextWindowsWidthChange=!1} if(this.columnsHiddenIndexes.length){this.tableElement.addClass('has-columns-hidden');jQuery('tr.detail-show',this.tableElement).each(function(index,element){var tr=jQuery(element);if(tr.next('.row-detail').length===0){ResponsiveDatatablesHelper.prototype.showRowDetail(that,tr)}})}else{this.tableElement.removeClass('has-columns-hidden');jQuery('tr.row-detail',this.tableElement).each(function(event){ResponsiveDatatablesHelper.prototype.hideRowDetail(that,jQuery(this).prev())})}};ResponsiveDatatablesHelper.prototype.showHideColumns=function(){for(var i=0,l=this.columnsShownIndexes.length;i td').attr('colspan',colspan);tr.after(newTr);if(responsiveDatatablesHelperInstance.options.showDetail){responsiveDatatablesHelperInstance.options.showDetail(newTr)}};ResponsiveDatatablesHelper.prototype.hideRowDetail=function(responsiveDatatablesHelperInstance,tr){var rowDetail=tr.next('.row-detail');if(responsiveDatatablesHelperInstance.options.hideDetail){responsiveDatatablesHelperInstance.options.hideDetail(rowDetail)} rowDetail.find('li').each(function(){var columnValueContainer=jQuery(this).find('span.columnValue');var tdContents=columnValueContainer.contents();var td=columnValueContainer.data('originalTdSource');jQuery(td).empty().append(tdContents)});rowDetail.remove()};ResponsiveDatatablesHelper.prototype.disable=function(disable){this.disabled=(disable===undefined)||disable;if(this.disabled){this.setWindowsResizeHandler(!1);jQuery('tbody tr.row-detail',this.tableElement).remove();jQuery('tbody tr',this.tableElement).removeClass('detail-show');jQuery('tbody tr span.responsiveExpander',this.tableElement).remove();this.columnsHiddenIndexes=[];this.columnsShownIndexes=this.columnIndexes;this.showHideColumns();this.tableElement.removeClass('has-columns-hidden');this.tableElement.off('click','span.responsiveExpander',this.showRowDetailEventHandler)}else{this.setWindowsResizeHandler()}};ResponsiveDatatablesHelper.prototype.getState=function(){if(typeof(Storage)){var value=JSON.parse(localStorage.getItem(this.cookieName));if(value){this.columnIndexes=value.columnIndexes;this.breakpoints=value.breakpoints;this.expandColumn=value.expandColumn;this.lastBreakpoint=value.lastBreakpoint;this.lastStateExists=!0}}else{}};ResponsiveDatatablesHelper.prototype.setState=function(){if(typeof(Storage)){var d1=this.difference(this.lastColumnsHiddenIndexes,this.columnsHiddenIndexes).length;var d2=this.difference(this.columnsHiddenIndexes,this.lastColumnsHiddenIndexes).length;if(d1+d2>0){var tt;var value={columnIndexes:this.columnIndexes,columnsHiddenIndexes:this.columnsHiddenIndexes,breakpoints:this.breakpoints,expandColumn:this.expandColumn,lastBreakpoint:this.lastBreakpoint};var isSafari=!!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/);if(!isSafari){localStorage.setItem(this.cookieName,JSON.stringify(value))} this.lastColumnsHiddenIndexes=this.columnsHiddenIndexes.slice(0)}}else{}};ResponsiveDatatablesHelper.prototype.difference=function(a,b){var arr=[],i,hash={};for(i=b.length-1;i>=0;i--){hash[b[i]]=!0} for(i=a.length-1;i>=0;i--){if(hash[a[i]]!==!0){arr.push(a[i])}} return arr};jQuery(document).ready(function($){var wdtDateFormat=getMomentWdtDateFormat();var wdtTimeFormat=getMomentWdtTimeFormat();jQuery('.wdt-preload-layer').animateFadeOut();if(typeof wpdatatables_frontend_strings!=='undefined'){$.fn.DataTable.defaults.oLanguage.sInfo=wpdatatables_frontend_strings.sInfo;$.fn.DataTable.defaults.oLanguage.sSearch=wpdatatables_frontend_strings.sSearch;$.fn.DataTable.defaults.oLanguage.lengthMenu=wpdatatables_frontend_strings.lengthMenu;$.fn.DataTable.defaults.oLanguage.sEmptyTable=wpdatatables_frontend_strings.sEmptyTable;$.fn.DataTable.defaults.oLanguage.sInfoEmpty=wpdatatables_frontend_strings.sInfoEmpty;$.fn.DataTable.defaults.oLanguage.sInfoFiltered=wpdatatables_frontend_strings.sInfoFiltered;$.fn.DataTable.defaults.oLanguage.sInfoPostFix=wpdatatables_frontend_strings.sInfoPostFix;$.fn.DataTable.defaults.oLanguage.sInfoThousands=wpdatatables_frontend_strings.sInfoThousands;$.fn.DataTable.defaults.oLanguage.sLengthMenu=wpdatatables_frontend_strings.sLengthMenu;$.fn.DataTable.defaults.oLanguage.sProcessing=wpdatatables_frontend_strings.sProcessing;$.fn.DataTable.defaults.oLanguage.sZeroRecords=wpdatatables_frontend_strings.sZeroRecords;$.fn.DataTable.defaults.oLanguage.oPaginate=wpdatatables_frontend_strings.oPaginate;$.fn.DataTable.defaults.oLanguage.oAria=wpdatatables_frontend_strings.oAria} if(typeof($.fn.dataTableExt)!=='undefined'){$.fn.dataTableExt.errMode='throw';$.fn.dataTableExt.oApi.fnFilterClear=function(oSettings){oSettings.oPreviousSearch.sSearch="";if(typeof oSettings.aanFeatures.f!='undefined'){var n=oSettings.aanFeatures.f;for(var i=0,iLen=n.length;iordB)?1:0)};$.fn.dataTableExt.oSort['date-dd-mmm-yyyy-desc']=function(a,b){"use strict";var ordA=wdtCustomDateDDMMMYYYYToOrd(a),ordB=wdtCustomDateDDMMMYYYYToOrd(b);return(ordAordB)?-1:0)}} $('body').on('focus','.wdt-datepicker',function(){$(this).datetimepicker({format:wdtDateFormat,showClear:!0,keepOpen:!0,useCurrent:!1}).off('dp.show').on('dp.show',function(){$(this).parent().find('div.bootstrap-datetimepicker-widget').addClass('wdt-datetimepicker-modal');if(!_.contains(['MM/Y','MMM Y','Y'],wdtDateFormat)){wdtAddDatePlaceholders($(this))} if($('.wdtscroll').length&&$(this).parents('table').length!=0){var leftPos=$(this).offset().left-$('.wdtscroll').offset().left var topPos=$(this).offset().top $(".bootstrap-datetimepicker-widget").css('inset',topPos+'px auto auto '+leftPos+'px')}})});$('body').on('focus','.wdt-timepicker',function(){$(this).datetimepicker({format:wdtTimeFormat,showClear:!0,keepOpen:!0,useCurrent:!1}).off('dp.show').on('dp.show',function(){$(this).parent().find('div.bootstrap-datetimepicker-widget').addClass('wdt-datetimepicker-modal');if($('.wdtscroll').length&&$(this).parents('table').length!=0){var leftPos=$(this).offset().left-$('.wdtscroll').offset().left var topPos=$(this).offset().top $(".bootstrap-datetimepicker-widget").css('inset',topPos+'px auto auto '+leftPos+'px')}})});$('body').on('focus','.wdt-datetimepicker',function(){$(this).datetimepicker({format:wdtDateFormat+' '+wdtTimeFormat,showClear:!0,keepOpen:!0,useCurrent:!1}).off('dp.show').on('dp.show',function(){$(this).parent().find('div.bootstrap-datetimepicker-widget').addClass('wdt-datetimepicker-modal');if(!_.contains(['MM/Y','MMM Y','Y'],wdtDateFormat)){wdtAddDatePlaceholders($(this))} if($('.wdtscroll').length&&$(this).parents('table').length!=0){var leftPos=$(this).offset().left-$('.wdtscroll').offset().left var topPos=$(this).offset().top $(".bootstrap-datetimepicker-widget").css('inset',topPos+'px auto auto '+leftPos+'px')}})})});var wdtCustomDateDDMMMYYYYToOrd=function(date){"use strict";var dateParts=date.split(/-/);return(dateParts[2]*10000)+(jQuery.inArray(dateParts[1].toUpperCase(),["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"])*100)+dateParts[0]};function wdtValidateURL(textval){var regex=/^([a-z]([a-z]|\d|\+|-|\.)*):(\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?((\[(|(v[\da-f]{1,}\.(([a-z]|\d|-|\.|_|~)|[!\$&'\(\)\*\+,;=]|:)+))\])|((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=])*)(:\d*)?)(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*|(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)){0})(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?(||.*)?$/i;return regex.test(textval)} function wdtPrepareDate(date,wdtDateFormat,wdtTimeFormat){var format=wdtDateFormat+' '+wdtTimeFormat;return moment(date,format).valueOf()} function wdtPrepareTime(time,wdtTimeFormat){return moment(time,wdtTimeFormat).valueOf()} function wdtValidateEmail(email){var regex=/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+(||.*)?$/;return regex.test(email)} function wdtRandString(n){if(!n){n=5} var text='';var possible='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';for(var i=0;i3?j%3:0;return s+(j?i.substr(0,j)+t:"")+i.substr(j).replace(/(\d{3})(?=\d)/g,"$1"+t)+(c?d+Math.abs(n-i).toFixed(c).slice(2):"")} function wdtUnformatNumber(number,thousandsSeparator,decimalsSeparator,isFloat){if(typeof isFloat=='undefined'){isFloat=!1} var return_string=String(number).replace(new RegExp('\\'+thousandsSeparator,'g'),'');if(isFloat&&decimalsSeparator==','){return_string=return_string.replace(new RegExp('\\'+decimalsSeparator),'.')} return return_string} function wdtCalculateColumnSum(columnData,thousandsSeparator){if(columnData.length>0){if(thousandsSeparator=='.'){var sum=columnData.reduce(function(a,b){return parseFloat(a)+parseFloat(b.replace(/\./g,'').replace(',','.'))},0)}else{sum=columnData.reduce(function(a,b){return parseFloat(a)+parseFloat(b.replace(/\,/g,''))},0)}}else{sum=0} return parseFloat(sum)} function wdtCalculateColumnMin(columnData,thousandsSeparator){if(columnData.length>0){var min='';if(thousandsSeparator=='.'){if(columnData.length==1){min=parseFloat(typeof(columnData[0])=='number'?columnData[0]:columnData[0].replace(/\./g,'').replace(',','.'))}else{min=columnData.reduce(function(a,b){return parseInt(typeof(a)=='number'?a:a.replace(/\./g,''))<=parseInt(b.replace(/\./g,''))?parseFloat(typeof(a)=='number'?a:a.replace(/\./g,'').replace(',','.')):parseFloat(b.replace(/\./g,'').replace(',','.'))})}}else{min=columnData.reduce(function(a,b){return parseInt(typeof(a)=='number'?a:a.replace(/\,/g,''))<=parseInt(b.replace(/\,/g,''))?parseFloat(typeof(a)=='number'?a:a.replace(/\,/g,'')):parseFloat(b.replace(/\,/g,''))})}}else{min=0} return min} function wdtCalculateColumnMax(columnData,thousandsSeparator){if(columnData.length>0){var max='';if(thousandsSeparator=='.'){if(columnData.length==1){max=parseFloat(typeof(columnData[0])=='number'?columnData[0]:columnData[0].replace(/\./g,'').replace(',','.'))}else{max=columnData.reduce(function(a,b){return parseInt(typeof(a)=='number'?a:a.replace(/\./g,''))>=parseInt(b.replace(/\./g,''))?parseFloat(typeof(a)=='number'?a:a.replace(/\./g,'').replace(',','.')):parseFloat(b.replace(/\./g,'').replace(',','.'))})}}else{max=columnData.reduce(function(a,b){return parseInt(typeof(a)=='number'?a:a.replace(/\,/g,''))>=parseInt(b.replace(/\,/g,''))?parseFloat(typeof(a)=='number'?a:a.replace(/\,/g,'')):parseFloat(b.replace(/\,/g,''))})}}else{max=0} return max} function wdtFormatNumberByColumnType(number,columnType,columnDecimalPlaces,generalDecimalPlaces,decimalSeparator,thousandsSeparator){var numStr='';if(columnType=='int'){numStr=wdtFormatNumber(number,0,decimalSeparator,thousandsSeparator)}else{if(columnDecimalPlaces!=-1){numStr=wdtFormatNumber(number,columnDecimalPlaces,decimalSeparator,thousandsSeparator)}else{numStr=wdtFormatNumber(number,generalDecimalPlaces,decimalSeparator,thousandsSeparator)}} return numStr} function wdtFillPossibleValuesList(distValues){if(jQuery('#wdt-column-values-list').tagsinput('items').length>0){jQuery('#wdt-possible-values-merge-list-modal').modal('show');jQuery('.wdt-merge-possible-values').click(function(e){e.preventDefault();e.stopImmediatePropagation();var oldListValues=jQuery.extend([],jQuery('#wdt-column-values-list').tagsinput('items'));var mergedValues=jQuery.merge(oldListValues,distValues);jQuery('#wdt-column-values-list').tagsinput('removeAll');mergedValues.sort();mergedValues=jQuery.unique(mergedValues);jQuery('#wdt-column-values-list').tagsinput('add',mergedValues.join('|'));jQuery('#wdt-possible-values-merge-list-modal').modal('hide')});jQuery('.wdt-replace-possible-values').click(function(e){e.preventDefault();e.stopImmediatePropagation();jQuery('#wdt-column-values-list').tagsinput('removeAll');distValues.sort();jQuery('#wdt-column-values-list').tagsinput('add',distValues.join('|'));jQuery('#wdt-possible-values-merge-list-modal').modal('hide')})}else{distValues.sort();jQuery('#wdt-column-values-list').tagsinput('add',distValues.join('|'))}} function wdtAddDatePlaceholders(input){if(input.hasClass("formatting-rule-cell-value")){var datePlaceholders='
    '+' '+' '+' '+' '+' '+' '+' '+' '+'
    ';jQuery('.datepicker').closest("ul.list-unstyled").append(datePlaceholders);jQuery('.wdt-date-placeholder').tooltip();jQuery('.wdt-today-placeholder').click(function(){jQuery(this).closest('.form-group').find('.formatting-rule-cell-value').val('%TODAY%').data("DateTimePicker").hide()}) jQuery('.wdt-last-week-placeholder').click(function(){jQuery(this).closest('.form-group').find('.formatting-rule-cell-value').val('%LAST_WEEK%').data("DateTimePicker").hide()}) jQuery('.wdt-this-week-placeholder').click(function(){jQuery(this).closest('.form-group').find('.formatting-rule-cell-value').val('%THIS_WEEK%').data("DateTimePicker").hide()}) jQuery('.wdt-next-week-placeholder').click(function(){jQuery(this).closest('.form-group').find('.formatting-rule-cell-value').val('%NEXT_WEEK%').data("DateTimePicker").hide()}) jQuery('.wdt-last-30-days-placeholder').click(function(){jQuery(this).closest('.form-group').find('.formatting-rule-cell-value').val('%LAST_30_DAYS%').data("DateTimePicker").hide()}) jQuery('.wdt-last-month-placeholder').click(function(){jQuery(this).closest('.form-group').find('.formatting-rule-cell-value').val('%LAST_MONTH%').data("DateTimePicker").hide()}) jQuery('.wdt-this-month-placeholder').click(function(){jQuery(this).closest('.form-group').find('.formatting-rule-cell-value').val('%THIS_MONTH%').data("DateTimePicker").hide()});jQuery('.wdt-next-month-placeholder').click(function(){jQuery(this).closest('.form-group').find('.formatting-rule-cell-value').val('%NEXT_MONTH%').data("DateTimePicker").hide()}) jQuery('.formatting-rule-cell-value.wdt-datepicker').on('dp.hide',function(e){e.stopImmediatePropagation();if(jQuery.inArray(jQuery(this).closest('.wdt-conditional-formatting-rule').find('.formatting-rule-cell-value').val(),['%LAST_WEEK%','%THIS_WEEK%','%NEXT_WEEK%','%LAST_30_DAYS%','%LAST_MONTH%','%NEXT_MONTH%','%THIS_MONTH%'])===-1){jQuery(this).closest('.wdt-conditional-formatting-rule').find('.formatting-rule-if-clause').prop('disabled',!1).selectpicker('val','lt')}else{jQuery(this).closest('.wdt-conditional-formatting-rule').find('.formatting-rule-if-clause').prop('disabled',!0).selectpicker('val','')}});jQuery('.formatting-rule-cell-value.wdt-datetimepicker').on('dp.hide',function(e){e.stopImmediatePropagation();if(jQuery.inArray(jQuery(this).closest('.wdt-conditional-formatting-rule').find('.formatting-rule-cell-value').val(),['%LAST_WEEK%','%THIS_WEEK%','%NEXT_WEEK%','%LAST_30_DAYS%','%LAST_MONTH%','%NEXT_MONTH%','%THIS_MONTH%'])===-1){jQuery(this).closest('.wdt-conditional-formatting-rule').find('.formatting-rule-if-clause').prop('disabled',!1).selectpicker('val','lt')}else{jQuery(this).closest('.wdt-conditional-formatting-rule').find('.formatting-rule-if-clause').prop('disabled',!0).selectpicker('val','')}})}} function getMomentWdtDateFormat(){return wpdatatables_settings.wdtDateFormat.replace('d','DD').replace('M','MMM').replace('m','MM').replace('y','YY').replace('F','MMMM').replace('j','DD')} function getMomentWdtTimeFormat(){return wpdatatables_settings.wdtTimeFormat.replace('H','HH').replace('i','mm')} function searchQueryString(key){key=key.replace(/[*+?^$.\[\]{}()|\\\/]/g,"\\$&");var match=location.search.match(new RegExp("[?&]"+key+"=([^&]+)(&|$)"));return match&&decodeURIComponent(match[1].replace(/\+/g," "))} function removeURLParameter(url,parameter){let urlParts=url.split('?') if(urlParts.length>=2){let prefix=encodeURIComponent(parameter)+'=' let pars=urlParts[1].split(/[&;]/g) for(let i=pars.length;i-->0;){if(pars[i].lastIndexOf(prefix,0)!==-1){pars.splice(i,1)}} url=urlParts[0]+(pars.length>0?'?'+pars.join('&'):'') return url}else{return url}} function createAceEditor(selector){if(jQuery('#'+selector).length){var aceEditorGlobal;var aceEditorFunc=function(e){if(aceEditorGlobal.getValue().length>0){if(selector=='wdt-custom-css'){wpdatatable_plugin_config.setCustomCss(aceEditorGlobal.getValue())}else if(selector=='wdt-custom-js'){wpdatatable_plugin_config.setCustomJs(aceEditorGlobal.getValue())}else if(selector=='wdt-table-custom-css'){wpdatatable_config.setTableCustomCss(aceEditorGlobal.getValue())}else if(selector=='wdt-mysql-query'){wpdatatable_config.setContent(aceEditorGlobal.getValue())}}else{if(selector=='wdt-custom-css'){wpdatatable_plugin_config.setCustomCss('')}else if(selector=='wdt-custom-js'){wpdatatable_plugin_config.setCustomJs('')}else if(selector=='wdt-table-custom-css'){wpdatatable_config.setTableCustomCss('')}else if(selector=='wdt-mysql-query'){wpdatatable_config.setContent('')}}};aceEditorGlobal=ace.edit(selector);aceEditorGlobal.$blockScrolling=Infinity;if(selector=='wdt-custom-css'||selector=='wdt-table-custom-css'){aceEditorGlobal.getSession().setMode("ace/mode/css");aceEditorGlobal.setTheme("ace/theme/monokai")}else if(selector=='wdt-custom-js'){aceEditorGlobal.getSession().setMode("ace/mode/javascript");aceEditorGlobal.setTheme("ace/theme/monokai")}else if(selector=='wdt-mysql-query'){aceEditorGlobal.getSession().setMode("ace/mode/sql");aceEditorGlobal.setTheme("ace/theme/idle_fingers")} aceEditorGlobal.on('change',_.throttle(aceEditorFunc,3000));aceEditorGlobal.on('blur',aceEditorFunc)} if(typeof aceEditorGlobal!=='undefined'){setTimeout(aceEditorGlobal.on("input",function(){var stringData;var shouldShow=!aceEditorGlobal.session.getValue().length;var node=aceEditorGlobal.renderer.emptyMessageNode;switch(selector){case 'wdt-custom-js':stringData='JS';break;case 'wdt-custom-css':stringData='CSS';break;case 'wdt-table-custom-css':stringData='table CSS. \n * \n * You can use selector only for this table like \n * \n * table.wpDataTable.wpDataTableID-'+wpdatatable_config.id+' { \n * //Your custom code \n * }';break;case 'wdt-mysql-query':stringData='SQL query';break} if(!shouldShow&&node){aceEditorGlobal.renderer.scroller.removeChild(aceEditorGlobal.renderer.emptyMessageNode);aceEditorGlobal.renderer.emptyMessageNode=null}else if(shouldShow&&!node){node=aceEditorGlobal.renderer.emptyMessageNode=document.createElement("div");node.textContent="/** \n * Here you can insert custom "+stringData+" \n */" node.className="ace_emptyMessage" node.style.padding="0 9px" node.style.position="absolute" node.style.zIndex=9 node.style.opacity=0.5 aceEditorGlobal.renderer.scroller.appendChild(node)}}),100)}};var wpDataTables={};var wpDataTablesSelRows={};var wpDataTablesFunctions={};var wpDataTablesUpdatingFlags={};var wpDataTablesResponsiveHelpers={};var wpDataTablesHooks=wpDataTablesHooks||{onRenderFilter:[],onRenderDetails:[]};var wpDataTablesEditors={};var wdtBreakpointDefinition={tablet:1024,phone:480};var wdtCustomUploader=null;var wdtRenderDataTable=null;var singleClick=!1;(function($){$(function(){wdtRenderDataTable=function($table,tableDescription){var dataTableOptions=tableDescription.dataTableParams;if(tableDescription.responsive){wpDataTablesResponsiveHelpers[tableDescription.tableId]=!1;dataTableOptions.preDrawCallback=function(){if(!wpDataTablesResponsiveHelpers[tableDescription.tableId]){if(typeof tableDescription.mobileWidth!=='undefined'){wdtBreakpointDefinition.phone=parseInt(tableDescription.mobileWidth)} if(typeof tableDescription.tabletWidth!=='undefined'){wdtBreakpointDefinition.tablet=parseInt(tableDescription.tabletWidth)} wpDataTablesResponsiveHelpers[tableDescription.tableId]=new ResponsiveDatatablesHelper($(tableDescription.selector).dataTable(),wdtBreakpointDefinition,{showDetail:function(detailsRow){if(tableDescription.conditional_formatting_columns){var responsive_rows=detailsRow.find('li');var oSettings=wpDataTables[tableDescription.tableId].fnSettings();var params={};params.thousandsSeparator=tableDescription.number_format==1?'.':',';params.decimalSeparator=tableDescription.number_format==1?',':'.';params.dateFormat=tableDescription.datepickFormat;params.momentDateFormat=params.dateFormat.replace('dd','DD').replace('M','MMM').replace('mm','MM');params.momentTimeFormat=tableDescription.timeFormat.replace('H','H').replace('i','mm');for(var i=0;i tbody > tr').removeClass('selected');wpDataTablesSelRows[tableDescription.tableId]=wpDataTables[tableDescription.tableId].fnGetPosition($(tableDescription.selector+' > tbody > tr:eq('+sel_row_index+')').get(0));$(tableDescription.selector+' > tbody > tr:eq('+sel_row_index+')').addClass('selected')}else if(wpDataTablesSelRows[tableDescription.tableId]==-3){var sel_row_index=0;$(tableDescription.selector+' > tbody > tr').removeClass('selected');wpDataTablesSelRows[tableDescription.tableId]=wpDataTables[tableDescription.tableId].fnGetPosition($(tableDescription.selector+' > tbody > tr:eq('+sel_row_index+')').get(0));$(tableDescription.selector+' > tbody > tr:eq('+sel_row_index+')').addClass('selected')} $(tableDescription.selector+'_edit_dialog').parent().removeClass('overlayed');wpDataTablesUpdatingFlags[tableDescription.tableId]=!1};wpDataTablesFunctions[tableDescription.tableId].applyData=function(data){$(data).each(function(index,el){if(el){var val=el.toString()}else{var val=''} if(val.indexOf('span')!=-1){val=val.replace(//g,'').replace(/<\/span>/g,'')} if(val.indexOf('
    ')!=-1||val.indexOf('
    ')!=-1){val=val.replace(//g,"\n")} var $inputElement=$('#'+tableDescription.tableId+'_edit_dialog .editDialogInput:not(.bootstrap-select):eq('+index+')');var inputElementType=$inputElement.data('input_type');var columnType=$inputElement.data('column_type');if(inputElementType==='multi-selectbox'||inputElementType==='selectbox'){if($inputElement.hasClass('wdt-possible-values-ajax')){var $selectpickerBlock=$('select#'+tableDescription.tableId+'_'+$inputElement.data('key')).closest('.fg-line').parent();var mandatory=$inputElement.hasClass('mandatory')?'mandatory ':'';var foreignKeyRule=$inputElement.hasClass('wdt-foreign-key-select')?'wdt-foreign-key-select ':'';var searchInSelect=$inputElement.hasClass('wdt-search-in-select')?' wdt-search-in-select ':'';$selectpickerBlock.html('
    ');if(inputElementType==='multi-selectbox') $selectpickerBlock.find('select').attr('multiple','multiple');if(inputElementType==='multi-selectbox'){var values=val.split(', ');$.each(values,function(index,value){if(value){$selectpickerBlock.find('select').append('')}})}else{$selectpickerBlock.find('select').append('')} $inputElement=$selectpickerBlock.find('select');$inputElement.on('show.bs.select',function(e){jQuery(this).closest('div.editDialogInput').find('.bs-searchbox .form-control').val('').trigger('keyup')});$inputElement.selectpicker('refresh').ajaxSelectPicker({ajax:{url:tableDescription.adminAjaxBaseUrl,method:'POST',data:{wdtNonce:$('#wdtNonce').val(),action:'wpdatatables_get_column_possible_values',tableId:tableDescription.tableWpId,originalHeader:$inputElement.data('key')}},cache:!1,preprocessData:function(data){if($('.editDialogInput.open').find('select').data('input_type')==='selectbox'){data.unshift({value:''})} return data},preserveSelected:!0,emptyRequest:!0,preserveSelectedPosition:'before',locale:{emptyTitle:wpdatatables_frontend_strings.nothingSelected,statusSearching:wpdatatables_frontend_strings.sLoadingRecords,currentlySelected:wpdatatables_frontend_strings.currentlySelected,errorText:wpdatatables_frontend_strings.errorText,searchPlaceholder:wpdatatables_frontend_strings.search,statusInitialized:wpdatatables_frontend_strings.statusInitialized,statusNoResults:wpdatatables_frontend_strings.statusNoResults,statusTooShort:wpdatatables_frontend_strings.statusTooShort}})} if(inputElementType=='multi-selectbox'){values=val.split(', ');$inputElement.selectpicker();$inputElement.selectpicker('val',values);$inputElement.selectpicker('refresh')}else if(inputElementType=='selectbox'){$inputElement.selectpicker();if($inputElement.hasClass('wdt-foreign-key-select')&&val!=''){val=typeof $inputElement.find('option[data-label="'+val+'"]').val()!=='undefined'?$inputElement.find('option[data-label="'+val+'"]').val():val} if(val==''){val='possibleValuesAddEmpty'} $inputElement.selectpicker('val',val);$inputElement.selectpicker('refresh')} if(searchInSelect===''){$inputElement.closest('div.editDialogInput').find('.bs-searchbox').hide()}else{$inputElement.closest('div.editDialogInput').find('.bs-searchbox').show()}}else{if(inputElementType=='attachment'||$.inArray(columnType,['icon'])!==-1){columnType=$inputElement.parent().data('column_type');if(val!=''){if($(val).children('img').first().attr('src')!=undefined){val=$(val).children('img').first().attr('src')+'||'+$(val).attr('href')}else if($(val).attr('href')!=undefined){val=$(val).attr('href')}else if($(val).attr('src')!=undefined){val=$(val).attr('src')} $inputElement.parent().parent().removeClass('fileinput-new').addClass('fileinput-exists');if(columnType=='icon'){$inputElement.parent().parent().parent().removeClass('fileinput-new').addClass('fileinput-exists');if(val.indexOf('||')!=-1){$inputElement.parent().parent().parent().find('.fileinput-preview').html('')}else{$inputElement.parent().parent().parent().find('.fileinput-preview').html('')}}else{$inputElement.parent().parent().find('.fileinput-filename').text(val.split('/').pop())}}else{$inputElement.closest('.fileinput').removeClass('fileinput-exists').addClass('fileinput-new');$inputElement.closest('.fileinput').find('div.fileinput-exists').removeClass('fileinput-exists').addClass('fileinput-new');$inputElement.closest('.fileinput').find('.fileinput-filename').text('');$inputElement.closest('.fileinput').find('.fileinput-preview').html('')}}else{if(val.indexOf(''+$(this).data('column_header')+'

    '}else{$(this).removeClass('error')}}}else if($(this).data('input_type')=='link'){if($(this).val()!=''){field_valid=wdtValidateURL($(this).val());if(!field_valid){valid=!1;$(this).addClass('error');validation_message+=wpdatatables_frontend_strings.invalid_link+' '+$(this).data('column_header')+'
    '}else{$(this).removeClass('error')}}} if($(this).hasClass('mandatory')){if($(this).val()==''||$(this).val()==null){$(this).addClass('error');valid=!1;validation_message+=''+$(this).data('column_header')+' '+wpdatatables_frontend_strings.cannot_be_empty+'
    '}else{if(valid){$(this).removeClass('error')}}} if($(this).hasClass('datepicker')){formdata[$(this).data('key')]=$.datepicker.formatDate(tableDescription.datepickFormat,$.datepicker.parseDate(tableDescription.datepickFormat,$(this).val()))}else if($(this).data('input_type')=='multi-selectbox'){if($(this).val()){formdata[$(this).data('key')]=$(this).val().join(', ')}else{formdata[$(this).data('key')]=''}}else if($(this).data('column_type')=='int'){formdata[$(this).data('key')]=$(this).val().replace(/,/g,'').replace(/\./g,'')}else{formdata[$(this).data('key')]=$(this).val()} aoData.push(formdata[$(this).data('key')])});if(!valid){$(tableDescription.selector+'_edit_dialog').closest('.modal-dialog').find('.wdt-preload-layer').animateFadeOut();wdtNotify(wpdatatables_edit_strings.error,validation_message,'danger');return!1} wpDataTablesUpdatingFlags[tableDescription.tableId]=!0;$.ajax({url:tableDescription.adminAjaxBaseUrl,type:'POST',dataType:'json',data:{action:'wdt_save_table_frontend',wdtNonce:$('#wdtNonceFrontendEdit_'+tableDescription.tableWpId).val(),formdata:formdata},success:function(returnData){$(tableDescription.selector+'_edit_dialog').closest('.modal-dialog').find('.wdt-preload-layer').animateFadeOut();if(returnData.error==''){var insert_id=returnData.success;if(returnData.is_new){forceRedraw=!0} if(insert_id){$(tableDescription.selector+'_edit_dialog tr.idRow .editDialogInput').val(insert_id);if(forceRedraw){wpDataTables[tableDescription.tableId].fnDraw(!1);$('.edit_table[aria-controls="'+tableDescription.tableId+'"]').addClass('disabled')}}else{wpDataTables[tableDescription.tableId].fnDraw(!1);$('.edit_table[aria-controls="'+tableDescription.tableId+'"]').addClass('disabled')} wdtNotify(wpdatatables_edit_strings.success,wpdatatables_edit_strings.dataSaved,'success');setTimeout(function(){if(closeDialog){$('#wdt-frontend-modal').modal('hide')}else{$(tableDescription.selector+'_edit_dialog .editDialogInput').val('');$(tableDescription.selector+'_edit_dialog .editDialogInput').selectpicker('val','');$(tableDescription.selector+'_edit_dialog .editDialogInput').trigger('change.abs.preserveSelected').selectpicker('refresh');$('.fileinput').removeClass('fileinput-exists').addClass('fileinput-new');$('.fileinput').find('div.fileinput-exists').removeClass('fileinput-exists').addClass('fileinput-new');$('.fileinput').find('.fileinput-filename').text('');$('.fileinput').find('.fileinput-preview').html('');if(tinymce.activeEditor) tinymce.activeEditor.setContent('');wpDataTablesFunctions[tableDescription.tableId].setPredefinedEditValues()}},1000);if(!returnData.is_new&&$(tableDescription.selector+' > tbody > tr.selected').length){var cursor=wpDataTables[tableDescription.tableId].fnGetPosition($(tableDescription.selector+' > tbody > tr.selected').get(0));wpDataTables[tableDescription.tableId].fnSettings().aoData[cursor]._aData=aoData}}else{wdtNotify(wpdatatables_edit_strings.error,returnData.error,'danger')}},error:function(xhr,response){$(tableDescription.selector+'_edit_dialog').closest('.modal-dialog').find('.wdt-preload-layer').animateFadeOut();wdtNotify(wpdatatables_edit_strings.error,wpdatatables_frontend_strings.databaseInsertError,'danger')}});return!0} wpDataTablesFunctions[tableDescription.tableId].setPredefinedEditValues=function(){for(let i in tableDescription.advancedEditingOptions.aoColumns){let column=tableDescription.advancedEditingOptions.aoColumns[i];let defaultValuesArr;if($.inArray(column.editorInputType,['selectbox','multi-selectbox'])!==-1){if(column.possibleValuesAjax!==-1){var $selectpickerBlock=$('select#'+tableDescription.tableId+'_'+column.origHeader).closest('.fg-line').parent();var mandatory=column.mandatory?'mandatory ':'';var possibleValuesAjax=(column.possibleValuesAjax)?'wdt-possible-values-ajax ':'';var foreignKeyRule=column.foreignKeyRule?'wdt-foreign-key-select ':'';var searchInSelect=column.searchInSelectBoxEditing?' wdt-search-in-select ':'';$selectpickerBlock.html('
    ');if(column.editorInputType==='multi-selectbox') $selectpickerBlock.find('select').attr('multiple','multiple');if(column.defaultValue){if(column.editorInputType==='multi-selectbox'){var defaultValues=!Array.isArray(column.defaultValue)?column.defaultValue.split('|'):column.defaultValue;$.each(defaultValues,function(index,value){if(value){$selectpickerBlock.find('select').append('')}})}else{if(typeof column.defaultValue==='object') $selectpickerBlock.find('select').append('');else $selectpickerBlock.find('select').append('')}} $('select#'+tableDescription.tableId+'_'+column.origHeader).on('show.bs.select',function(e){jQuery(this).closest('div.editDialogInput').find('.bs-searchbox .form-control').val('').trigger('keyup')});$('select#'+tableDescription.tableId+'_'+column.origHeader).selectpicker('refresh').ajaxSelectPicker({ajax:{url:tableDescription.adminAjaxBaseUrl,method:'POST',data:{wdtNonce:$('#wdtNonce').val(),action:'wpdatatables_get_column_possible_values',tableId:tableDescription.tableWpId,originalHeader:column.origHeader}},cache:!1,preprocessData:function(data){if($('.editDialogInput.open').find('select').data('input_type')==='selectbox'){data.unshift({value:''})} return data},preserveSelected:!0,emptyRequest:!0,preserveSelectedPosition:'before',locale:{emptyTitle:wpdatatables_frontend_strings.nothingSelected,statusSearching:wpdatatables_frontend_strings.sLoadingRecords,currentlySelected:wpdatatables_frontend_strings.currentlySelected,errorText:wpdatatables_frontend_strings.errorText,searchPlaceholder:wpdatatables_frontend_strings.search,statusInitialized:wpdatatables_frontend_strings.statusInitialized,statusNoResults:wpdatatables_frontend_strings.statusNoResults,statusTooShort:wpdatatables_frontend_strings.statusTooShort}})} if(column.searchInSelectBoxEditing!==1){$('select#'+tableDescription.tableId+'_'+column.origHeader).closest('div.editDialogInput').find('.bs-searchbox').hide()}else{$('select#'+tableDescription.tableId+'_'+column.origHeader).closest('div.editDialogInput').find('.bs-searchbox').show()}} if(column.defaultValue){let columnDefaultValue=column.defaultValue;if($.inArray(column.editorInputType,['selectbox','multi-selectbox'])!==-1){if(typeof columnDefaultValue==='object'){defaultValuesArr=columnDefaultValue.value}else{defaultValuesArr=column.editorInputType==='multi-selectbox'&&!Array.isArray(columnDefaultValue)?columnDefaultValue.split('|'):column.defaultValue} $('#wdt-frontend-modal .editDialogInput:not(.bootstrap-select):eq('+i+')').selectpicker('val',defaultValuesArr).trigger('change.abs.preserveSelected')}else if($.inArray(column.editorInputType,['attachment','image'])!==-1&&($('.fileupload-'+tableDescription.tableId).length)){var $fileUploadEl=$('.fileupload-'+tableDescription.tableId);$($fileUploadEl).each(function(){if($(this).data('column_type')=='icon'){$(this).parent().parent().find('.fileinput-preview').html('');$(this).parent().removeClass('fileinput-new').addClass('fileinput-exists');$(this).parent().parent().removeClass('fileinput-new').addClass('fileinput-exists')}else{$(this).parent().find('.fileinput-filename').val(columnDefaultValue);$(this).parent().removeClass('fileinput-new').addClass('fileinput-exists');$(this).parent().find('.fileinput-filename').text((columnDefaultValue).substring((columnDefaultValue).lastIndexOf("/")+1))}});$('#wdt-frontend-modal .editDialogInput:not(.bootstrap-select):eq('+i+')').val(column.defaultValue)}else if(column.editorInputType==='mce-editor'){if(tinymce.activeEditor){$inputElement=$('#'+tableDescription.tableId+'_edit_dialog .editDialogInput:not(.bootstrap-select):eq('+i+')');tinymce.execCommand('mceRemoveEditor',!0,$inputElement.attr('id'));tinymce.init({selector:'#'+$inputElement.attr('id'),init_instance_callback:function(editor){editor.setContent(column.defaultValue)},menubar:!1,plugins:'link image media lists hr colorpicker fullscreen textcolor code',toolbar:'undo redo formatselect bold italic underline strikethrough subscript superscript | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent blockquote | hr fullscreen | link unlink image | forecolor backcolor removeformat | code'})}}else{$('#wdt-frontend-modal .editDialogInput:not(.bootstrap-select):eq('+i+')').val(column.defaultValue)}}}}} if(!tableDescription.responsive&&!tableDescription.editable){dataTableOptions.fnDrawCallback=function(){wdtRemoveOverlay('#'+tableDescription.tableId)}} if($('.wdt-column-sum[data-table-id="'+tableDescription.tableWpId+'"]').length){var sumColumns=[];$('.wdt-column-sum[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){sumColumns.push($(this).data('column-orig-header'))})} if($('.wdt-column-avg[data-table-id="'+tableDescription.tableWpId+'"]').length){var avgColumns=[];$('.wdt-column-avg[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){avgColumns.push($(this).data('column-orig-header'))})} if($('.wdt-column-min[data-table-id="'+tableDescription.tableWpId+'"]').length){var minColumns=[];$('.wdt-column-min[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){minColumns.push($(this).data('column-orig-header'))})} if($('.wdt-column-max[data-table-id="'+tableDescription.tableWpId+'"]').length){var maxColumns=[];$('.wdt-column-max[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){maxColumns.push($(this).data('column-orig-header'))})} if(tableDescription.serverSide){dataTableOptions.ajax.data=function(data){data.sumColumns=sumColumns;data.avgColumns=avgColumns;data.minColumns=minColumns;data.maxColumns=maxColumns;data.currentUserId=$('#wdt-user-id-placeholder').val();data.currentUserLogin=$('#wdt-user-login-placeholder').val();data.currentPostIdPlaceholder=$('#wdt-post-id-placeholder').val();data.currentUserFirstName=$('#wdt-user-first-name-placeholder').val();data.currentUserLastName=$('#wdt-user-last-name-placeholder').val();data.currentUserEmail=$('#wdt-user-email-placeholder').val();data.currentDate=$('#wdt-date-placeholder').val();data.currentDateTime=$('#wdt-datetime-placeholder').val();data.currentTime=$('#wdt-time-placeholder').val();data.wpdbPlaceholder=$('#wdt-wpdb-placeholder').val();data.wdtNonce=$('#wdtNonceFrontendEdit_'+tableDescription.tableWpId).val();data.showAllRows=$('#wdt-show-all-rows').val()}} if(tableDescription.hideBeforeLoad){dataTableOptions.fnInitComplete=function(){$(tableDescription.selector).animateFadeIn()}} wpDataTables[tableDescription.tableId]=$(tableDescription.selector).dataTable(dataTableOptions);if(wpDataTables[tableDescription.tableId].fnSettings()._iDisplayLength>=wpDataTables[tableDescription.tableId].fnSettings().fnRecordsTotal()||dataTableOptions.iDisplayLength===-1){$('#'+tableDescription.tableId+'_paginate').hide()} $(tableDescription.selector+'_wrapper').addClass('wpDataTableID-'+tableDescription.tableWpId) if(tableDescription.paginationAlign){switch(tableDescription.paginationAlign){case "right":$(tableDescription.selector+'_wrapper').addClass('wpdt-pagination-right');$(tableDescription.selector+'_wrapper').removeClass('wpdt-pagination-left');$(tableDescription.selector+'_wrapper').removeClass('wpdt-pagination-center');break;case "left":$(tableDescription.selector+'_wrapper').addClass('wpdt-pagination-left');$(tableDescription.selector+'_wrapper').removeClass('wpdt-pagination-right');$(tableDescription.selector+'_wrapper').removeClass('wpdt-pagination-center');break;case "center":$(tableDescription.selector+'_wrapper').addClass('wpdt-pagination-center');$(tableDescription.selector+'_wrapper').removeClass('wpdt-pagination-left');$(tableDescription.selector+'_wrapper').removeClass('wpdt-pagination-right');break;default:$(tableDescription.selector+'_wrapper').addClass('wpdt-pagination-right');$(tableDescription.selector+'_wrapper').removeClass('wpdt-pagination-left');$(tableDescription.selector+'_wrapper').removeClass('wpdt-pagination-center');break}} if(tableDescription.tableSkin){$(tableDescription.selector+'_wrapper .dt-buttons .DTTT_button_export').on('click',function(){$('.dt-button-collection').addClass('wdt-skin-'+tableDescription.tableSkin)})} if(tableDescription.showRowsPerPage){if(!(jQuery(tableDescription.selector+'_wrapper .dataTables_length .length_menu.bootstrap-select').length)) jQuery(tableDescription.selector+'_wrapper .dataTables_length .length_menu.wdt-selectpicker').selectpicker()} wpDataTables[tableDescription.tableId].fnSettings().aoDrawCallback.push({sName:'removePaginate',fn:function(oSettings){var api=oSettings.oInstance.api();if(typeof(api.page.info())!='undefined'){if(api.page.len()>=api.page.info().recordsDisplay||api.data().page.len()==-1){$('#'+tableDescription.tableId+'_paginate').hide()}else{$('#'+tableDescription.tableId+'_paginate').show()}}}});if(tableDescription.serverSide){if(parseInt(tableDescription.autoRefreshInterval)>0){autoRefresh=setInterval(function(){wpDataTables[tableDescription.tableId].fnDraw(!1)},parseInt(tableDescription.autoRefreshInterval)*1000)}else{if(typeof autoRefresh!=="undefined"){clearInterval(autoRefresh)}}} wpDataTables[tableDescription.tableId].addOnDrawCallback=function(callback){if(typeof callback!=='function'){return} var index=wpDataTables[tableDescription.tableId].fnSettings().aoDrawCallback.length+1;wpDataTables[tableDescription.tableId].fnSettings().aoDrawCallback.push({sName:'user_callback_'+index,fn:callback})};if(tableDescription.hasSumColumns||tableDescription.hasAvgColumns||tableDescription.hasMinColumns||tableDescription.hasMaxColumns||$('.wdt-column-sum').length||$('.wdt-column-avg').length||$('.wdt-column-min').length||$('.wdt-column-max').length){var sumLabel=tableDescription.sumFunctionsLabel?tableDescription.sumFunctionsLabel:'∑ = ';var avgLabel=tableDescription.avgFunctionsLabel?tableDescription.avgFunctionsLabel:'Avg = ';var minLabel=tableDescription.minFunctionsLabel?tableDescription.minFunctionsLabel:'Min = ';var maxLabel=tableDescription.maxFunctionsLabel?tableDescription.maxFunctionsLabel:'Max = ';if(tableDescription.serverSide){wpDataTables[tableDescription.tableId].fnSettings().aoDrawCallback.push({sName:'updateFooterFunctions',fn:function(oSettings){var api=oSettings.oInstance.api();for(var columnName in api.ajax.json().sumFooterColumns){if(tableDescription.hasSumColumns){$('#'+tableDescription.tableId+' tfoot tr.wdt-sum-row td.wdt-sum-cell[data-column_header="'+columnName+'"]').html(sumLabel+' '+api.ajax.json().sumColumnsValues[columnName])}} for(columnName in api.ajax.json().avgFooterColumns){if(tableDescription.hasAvgColumns){$('#'+tableDescription.tableId+' tfoot tr.wdt-avg-row td.wdt-avg-cell[data-column_header="'+columnName+'"]').html(avgLabel+' '+api.ajax.json().avgColumnsValues[columnName])}} for(columnName in api.ajax.json().minFooterColumns){if(tableDescription.hasMinColumns){$('#'+tableDescription.tableId+' tfoot tr.wdt-min-row td.wdt-min-cell[data-column_header="'+columnName+'"]').html(minLabel+' '+api.ajax.json().minColumnsValues[columnName])}} for(columnName in api.ajax.json().maxFooterColumns){if(tableDescription.hasMaxColumns){$('#'+tableDescription.tableId+' tfoot tr.wdt-max-row td.wdt-max-cell[data-column_header="'+columnName+'"]').html(maxLabel+' '+api.ajax.json().maxColumnsValues[columnName])}} if($('.wdt-column-sum').length){$('.wdt-column-sum[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){$(this).find('.wdt-column-sum-value').text(api.ajax.json().sumColumnsValues[$(this).data('column-orig-header')])})} if($('.wdt-column-avg').length){$('.wdt-column-avg[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){$(this).find('.wdt-column-avg-value').text(api.ajax.json().avgColumnsValues[$(this).data('column-orig-header')])})} if($('.wdt-column-min').length){$('.wdt-column-min[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){$(this).find('.wdt-column-min-value').text(api.ajax.json().minColumnsValues[$(this).data('column-orig-header')])})} if($('.wdt-column-max').length){$('.wdt-column-max[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){$(this).find('.wdt-column-max-value').text(api.ajax.json().maxColumnsValues[$(this).data('column-orig-header')])})}}})}else{wpDataTables[tableDescription.tableId].fnSettings().aoDrawCallback.push({sName:'updateFooterFunctions',fn:function(oSettings){var api=oSettings.oInstance.api();var thousandsSeparator=tableDescription.number_format==1?'.':',';var decimalSeparator=tableDescription.number_format==1?',':'.';for(var i in tableDescription.sumAvgColumns){var columnData=api.column(tableDescription.sumAvgColumns[i]+':name',{search:'applied'}).data();var columnType=oSettings.aoColumns[api.column(tableDescription.sumAvgColumns[i]+':name').index()].wdtType;var sum=wdtCalculateColumnSum(columnData,thousandsSeparator);var sumStr=wdtFormatNumberByColumnType(parseFloat(sum),columnType,tableDescription.columnsDecimalPlaces[tableDescription.sumAvgColumns[i]],tableDescription.decimalPlaces,decimalSeparator,thousandsSeparator);if(_.contains(tableDescription.sumColumns,tableDescription.sumAvgColumns[i])){$('#'+tableDescription.tableId+' tfoot tr.wdt-sum-row td.wdt-sum-cell[data-column_header="'+tableDescription.sumAvgColumns[i]+'"]').html(sumLabel+' '+sumStr)} if(_.contains(tableDescription.avgColumns,tableDescription.sumAvgColumns[i])){var avg=sum/api.page.info().recordsDisplay;var avgStr=wdtFormatNumberByColumnType(avg,'float',tableDescription.columnsDecimalPlaces[tableDescription.sumAvgColumns[i]],tableDescription.decimalPlaces,decimalSeparator,thousandsSeparator);$('#'+tableDescription.tableId+' tfoot tr.wdt-avg-row td.wdt-avg-cell[data-column_header="'+tableDescription.sumAvgColumns[i]+'"]').html(avgLabel+' '+avgStr)}} for(i in tableDescription.minColumns){columnData=api.column(tableDescription.minColumns[i]+':name',{search:'applied'}).data();columnType=oSettings.aoColumns[api.column(tableDescription.minColumns[i]+':name').index()].wdtType;var min=wdtCalculateColumnMin(columnData,thousandsSeparator);var minStr=wdtFormatNumberByColumnType(parseFloat(min),columnType,tableDescription.columnsDecimalPlaces[tableDescription.minColumns[i]],tableDescription.decimalPlaces,decimalSeparator,thousandsSeparator);$('#'+tableDescription.tableId+' tfoot tr.wdt-min-row td.wdt-min-cell[data-column_header="'+tableDescription.minColumns[i]+'"]').html(minLabel+' '+minStr)} for(i in tableDescription.maxColumns){columnData=api.column(tableDescription.maxColumns[i]+':name',{search:'applied'}).data();columnType=oSettings.aoColumns[api.column(tableDescription.maxColumns[i]+':name').index()].wdtType;var max=wdtCalculateColumnMax(columnData,thousandsSeparator);var maxStr=wdtFormatNumberByColumnType(parseFloat(max),columnType,tableDescription.columnsDecimalPlaces[tableDescription.maxColumns[i]],tableDescription.decimalPlaces,decimalSeparator,thousandsSeparator);$('#'+tableDescription.tableId+' tfoot tr.wdt-max-row td.wdt-max-cell[data-column_header="'+tableDescription.maxColumns[i]+'"]').html(maxLabel+' '+maxStr)} if($('.wdt-column-sum').length){$('.wdt-column-sum[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){var columnData=api.column($(this).data('column-orig-header')+':name',{search:'applied'}).data();var columnType=oSettings.aoColumns[api.column($(this).data('column-orig-header')+':name').index()].wdtType;var sum=wdtCalculateColumnSum(columnData,thousandsSeparator);var sumStr=wdtFormatNumberByColumnType(parseFloat(sum),columnType,tableDescription.columnsDecimalPlaces[$(this).data('column-orig-header')],tableDescription.decimalPlaces,decimalSeparator,thousandsSeparator);$(this).find('.wdt-column-sum-value').text(sumStr)})} if($('.wdt-column-avg').length){$('.wdt-column-avg[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){var columnData=api.column($(this).data('column-orig-header')+':name',{search:'applied'}).data();var avg=wdtCalculateColumnSum(columnData,thousandsSeparator)/api.page.info().recordsDisplay;var avgStr=wdtFormatNumberByColumnType(parseFloat(avg),'float',tableDescription.columnsDecimalPlaces[$(this).data('column-orig-header')],tableDescription.decimalPlaces,decimalSeparator,thousandsSeparator);$(this).find('.wdt-column-avg-value').text(avgStr)})} if($('.wdt-column-min').length){$('.wdt-column-min[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){var columnData=api.column($(this).data('column-orig-header')+':name',{search:'applied'}).data();var columnType=oSettings.aoColumns[api.column($(this).data('column-orig-header')+':name').index()].wdtType;var min=wdtCalculateColumnMin(columnData,thousandsSeparator);var minStr=wdtFormatNumberByColumnType(parseFloat(min),columnType,tableDescription.columnsDecimalPlaces[$(this).data('column-orig-header')],tableDescription.decimalPlaces,decimalSeparator,thousandsSeparator);$(this).find('.wdt-column-min-value').text(minStr)})} if($('.wdt-column-max').length){$('.wdt-column-max[data-table-id="'+tableDescription.tableWpId+'"]').each(function(){var columnData=api.column($(this).data('column-orig-header')+':name',{search:'applied'}).data();var columnType=oSettings.aoColumns[api.column($(this).data('column-orig-header')+':name').index()].wdtType;var max=wdtCalculateColumnMax(columnData,thousandsSeparator);var maxStr=wdtFormatNumberByColumnType(parseFloat(max),columnType,tableDescription.columnsDecimalPlaces[$(this).data('column-orig-header')],tableDescription.decimalPlaces,decimalSeparator,thousandsSeparator);$(this).find('.wdt-column-max-value').text(maxStr)})}}})}} if(tableDescription.conditional_formatting_columns){wpDataTables[tableDescription.tableId].fnSettings().aoDrawCallback.push({sName:'updateConditionalFormatting',fn:function(oSettings){for(var i=0;i tbody > tr.selected').index();if(sel_row_index+wpDataTables[tableDescription.tableId].fnSettings()._iDisplayStart==wpDataTables[tableDescription.tableId].fnSettings()._iRecordsDisplay-1){$(tableDescription.selector+'_next_edit_dialog').prop('disabled',!0)}else{$(tableDescription.selector+'_next_edit_dialog').prop('disabled',!1)} if((sel_row_index==0&&wpDataTables[tableDescription.tableId].fnSettings()._iDisplayStart==0)||wpDataTables[tableDescription.tableId].fnSettings()._iRecordsDisplay==0){$(tableDescription.selector+'_prev_edit_dialog').prop('disabled',!0)}else{$(tableDescription.selector+'_prev_edit_dialog').prop('disabled',!1)}};if((tableDescription.columnsFixed==0)&&(tableDescription.groupingEnabled)){wpDataTables[tableDescription.tableId].rowGrouping({iGroupingColumnIndex:tableDescription.groupingColumnIndex})} if(tableDescription.advancedFilterEnabled){$('#'+tableDescription.tableId).dataTable().columnFilter(tableDescription.advancedFilterOptions);for(var i in wpDataTablesHooks.onRenderFilter){if(!isNaN(i)) wpDataTablesHooks.onRenderFilter[i](tableDescription)}} if(tableDescription.editable){$(document).on('click',tableDescription.selector+'_prev_edit_dialog',function(e){e.preventDefault();e.stopImmediatePropagation();var sel_row_index=$(tableDescription.selector+' > tbody > tr.selected').index();if(sel_row_index>0){$(tableDescription.selector+' > tbody > tr.selected').removeClass('selected');$(tableDescription.selector+' > tbody > tr:eq('+(sel_row_index-1)+')').addClass('selected',300);wpDataTablesSelRows[tableDescription.tableId]=wpDataTables[tableDescription.tableId].fnGetPosition($(tableDescription.selector+' > tbody > tr.selected').get(0));var data=wpDataTables[tableDescription.tableId].fnGetData(wpDataTablesSelRows[tableDescription.tableId]);wpDataTablesFunctions[tableDescription.tableId].applyData(data)}else{var cur_page=Math.ceil(wpDataTables[tableDescription.tableId].fnSettings()._iDisplayStart/wpDataTables[tableDescription.tableId].fnSettings()._iDisplayLength)+1;if(cur_page==1) return;wpDataTablesSelRows[tableDescription.tableId]=-2;wpDataTablesUpdatingFlags[tableDescription.tableId]=!0;wpDataTables[tableDescription.tableId].fnPageChange('previous')} wpDataTables[tableDescription.tableId].checkSelectedLimits()});$(document).on('click',tableDescription.selector+'_next_edit_dialog',function(e){e.preventDefault();e.stopImmediatePropagation();if(wpDataTables[tableDescription.tableId].fnSettings()._iDisplayLength==-1){wpDataTables[tableDescription.tableId].fnSettings()._iDisplayLength=wpDataTables[tableDescription.tableId].fnSettings()._iRecordsTotal} var sel_row_index=$(tableDescription.selector+' > tbody > tr.selected').index();if(sel_row_index tbody > tr.selected').removeClass('selected');$(tableDescription.selector+' > tbody > tr:eq('+(sel_row_index+1)+')').addClass('selected',300);wpDataTablesSelRows[tableDescription.tableId]=wpDataTables[tableDescription.tableId].fnGetPosition($(tableDescription.selector+' > tbody > tr.selected').get(0));var data=wpDataTables[tableDescription.tableId].fnGetData(wpDataTablesSelRows[tableDescription.tableId]);wpDataTablesFunctions[tableDescription.tableId].applyData(data)}else{var cur_page=Math.ceil(wpDataTables[tableDescription.tableId].fnSettings()._iDisplayStart/wpDataTables[tableDescription.tableId].fnSettings()._iDisplayLength)+1;var total_pages=Math.ceil(wpDataTables[tableDescription.tableId].fnSettings()._iRecordsTotal/wpDataTables[tableDescription.tableId].fnSettings()._iDisplayLength);if(cur_page==total_pages) return;wpDataTablesSelRows[tableDescription.tableId]=-3;wpDataTablesUpdatingFlags[tableDescription.tableId]=!0;wpDataTables[tableDescription.tableId].fnPageChange('next');wpDataTables[tableDescription.tableId].fnDraw(!1)} wpDataTables[tableDescription.tableId].checkSelectedLimits()});$(document).on('click',tableDescription.selector+'_apply_edit_dialog',function(e){e.preventDefault();e.stopImmediatePropagation();e.preventDefault();wpDataTablesFunctions[tableDescription.tableId].saveTableData(!0,!1)});$(document).on('click',tableDescription.selector+'_ok_edit_dialog',function(e){e.preventDefault();e.stopImmediatePropagation();e.preventDefault();wpDataTablesFunctions[tableDescription.tableId].saveTableData(!0,!0)});$(document).on('keyup',tableDescription.selector+'_edit_dialog input',function(e){if(e.which==13){$(tableDescription.selector+'_ok_edit_dialog').click()}});$(tableDescription.selector+'_edit_dialog input.wdt-maskmoney[data-column_type="float"]').each(function(i){var decimalPlaces=tableDescription.columnsDecimalPlaces[$(this).data('key')]!=-1?tableDescription.columnsDecimalPlaces[$(this).data('key')]:parseInt(tableDescription.decimalPlaces);$(this).maskMoney({thousands:tableDescription.number_format==1?'.':',',decimal:tableDescription.number_format==1?',':'.',precision:decimalPlaces,allowNegative:!0,allowEmpty:!0,allowZero:!0})});$(tableDescription.selector+'_edit_dialog input.wdt-maskmoney[data-column_type="int"]').each(function(i){var thousandsSeparator=tableDescription.number_format==1?'.':',';if(tableDescription.columnsThousandsSeparator[$(this).data('key')]==0){thousandsSeparator=''} $(this).maskMoney({thousands:thousandsSeparator,precision:0,allowNegative:!0,allowEmpty:!0,allowZero:!0})});var fileUploadInit=function(selector){if($('.fileupload-'+selector).length){var attachment=null;wdtCustomUploader=wp.media({title:wpdatatables_frontend_strings.select_upload_file,button:{text:wpdatatables_frontend_strings.choose_file},multiple:!1});$('span.fileupload-'+selector).click(function(e){e.preventDefault();var $button=$(this);var $relInput=$('#'+$button.data('rel_input'));$(document).off('focusin.modal');wdtCustomUploader=wp.media({title:wpdatatables_frontend_strings.select_upload_file,button:{text:wpdatatables_frontend_strings.choose_file},multiple:!1,library:{type:$button.data('column_type')=='icon'?'image':''}});if($button.data('column_type')=='icon'){wdtCustomUploader.off('select').on('select',function(){attachment=wdtCustomUploader.state().get('selection').first().toJSON();var val=attachment.url;$relInput.parent().parent().parent().find('.fileinput-preview').html('');$relInput.parent().parent().parent().removeClass('fileinput-new').addClass('fileinput-exists');$relInput.parent().parent().removeClass('fileinput-new').addClass('fileinput-exists');if(attachment.sizes.thumbnail){val=attachment.sizes.thumbnail.url+'||'+val} $relInput.val(val)})}else{wdtCustomUploader.off('select').on('select',function(){var attachment=wdtCustomUploader.state().get('selection').first().toJSON();$relInput.val(attachment.url);$relInput.parent().parent().removeClass('fileinput-new').addClass('fileinput-exists');$relInput.parent().parent().find('.fileinput-filename').text(attachment.filename)})} wdtCustomUploader.open()})}};fileUploadInit(tableDescription.tableId);$('.edit_table[aria-controls="'+tableDescription.tableId+'"]').click(function(){var modal=$('#wdt-frontend-modal');var newSkins=['dark','aqua','purple'];if($(this).hasClass('disabled')) return!1;$('.wpDataTablesPopover.editTools').hide();modal.addClass('wdt-skin-'+tableDescription.tableSkin);modal.find('.modal-title').html(wpdatatables_frontend_strings.edit_entry);modal.find('.modal-body').html('');modal.find('.modal-footer').html('');var row=$(tableDescription.selector+' tr.selected').get(0);if(['manual','mysql'].indexOf(tableDescription.tableType)===-1){if(typeof wpDataTablesEditors[tableDescription.tableType].edit=='function'){if(singleClick===!1){singleClick=!0;wpDataTablesEditors[tableDescription.tableType].edit(tableDescription)}}}else{var data=wpDataTables[tableDescription.tableId].fnGetData(row);wpDataTablesFunctions[tableDescription.tableId].applyData(data);wpDataTables[tableDescription.tableId].checkSelectedLimits();modal.find('.modal-body').append($(tableDescription.selector+'_edit_dialog').show());modal.find('.modal-footer').append($(tableDescription.selector+'_edit_dialog_buttons').show());if(newSkins.includes(tableDescription.tableSkin)){modal.find(tableDescription.selector+'_prev_edit_dialog i').addClass('wpdt-icon-chevron-left');modal.find(tableDescription.selector+'_prev_edit_dialog i').removeClass('wpdt-icon-step-backward');modal.find(tableDescription.selector+'_next_edit_dialog i').addClass('wpdt-icon-chevron-right');modal.find(tableDescription.selector+'_next_edit_dialog i').removeClass('wpdt-icon-step-forward');modal.find(tableDescription.selector+'_apply_edit_dialog i').addClass('wpdt-icon-check-circle-full');modal.find(tableDescription.selector+'_apply_edit_dialog i').removeClass('wpdt-icon-check');modal.find(tableDescription.selector+'_ok_edit_dialog i').addClass('wpdt-icon-check-circle');modal.find(tableDescription.selector+'_ok_edit_dialog i').removeClass('wpdt-icon-check-double-reg')}else{modal.find(tableDescription.selector+'_prev_edit_dialog i').removeClass('wpdt-icon-chevron-left');modal.find(tableDescription.selector+'_prev_edit_dialog i').addClass('wpdt-icon-step-backward');modal.find(tableDescription.selector+'_next_edit_dialog i').removeClass('wpdt-icon-chevron-right');modal.find(tableDescription.selector+'_next_edit_dialog i').addClass('wpdt-icon-step-forward');modal.find(tableDescription.selector+'_apply_edit_dialog i').removeClass('wpdt-icon-check-circle-full');modal.find(tableDescription.selector+'_apply_edit_dialog i').addClass('wpdt-icon-check');modal.find(tableDescription.selector+'_ok_edit_dialog i').removeClass('wpdt-icon-check-circle');modal.find(tableDescription.selector+'_ok_edit_dialog i').addClass('wpdt-icon-check-double-reg')} $('#wdt-frontend-modal .editDialogInput').each(function(index){if($(this).data('input_type')=='mce-editor'){if($(this).siblings().length){tinymce.execCommand('mceRemoveEditor',!0,$(this).attr('id'))} tinymce.init({selector:'#'+$(this).attr('id'),menubar:!1,plugins:'link image media lists hr colorpicker fullscreen textcolor code',toolbar:'undo redo formatselect bold italic underline strikethrough subscript superscript | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent blockquote | hr fullscreen | link unlink image | forecolor backcolor removeformat | code'})}});modal.modal('show')} if(modal.find('.wdt-edit-dialog-fields-block').find('.form-group').length==0) $('#wdt-frontend-modal div.wdt-no-editor-inputs-selected-alert').show()});if(tableDescription.inlineEditing){new inlineEditClass(tableDescription,dataTableOptions,$)} $('.new_table_entry[aria-controls="'+tableDescription.tableId+'"]').click(function(){var modal=$('#wdt-frontend-modal');var newSkins=['dark','aqua','purple'];$('.wpDataTablesPopover.editTools').hide();modal.addClass('wdt-skin-'+tableDescription.tableSkin);modal.find('.modal-title').html(wpdatatables_frontend_strings.add_new_entry);modal.find('.modal-body').html('');modal.find('.modal-footer').html('');if(['manual','mysql'].indexOf(tableDescription.tableType)===-1){if(typeof wpDataTablesEditors[tableDescription.tableType]['new']=='function'){if(singleClick===!1){singleClick=!0;wpDataTablesEditors[tableDescription.tableType]['new'](tableDescription)}}}else{modal.find('.modal-body').append($(tableDescription.selector+'_edit_dialog').show());modal.find('.modal-footer').append($(tableDescription.selector+'_edit_dialog_buttons').show());if(newSkins.includes(tableDescription.tableSkin)){modal.find(tableDescription.selector+'_prev_edit_dialog i').addClass('wpdt-icon-chevron-left');modal.find(tableDescription.selector+'_prev_edit_dialog i').removeClass('wpdt-icon-step-backward');modal.find(tableDescription.selector+'_next_edit_dialog i').addClass('wpdt-icon-chevron-right');modal.find(tableDescription.selector+'_next_edit_dialog i').removeClass('wpdt-icon-step-forward');modal.find(tableDescription.selector+'_apply_edit_dialog i').addClass('wpdt-icon-check-circle-full');modal.find(tableDescription.selector+'_apply_edit_dialog i').removeClass('wpdt-icon-check');modal.find(tableDescription.selector+'_ok_edit_dialog i').addClass('wpdt-icon-check-circle');modal.find(tableDescription.selector+'_ok_edit_dialog i').removeClass('wpdt-icon-check-double-reg')}else{modal.find(tableDescription.selector+'_prev_edit_dialog i').removeClass('wpdt-icon-chevron-left');modal.find(tableDescription.selector+'_prev_edit_dialog i').addClass('wpdt-icon-step-backward');modal.find(tableDescription.selector+'_next_edit_dialog i').removeClass('wpdt-icon-chevron-right');modal.find(tableDescription.selector+'_next_edit_dialog i').addClass('wpdt-icon-step-forward');modal.find(tableDescription.selector+'_apply_edit_dialog i').removeClass('wpdt-icon-check-circle-full');modal.find(tableDescription.selector+'_apply_edit_dialog i').addClass('wpdt-icon-check');modal.find(tableDescription.selector+'_ok_edit_dialog i').removeClass('wpdt-icon-check-circle');modal.find(tableDescription.selector+'_ok_edit_dialog i').addClass('wpdt-icon-check-double-reg')} $('#wdt-frontend-modal .editDialogInput').val('').css('border','');$('#wdt-frontend-modal tr.idRow .editDialogInput').val('0');$('#wdt-frontend-modal .fileinput').removeClass('fileinput-exists').addClass('fileinput-new');$('#wdt-frontend-modal .fileinput').find('div.fileinput-exists').removeClass('fileinput-exists').addClass('fileinput-new');$('#wdt-frontend-modal .fileinput').find('.fileinput-filename').text('');$('#wdt-frontend-modal .fileinput').find('.fileinput-preview').html('');$('#wdt-frontend-modal .editDialogInput').each(function(index){if($(this).data('input_type')=='mce-editor'){if(tinymce.activeEditor) tinymce.activeEditor.setContent('');tinymce.execCommand('mceRemoveEditor',!0,$(this).attr('id'));tinymce.init({selector:'#'+$(this).attr('id'),menubar:!1,plugins:'link image media lists hr colorpicker fullscreen textcolor code',toolbar:'undo redo formatselect bold italic underline strikethrough subscript superscript | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent blockquote | hr fullscreen | link unlink image | forecolor backcolor removeformat | code'})}});wpDataTables[tableDescription.tableId].checkSelectedLimits();$('#wdt-frontend-modal .selectpicker').selectpicker('deselectAll').selectpicker('refresh');wpDataTablesFunctions[tableDescription.tableId].setPredefinedEditValues();if(modal.find('.wdt-edit-dialog-fields-block').find('.form-group').length==0){$('#wdt-frontend-modal div.wdt-no-editor-inputs-selected-alert').show()} modal.modal('show')}});$(document).on('keyup','#wdt-frontend-modal',function(e){e.preventDefault();e.stopImmediatePropagation();if(e.which==27){$('#wdt-frontend-modal').modal('hide').removeClass('wdt-skin-'+tableDescription.tableSkin)}});$('#wdt-frontend-modal').on('hidden.bs.modal',function(e){$(tableDescription.selector+'_wrapper').append($(tableDescription.selector+'_edit_dialog').hide());$(tableDescription.selector+'_wrapper').append($(tableDescription.selector+'_edit_dialog_buttons').hide());$(this).removeClass('wdt-skin-'+tableDescription.tableSkin)});$('#wdt-delete-modal').on('hidden.bs.modal',function(e){$(tableDescription.selector+'_wrapper').append($(tableDescription.selector+'_delete_dialog_buttons').hide());$(this).removeClass('wdt-skin-'+tableDescription.tableSkin)});$('.delete_table_entry[aria-controls="'+tableDescription.tableId+'"]').click(function(e){e.preventDefault();e.stopImmediatePropagation();if($(this).hasClass('disabled')){return!1} $('.wpDataTablesPopover.editTools').hide();var modal=$('#wdt-delete-modal');modal.addClass('wdt-skin-'+tableDescription.tableSkin);modal.find('.modal-footer').html('');modal.find('.modal-footer').append($(tableDescription.selector+'_delete_dialog_buttons').show());modal.modal('show');$(tableDescription.selector+'_wdt-browse-delete-button').click(function(e){e.preventDefault();e.stopImmediatePropagation();if(['manual','mysql'].indexOf(tableDescription.tableType)===-1){if(typeof wpDataTablesEditors[tableDescription.tableType]['delete']=='function'){wpDataTablesEditors[tableDescription.tableType]['delete'](tableDescription)}}else{var row=$(tableDescription.selector+' tr.selected').get(0);var data=wpDataTables[tableDescription.tableId].fnGetData(row);var id_val=data[tableDescription.idColumnIndex];$.ajax({url:tableDescription.adminAjaxBaseUrl,type:'POST',dataType:'json',data:{action:'wdt_delete_table_row',id_key:tableDescription.idColumnKey,id_val:id_val,table_id:tableDescription.tableWpId,wdtNonce:$('#wdtNonceFrontendEdit_'+tableDescription.tableWpId).val()},success:function(data){wpDataTables[tableDescription.tableId].fnDraw(!1);if(data.error==''){$('#wdt-delete-modal').modal('hide');wdtNotify(wpdatatables_edit_strings.success,wpdatatables_edit_strings.rowDeleted,'success')}else{wdtNotify(wpdatatables_edit_strings.error,data.error,'danger')}},error:function(){wdtNotify(wpdatatables_edit_strings.error,wpdatatables_edit_strings.databaseDeleteError,'danger')}})}})});if(tableDescription.popoverTools){$(tableDescription.selector+'_wrapper').css('position','relative');$('
    ').prependTo(tableDescription.selector+'_wrapper').hide();$('.new_table_entry[aria-controls="'+tableDescription.tableId+'"]').prependTo(tableDescription.selector+'_wrapper .wpDataTablesPopover.editTools').css('float','right');$('.edit_table[aria-controls="'+tableDescription.tableId+'"]').prependTo(tableDescription.selector+'_wrapper .wpDataTablesPopover.editTools').css('float','right');$('.delete_table_entry[aria-controls="'+tableDescription.tableId+'"]').prependTo(tableDescription.selector+'_wrapper .wpDataTablesPopover.editTools').css('float','right')} var clickEvent=function(e){if(!$(e.target).is('a')&&!$(e.target).is('button')){e.preventDefault();e.stopImmediatePropagation();e.preventDefault()} if($(this).hasClass('group')){return!1} var popoverVerticalPosition=$(this).offset().top-$(tableDescription.selector+'_wrapper').offset().top-$('.wpDataTablesPopover.editTools').outerHeight()-7;var editedRow=($(this).children('').hasClass('editing'))?!0:!1;if($(this).hasClass('selected')){$(tableDescription.selector+' tbody tr').removeClass('selected');wpDataTablesSelRows[tableDescription.tableId]=-1}else if(!$(this).find('td').hasClass('dataTables_empty')||tableDescription.popoverTools){$(tableDescription.selector+' tbody tr').removeClass('selected');$(this).addClass('selected');wpDataTablesSelRows[tableDescription.tableId]=wpDataTables[tableDescription.tableId].fnGetPosition($(tableDescription.selector+' tbody tr.selected').get(0))} if($(tableDescription.selector+' tbody tr.selected').length>0){$('.edit_table[aria-controls="'+tableDescription.tableId+'"]').removeClass('disabled');$('.delete_table_entry[aria-controls="'+tableDescription.tableId+'"]').removeClass('disabled');$('.master_detail[aria-controls="'+tableDescription.tableId+'"]').removeClass('disabled');if(!editedRow){$('.wpDataTablesPopover.editTools.'+tableDescription.tableId+'').show().css('top',popoverVerticalPosition)}else{return!1}}else{$('.edit_table[aria-controls="'+tableDescription.tableId+'"]').addClass('disabled');$('.delete_table_entry[aria-controls="'+tableDescription.tableId+'"]').addClass('disabled');$('.master_detail[aria-controls="'+tableDescription.tableId+'"]').addClass('disabled');$('.wpDataTablesPopover.editTools.'+tableDescription.tableId+'').hide()}};var ua=navigator.userAgent,event=(ua.match(/iPad/i))?"touchstart":"click";$(document).off(event,tableDescription.selector+' tbody tr').on(event,tableDescription.selector+' tbody tr',clickEvent);$(document).on('click',tableDescription.selector+'_edit_dialog a.wdt-detach-attachment-file, a.wdt-detach-attachment-file',function(e){e.preventDefault();e.stopImmediatePropagation();if($(this).parent().find('span.fileupload-'+tableDescription.tableId).data('column_type')=='icon'){$(this).parent().find('input.editDialogInput').val('');$(this).parent().parent().find('.fileinput-preview').html('');$(this).parents('.fileinput-exists').removeClass('fileinput-exists').addClass('fileinput-new')}else{$(this).parent().find('input.editDialogInput').val('');$(this).parent().find('.fileinput-filename').text('');$(this).parent().removeClass('fileinput-exists').addClass('fileinput-new')}})} $(document).on('focusin',function(e){if($(e.target).closest(".mce-window").length){e.stopImmediatePropagation()}});if(tableDescription.masterDetail!==undefined&&tableDescription.masterDetail){for(var i in wpDataTablesHooks.onRenderDetails){if(!isNaN(i)) wpDataTablesHooks.onRenderDetails[i](tableDescription)}} if(tableDescription.filterInForm==!0){if($('#wdt-filter-widget').length){$('.wpDataTablesFilter').appendTo('#wdt-filter-widget')}} return wpDataTables[tableDescription.tableId]};$('table.wpDataTable:not(.wpdtSimpleTable)').each(function(){var tableDescription=JSON.parse($('#'+$(this).data('described-by')).val());wdtRenderDataTable($(this),tableDescription)})})})(jQuery);function wdtApplyCellAction($cell,action,setVal){switch(action){case 'setCellColor':$cell.attr('style','background-color: '+setVal+' !important');break;case 'defaultCellColor':$cell.attr('style','background-color: "" !important');break;case 'setCellContent':if($cell.children().hasClass('responsiveExpander')){$cell.html(setVal).prepend('')}else{$cell.html(setVal)} break;case 'setCellClass':$cell.addClass(setVal);break;case 'removeCellClass':$cell.removeClass(setVal);break;case 'setRowColor':$cell.closest('tr').find('td').attr('style','background-color: '+setVal+' !important');break;case 'defaultRowColor':$cell.closest('tr').find('td').attr('style','background-color: "" !important');break;case 'setRowClass':$cell.closest('tr').addClass(setVal);break;case 'addColumnClass':var index=$cell.index()+1;$cell.closest('table.wpDataTable').find('tbody td:nth-child('+index+')').addClass(setVal);break;case 'setColumnColor':var index=$cell.index()+1;$cell.closest('table.wpDataTable').find('tbody td:nth-child('+index+')').attr('style','background-color: '+setVal+' !important');break}} function wdtDialog(str,title){var dialogId=Math.floor((Math.random()*1000)+1);var editModal=jQuery('.wdt-frontend-modal').clone();editModal.attr('id','remodal-'+dialogId);editModal.find('.modal-title').html(title);editModal.find('.modal-header').append(str);return editModal} function wdtAddOverlay(table_selector){jQuery(table_selector).addClass('overlayed')} function wdtRemoveOverlay(table_selector){jQuery(table_selector).removeClass('overlayed')} function getPurifiedValue(element,responsive){if(responsive){var cellVal=element.children('.columnValue').html()}else{cellVal=element.clone().children().remove().end().html()} return cellVal} function wdtCheckConditionalFormatting(conditionalFormattingRules,params,element,responsive){var cellVal='';var ruleVal='';var ruleMatched=!1;if((params.columnType=='int')||(params.columnType=='float')){cellVal=parseFloat(wdtUnformatNumber(getPurifiedValue(element,responsive),params.thousandsSeparator,params.decimalSeparator,!0)) ruleVal=conditionalFormattingRules.cellVal}else if(params.columnType=='date'){cellVal=moment(getPurifiedValue(element,responsive),params.momentDateFormat).toDate();if(conditionalFormattingRules.cellVal=='%TODAY%'){ruleVal=moment().startOf('day').toDate()}else{ruleVal=moment(conditionalFormattingRules.cellVal,params.momentDateFormat).toDate()} if(conditionalFormattingRules.cellVal=='%LAST_WEEK%'){conditionalFormattingRules.ifClause='%LAST_WEEK%' ruleVal=[moment().subtract(1,'weeks').startOf('isoWeek').toDate(),moment().subtract(1,'weeks').endOf('isoWeek').toDate()]} if(conditionalFormattingRules.cellVal=='%THIS_WEEK%'){conditionalFormattingRules.ifClause='%THIS_WEEK%' ruleVal=[moment().startOf('isoweek').toDate(),moment().endOf('isoweek').toDate()]} if(conditionalFormattingRules.cellVal=='%NEXT_WEEK%'){conditionalFormattingRules.ifClause='%LAST_WEEK%' ruleVal=[moment().add(1,'weeks').startOf('isoWeek').toDate(),moment().add(1,'weeks').endOf('isoWeek').toDate()]} if(conditionalFormattingRules.cellVal=='%LAST_30_DAYS%'){conditionalFormattingRules.ifClause='%LAST_30_DAYS%' ruleVal=[moment().add(-30,'days').startOf('day').toDate(),moment().toDate()]} if(conditionalFormattingRules.cellVal=='%LAST_MONTH%'){conditionalFormattingRules.ifClause='%LAST_MONTH%' ruleVal=[moment().add(-1,'months').startOf('months').toDate(),moment().startOf('month').toDate()]} if(conditionalFormattingRules.cellVal=='%NEXT_MONTH%'){conditionalFormattingRules.ifClause='%NEXT_MONTH%' ruleVal=[moment().add(1,'months').startOf('months').toDate(),moment().add(2,'months').startOf('months').toDate()]} if(conditionalFormattingRules.cellVal=='%THIS_MONTH%'){conditionalFormattingRules.ifClause='%THIS_MONTH%' ruleVal=[moment().startOf('months').toDate(),moment().endOf('month').toDate()]}}else if(params.columnType=='datetime'){if(conditionalFormattingRules.cellVal=='%TODAY%'){cellVal=moment(getPurifiedValue(element,responsive),params.momentDateFormat+' '+params.momentTimeFormat).startOf('day').toDate();ruleVal=moment().startOf('day').toDate()}else{cellVal=moment(getPurifiedValue(element,responsive),params.momentDateFormat+' '+params.momentTimeFormat).toDate();ruleVal=moment(conditionalFormattingRules.cellVal,params.momentDateFormat+' '+params.momentTimeFormat).toDate()} if(conditionalFormattingRules.cellVal=='%LAST_WEEK%'){conditionalFormattingRules.ifClause='%LAST_WEEK%' ruleVal=[moment().subtract(1,'weeks').startOf('isoWeek').toDate(),moment().subtract(1,'weeks').endOf('isoWeek').toDate()]} if(conditionalFormattingRules.cellVal=='%THIS_WEEK%'){conditionalFormattingRules.ifClause='%THIS_WEEK%' ruleVal=[moment().startOf('isoweek').toDate(),moment().endOf('isoweek').toDate()]} if(conditionalFormattingRules.cellVal=='%NEXT_WEEK%'){conditionalFormattingRules.ifClause='%LAST_WEEK%' ruleVal=[moment().add(1,'weeks').startOf('isoWeek').toDate(),moment().add(1,'weeks').endOf('isoWeek').toDate()]} if(conditionalFormattingRules.cellVal=='%LAST_30_DAYS%'){conditionalFormattingRules.ifClause='%LAST_30_DAYS%' ruleVal=[moment().add(-30,'days').startOf('day').toDate(),moment().toDate()]} if(conditionalFormattingRules.cellVal=='%LAST_MONTH%'){conditionalFormattingRules.ifClause='%LAST_MONTH%' ruleVal=[moment().add(-1,'months').startOf('months').toDate(),moment().startOf('month').toDate()]} if(conditionalFormattingRules.cellVal=='%NEXT_MONTH%'){conditionalFormattingRules.ifClause='%NEXT_MONTH%' ruleVal=[moment().add(1,'months').startOf('months').toDate(),moment().add(2,'months').startOf('months').toDate()]} if(conditionalFormattingRules.cellVal=='%THIS_MONTH%'){conditionalFormattingRules.ifClause='%THIS_MONTH%' ruleVal=[moment().startOf('months').toDate(),moment().endOf('month').toDate()]}}else if(params.columnType=='time'){cellVal=moment(getPurifiedValue(element,responsive),params.momentTimeFormat).toDate();ruleVal=moment(conditionalFormattingRules.cellVal,params.momentTimeFormat).toDate()}else if(params.columnType=='link'){if(responsive){cellVal=element.children('.columnValue').html()}else{cellVal=element.clone().html()} ruleVal=conditionalFormattingRules.cellVal}else{cellVal=getPurifiedValue(element,responsive);ruleVal=conditionalFormattingRules.cellVal} switch(conditionalFormattingRules.ifClause){case 'lt':ruleMatched=cellVal=ruleVal;break;case 'gt':ruleMatched=cellVal>ruleVal;break;case 'contains':ruleMatched=cellVal.indexOf(ruleVal)!==-1;break;case 'contains_not':ruleMatched=cellVal.indexOf(ruleVal)==-1;break;case '%THIS_WEEK%':ruleMatched=moment(cellVal)>=moment(ruleVal[0])&&moment(cellVal)<=moment(ruleVal[1]);break;case '%LAST_WEEK%':ruleMatched=moment(cellVal)>=moment(ruleVal[0])&&moment(cellVal)<=moment(ruleVal[1]);break;case '%NEXT_WEEK%':ruleMatched=moment(cellVal)>=moment(ruleVal[0])&&moment(cellVal)<=moment(ruleVal[1]);break;case '%LAST_30_DAYS%':ruleMatched=moment(cellVal)>=moment(ruleVal[0])&&moment(cellVal)<=moment(ruleVal[1]);break;case '%LAST_MONTH%':ruleMatched=moment(cellVal)>=moment(ruleVal[0])&&moment(cellVal)=moment(ruleVal[0])&&moment(cellVal)=moment(ruleVal[0])&&moment(cellVal)<=moment(ruleVal[1]);break} if(ruleMatched){wdtApplyCellAction(element,conditionalFormattingRules.action,conditionalFormattingRules.setVal)}} jQuery.fn.dataTableExt.oStdClasses.sWrapper="wpDataTables wpDataTablesWrapper";jQuery.fn.dataTable.ext.classes.sLengthSelect='wdt-selectpicker length_menu';jQuery.fn.dataTable.ext.classes.sFilterInput='form-control' /* speetech - Jan Knoblauch - www.speetech.de - 2022-12 - Anpassungen, nicht entfernen - Start */ setInterval(function () { jQuery('div.btn-group.bootstrap-select.wdt-select-filter.wdt-filter-control.open').removeClass('open') }, 1000); /* speetech - Jan Knoblauch - www.speetech.de - 2022-12 - Anpassungen, nicht entfernen - Ende */