PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / trunk
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress vtrunk
11.1.1 11.1.0 11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 All 62 releases
acymailing / media / js / vue / installed_plugins.min.js

installed_plugins.min.js in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress trunk, at media/js/vue/installed_plugins.min.js

1 lines 5.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 jQuery(function(i){if(Vue.component("vue-switch",{props:["plugin","ischecked"],data:function(){return{id:"vue-switch_",loading:!1,disabled:!1}},mounted:function(){this.id+=this.plugin.id},methods:{toggleActive(e){if(this.loading)return!0;this.loading=!0,this.disabled=!0;let l=ACYM_AJAX_URL+"&ctrl=plugins&task=toggleActivate&id="+e;i.get(l,i=>{if((i=acym_helper.parseJson(i)).error)return acym_helperNotification.addNotification(i.message,"error"),!1;this.loading=!1,this.disabled=!1})}},template:'<div class="cell shrink grid-x"><div class="switch cell shrink"> <input class="switch-input" :id="id" type="checkbox" name="exampleSwitch" :checked="ischecked"> <label class="switch-paddle" @click="toggleActive(plugin.id)" :for="id"> </label> </div><i v-show="loading" class="cell shrink acym__card__loader acymicon-circle-o-notch acymicon-spin"></i></div>'}),i("#acym__plugin__installed__application").length>0){const e=(i,e)=>i.filter(i=>i.id!==e);new Vue({directives:{infiniteScroll:infiniteScroll},el:"#acym__plugin__installed__application",data:{allPlugins:[],displayedPlugins:[],search:acym_helper.getCookie("acym_installed_plugins_search"),type:acym_helper.getCookie("acym_installed_plugins_type"),level:acym_helper.getCookie("acym_installed_plugins_level"),loading:!0,noPluginTodisplay:!1,typingTimer:"",doneTypingInterval:1e3,currentLevel:"",downloading:{},pluginToggling:{},updating:{},pageDisplay:1,busy:!1,showSettings:{}},mounted:function(){this.allPlugins=window.acymailingAddons,this.currentLevel=("undefined"==typeof ACYM_LEVEL?"":ACYM_LEVEL).toLowerCase(),this.resetDisplay(),0===this.displayedPlugins.length&&(this.noPluginTodisplay=!0),this.fillPluginToggling(),this.fillUpdating(),acym_helper.setSubmitButtonGlobal(),this.loading=!1,setTimeout(()=>{this.$forceUpdate(),this.afterRender()},100)},methods:{afterRender(){i(document).foundation(),i(".reveal-overlay").appendTo("#acym_form"),i(document).trigger("acym_plugins_installed_loaded"),acym_helperTooltip.setTooltip(),acym_helper.setSubmitButtonGlobal(),acym_helperRadio.setRadioIconsGlobal(),acym_helperSwitch.setSwitchFieldsGlobal(),acym_helperDatePicker.setRSDateChoice(),acym_helperDatePicker.setDatePickerGlobal(),acym_helperSelect2.setSelect2(),acym_helperInput.setMulticouple()},toggleSettings(e){let l=i("#acym__plugins__card__"+e),t=i(".acym__plugins__card__flip");!l.hasClass("acym__plugins__card__flip")&&t.length>0&&this.flipCard(t),this.flipCard(l),i('[name="plugin__folder_name"]').val(l.hasClass("acym__plugins__card__flip")?e:"")},flipCard(i){i.toggleClass("acym__plugins__card__flip"),setTimeout(()=>{i.toggleClass("acym__plugins__card__flipped"),acym_helperTooltip.setTooltip()},110)},updatePlugin(e){if(this.updating[e.id])return!0;this.updating[e.id]=!0,this.updating={...this.updating};let l=ACYM_AJAX_URL+"&ctrl=plugins&task=update";i.ajax({url:l,type:"POST",data:{plugin:e}}).then(i=>{if((i=acym_helper.parseJson(i)).error)return acym_helperNotification.addNotification(i.message,"error"),this.updating[e.id]=!1,this.updating={...this.updating},!1;acym_helperNotification.addNotification(i.message,"info"),this.updating[e.id]=!1,this.updating={...this.updating},this.toggleUptodateCurrentApp(e.id)})},removeOnePluginInApp(i){this.allPlugins=e(this.allPlugins,i),this.displayedPlugins=e(this.displayedPlugins,i)},resetDisplay(){this.pageDisplay=1,this.fillDisplayPlugins()},fillDisplayPlugins(){this.displayedPlugins=this.filterPlugin().slice(0,18*this.pageDisplay),this.displayedPlugins=[...this.displayedPlugins]},rightLevel(i){return"starter"===i||("essential"===i&&-1!==["essential","enterprise"].indexOf(this.currentLevel)||"enterprise"===i&&"enterprise"===this.currentLevel)},filterPlugin(){return this.allPlugins.filter(i=>-1!==i.level.toLowerCase().indexOf(this.level.toLowerCase())&&-1!==i.category.toLowerCase().indexOf(this.type.toLowerCase())&&-1!==i.folder_name.toLowerCase().indexOf(this.search.toLowerCase()))},toggleUptodateCurrentApp(i){this.allPlugins.map(e=>{e.id===i&&(e.uptodate="1"==e.uptodate?"0":"1")}),this.displayedPlugins=[...this.displayedPlugins]},deletePlugin(e){if(acym_helper.confirm(ACYM_JS_TXT.ACYM_ARE_YOU_SURE_DELETE_ADD_ON)){let l=ACYM_AJAX_URL+"&ctrl=plugins&task=deletePlugin&id="+e;i.get(l,i=>(i=acym_helper.parseJson(i)).error?(acym_helperNotification.addNotification(i.message,"error"),!1):(acym_helperNotification.addNotification(i.message,"info"),this.removeOnePluginInApp(e),!0))}},fillPluginToggling(){for(let i in this.allPlugins)this.pluginToggling[this.allPlugins[i].id]=!1},fillUpdating(){for(let i in this.allPlugins)this.updating[this.allPlugins[i].id]=!1},isActivated:i=>1==i?"checked":"",loadMorePlugins(){this.pageDisplay++,this.fillDisplayPlugins()},imageUrl:(i,e)=>"PLUGIN"===e?ACYM_MEDIA_URL+"images/plugins/"+i+".png":ACYM_CORE_DYNAMICS_URL+i+"/banner.png",documentationUrl(i,e){if(-1!==["article","page","post"].indexOf(i))return"https://docs.acymailing.com/addons/all-cms-add-ons/wordpress-posts-pages-and-joomla-articles";if("createuser"===i)return"https://docs.acymailing.com/addons/all-cms-add-ons/create-user";if("PLUGIN"!==e)return ACYM_UPDATEME_API_URL+"public/addons/documentation?file_name="+i;{const e=window.acymailingAvailableAddons.find(e=>e.file_name===i);if(e)return e.documentation}},isOverflown(i){return void 0===this.$refs.plugins||void 0===this.$refs.plugins[i]?"":this.$refs.plugins[i].scrollHeight>this.$refs.plugins[i].clientHeight?"acym__plugins__card__params_desc__overflown":""}},watch:{displayedPlugins(i,e){this.noPluginTodisplay=0===this.displayedPlugins.length&&1!==e[0]},search(i){clearTimeout(this.typingTimer),document.cookie="acym_installed_plugins_search="+i+";",""===i?this.resetDisplay():this.typingTimer=setTimeout(()=>{this.resetDisplay()},this.doneTypingInterval)},type(){document.cookie="acym_installed_plugins_type="+this.type+";",this.resetDisplay()},level(){document.cookie="acym_installed_plugins_level="+this.level+";",this.resetDisplay()}}})}});