D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
stickain
/
davidsteele.com
/
wp-content
/
plugins
/
alidswoo
/
assets
/
js
/
admin
/
Filename :
activities.min.js
back
Copy
!function(t){var e={};function n(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(i,a,function(e){return t[e]}.bind(null,a));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=166)}({166:function(t,e,n){t.exports=n(167)},167:function(t,e){jQuery((function(t){var e={list:"#ali-list-template",activities:"#ali-activities-list",notfound:"#ali-list-notfound"},n="#checkAll",i={page:"#ads_page"},a={btn:"#bulk-apply",select:"#bulk-action"},r={detailsTmpl:"#details-tmpl",detailsTarget:"#details",dataTmpl:"#activities-data-tmpl",dataTarget:"#activities-data",notfoundTmpl:"#activities-notfound"},o={request:function(e,n,i){n=""!==n&&n instanceof jQuery?window.ADS.serialize(n):n,t.ajaxQueue({url:ajaxurl,data:{action:"ads_action_activities",ads_action:e,args:n},type:"POST",dataType:"json",success:i})},lists:function(){this.request("list",t("#params"),this.listRender)},listRender:function(n){var i=t(e.list).html(),a=t(e.activities);n&&(n.hasOwnProperty("error")?window.ADS.notify(n.error,"danger"):(0===n.items.length&&(i=t(e.notfound).html()),a.html(window.ADS.objTotmpl(i,n)),setTimeout(window.ADS.switchery(a),300),a.find(".pagination-menu").length&&window.ADS.createJQPagination("#"+a.attr("id"),n.total,n.ads_page,t("#ads_count").val())))},checker:function(){t(document).on("change",n,(function(){t(e.activities).find('[name="order_id"]').prop("checked",t(this).is(":checked")),t.uniform.update()})),t(e.activities).on("click",'[name="order_id"]',(function(){var i=t(e.activities).find('[name="order_id"]:not(:checked)');i.length&&t(n).prop("checked")?t(n).prop("checked",!1):0!==i.length||t(n).prop("checked")||t(n).prop("checked",!0),t.uniform.update(n)}))},toTrashRender:function(t){t&&(t.hasOwnProperty("error")?window.ADS.notify(t.error,"danger"):(window.ADS.notify(t.message,"success"),o.lists()))},toTrash:function(n){var a=n.closest(".item");t(e.activities).find('[name="id"]').length<=1&&t(i.page).val(1),this.request("to_trash",a,this.toTrashRender)},handler:function(){var e=this,n=t(document);n.on("click","#btn-clear",(function(){t("#all-type").val("").change(),t.each({ads_page:1,type:"",s:"",from:"",to:""},(function(e,n){t("#params").find('input[name="'+e+'"]').val(n)})),t.event.trigger({type:"datepicker:change"}),e.lists(),t.event.trigger({type:"changedocinfo"})})),n.on("click",".js-to_trash",(function(){e.toTrash(t(this))})),n.on("click",".js-empty_trash",(function(t){t.preventDefault(),e.request("empty_trash","",e.toTrashRender)})),n.on("pagination:click",(function(n){t(i.page).val(n.page),e.lists(),t.event.trigger({type:"changedocinfo"})})),n.on("datepicker:update",(function(){t(i.page).val(1),e.lists(),t.event.trigger({type:"changedocinfo"})})),n.on("click","#btn-search",(function(n){n.preventDefault();var a=t("#search").val().trim();a.length>0&&(t(i.page).val(1),t("#s").val(a),e.lists(),t.event.trigger({type:"changedocinfo"}))})),n.on("change","#all-type",(function(n){t("#type").val(t(this).val()),t('input[name="ads_page"]').val(1),e.lists(),t.event.trigger({type:"changedocinfo"})})),window.ADS.switchery(t("#action-box")),t("#all-type").val(t("#type").val()).selectpicker("refresh")},bulk:function(){t("body").on("click",a.btn,(function(n){n.preventDefault();var r=t(a.select).val(),c=t(e.activities).find('[name="order_id"]:checked'),s=[];switch(c.each((function(e,n){s.push(t(this).val())})),r){case"delete":t(e.activities).find('[name="id"]').length<=c.length&&t(i.page).val(1),o.request("to_trash",{id:s},o.toTrashRender)}return!1}))},renderDetails:function(e){e?e.hasOwnProperty("error")?window.ADS.notify(e.error,"danger"):(t(r.detailsTarget).html(window.ADS.objTotmpl(t(r.detailsTmpl).html(),e)),t(r.dataTarget).html(window.ADS.objTotmpl(t(r.dataTmpl).html(),e))):t(r.detailsTarget).html(window.ADS.objTotmpl(t(r.notfoundTmpl).html(),{}))},renderTrash:function(){window.location.href=t("#uri").val()},handlerItems:function(){t("body").on("click",".js-to_trash-item",(function(){var e=t("#activities_id").val();o.request("to_trash",{id:e},o.renderTrash)}))},details:function(){var e=t("#activities_id").val();o.request("details",{id:e},o.renderDetails)},init:function(){t(e.activities).length?(this.handler(),this.bulk(),this.checker(),this.lists()):t(r.notfoundTmpl).length&&(this.handlerItems(),this.details())}};o.init()}))}});