PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.9
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.9
4.4.9 4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 All 140 releases
← All changes | assets/js/dist/admin/pages/setup.min.js +1 -1 4.3.8 → 4.4.9 View file →
@@ -1 +1 @@
1 -!function(e){"use strict";let t,c;const a=function(e){t.toggleClass("loading",void 0===e||e)},s=function(t){c=e("#learn-press-setup-form");const a=c.serializeJSON();return e.extend(a,t||{})},n=function(){const t=e(this).children(":selected").html().match(/\((.*)\)/),c=t?t[1]:"";e("#currency-pos").children().each(function(){const t=e(this);let a=t.html();switch(t.val()){case"left":a=a.replace(/\( (.*)69/,"( "+c+"69");break;case"right":a=a.replace(/9([^0-9]*) \)/,"9"+c+" )");break;case"left_with_space":a=a.replace(/\( (.*) 6/,"( "+c+" 6");break;case"right_with_space":a=a.replace(/9 (.*) \)/,"9 "+c+" )")}t.html(a)})},r=function(){e.post({url:"",dataType:"html",data:s({"lp-ajax":"get-price-format"}),success(t){e("#preview-price").html(t)}})},l=function(c){c.preventDefault(),a(),e.post({url:e(this).attr("href"),dataType:"html",data:s({"lp-ajax":"setup-create-pages"}),success(c){!function(c){const a=e(c);t.replaceWith(a),t=a}(e(c).contents().filter("#main")),e(".learn-press-dropdown-pages").LP("DropdownPages"),a(!1)}})};e(function(){t=e("#main"),c=e("#learn-press-setup-form"),e(".learn-press-select2").select2(),e(document).on("change","#currency",n).on("change","input, select",r).on("click","#create-pages",l)})}(jQuery);
1 +(()=>{class e{static selectors={elSetupForm:"#learn-press-setup-form",elPreviewPrice:"#preview-price"};init(){this.elSetupForm=document.querySelector(e.selectors.elSetupForm),this.elSetupForm&&this.events()}events(){document.addEventListener("change",e=>{e.target.closest("input, select")&&this.saveSettings()})}saveSettings(){const t=new FormData(this.elSetupForm);fetch(window.location.href,{method:"POST",body:t}).then(e=>e.text()).then(t=>{const s=document.querySelector(e.selectors.elPreviewPrice);s&&(s.innerHTML=t)})}}document.addEventListener("DOMContentLoaded",()=>{(new e).init()})})();