PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.1.1
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.1.1
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
← All changes | media/js/front/frontusers.min.js +0 -1 trunk → 11.1.1 View file →
@@ -1 +1,0 @@
1 -function initUser(){let e=document.querySelectorAll('select[name="data[listsubdropdown]"]');for(let t in e)e.hasOwnProperty(t)&&e[t].addEventListener("change",function(){let e=document.getElementById("datalistsubdropdown"),t=e.options[e.selectedIndex].value,n=document.getElementsByClassName("listsub-dropdown");for(let e=0;e<n.length;e++)n[e].value="0",n[e].name==="data[listsub]["+t+"][status]"&&(n[e].value="1")});var t=document.querySelector(".acym__user__show-subscription");t&&t.addEventListener("click",function(){let e=this,t=e.parentElement,n=t.querySelector(".acym__user__show-subscription-bt");if(t=t.querySelectorAll(".acym_subscription_more"),0==e.getAttribute("data-iscollapsed")){e.setAttribute("data-iscollapsed","1"),n.innerText="<";for(let e in t)t.hasOwnProperty(e)&&(t[e].style.display="inline-block")}else{e.setAttribute("data-iscollapsed","0"),n.innerText="+"+e.getAttribute("acym-data-value");for(let e in t)t.hasOwnProperty(e)&&(t[e].style.display="none")}})}function acym_checkChangeForm(){const e=document.getElementById(window.acyFormName),t={errors:0};if(acym_resetInvalidClass(),acym_checkEmailField(e,"data[user][email]",t),acym_checkEmailField(e,"user[email]",t),acym_handleRequiredRadio(t),acym_handleRequiredCheckbox(t),acym_handleRequiredDate(t),acym_handleOtherRequiredFields(t),acym_handleAuthorizedContent(t),acym_checkEmailConfirmationField(e,"user[email_confirmation]",t),t.errors>0)return!1;const n=new FormData(e);e.className+=" acym_module_loading",e.style.filter="alpha(opacity=50)",e.style.opacity="0.5";const a=document.querySelector(".message_"+window.acyFormName);return a&&a.parentNode.removeChild(a),fetch(e.getAttribute("action"),{method:"POST",body:n}).then(e=>e.json()).then(e=>{acymDisplayAjaxResponse(decodeURIComponent(e.message),e.type,!1)}).catch(()=>{acymDisplayAjaxResponse(ACYM_JS_TXT.ACYM_ERROR,"error",!1)}),!1}function acymSubmitForm(e,t){let n=t.closest("form").querySelector('[name="task"]'),a=t.closest("form").querySelector("#formSubmit");void 0!==n&&void 0!==a?(n.value=e,a.click()):alert(ACYM_JS_TXT.ACYM_COULD_NOT_SUBMIT_FORM_CONTACT_ADMIN_WEBSITE)}function acym_checkEmailConfirmationField(e,t,n){let a=e.elements["user[email]"],s=e.elements[t];s&&a.value!==s.value&&acymAddInvalidClass(t,n,window.acymModule.VALID_EMAIL_CONFIRMATION)}function blockPasteEvent(){document.querySelectorAll('input[name="user[email_confirmation]"]').forEach(e=>{e.addEventListener("paste",e=>{e.preventDefault()})})}function handleUnsubscribeReasonChange(){const e=document.querySelector('select[name="unsubscribe_selector_reason"]');if(!e)return;const t=document.getElementById("acym__custom__unsubscribe__reason"),n=document.querySelector(".acym__custom__reason__label"),a=document.querySelector('input[name="unsubscribe_reason"]');e.addEventListener("change",function(){0===this.selectedIndex?(a.value="",t.classList.add("is-hidden"),t.setAttribute("aria-hidden","true"),n.classList.add("is-hidden"),n.setAttribute("aria-hidden","true")):this.selectedIndex===this.options.length-1?(t.classList.remove("is-hidden"),t.removeAttribute("aria-hidden"),n.classList.remove("is-hidden"),n.removeAttribute("aria-hidden"),a.value=""):(t.classList.add("is-hidden"),t.setAttribute("aria-hidden","true"),n.classList.add("is-hidden"),n.setAttribute("aria-hidden","true"),a.value=this.selectedIndex),updateFieldStyle(e,""!==a.value)}),t.addEventListener("input",function(){a.value=this.value,updateFieldStyle(e,""!==a.value)})}function updateFieldStyle(e,t){t?e.classList.add("acym__unsub__reason__selected"):e.classList.remove("acym__unsub__reason__selected")}function handleDisplayedCheckedLists(){const e=document.getElementById("displayed_checked_lists");if(!e)return;const t=[];document.querySelectorAll(".acym__unsubscribe__list__switch input.switch-input").forEach(e=>{const n=e.closest(".acym__unsubscribe__list__switch").querySelector('input[type="hidden"]');e.addEventListener("change",()=>{n.value=e.checked?"1":"0"}),e.checked?(n.value="1",t.push(n.name.match(/\d+/)[0])):n.value="0"}),e.value=t.join(",")}function handleLanguageChange(){const e=document.getElementById("acym__unsubscribe__language__select");let t=window.location.href;const n=t.match(/&language=[^&]+/);null!==n&&n.length>0&&(t=t.replace(n[0],"")),null!==e&&e.addEventListener("change",function(){t+="&language="+this.value,window.location.href=t})}document.addEventListener("DOMContentLoaded",function(){initUser(),blockPasteEvent(),handleUnsubscribeReasonChange(),handleDisplayedCheckedLists(),handleLanguageChange()});