Файловый менеджер - Редактировать - /home/kunzqhe/photostocker/wp-content/themes/themify-ultra/js/modules/wc.min.js
Ðазад
(($,_,f,t,m)=>{"use strict";if(f.body.classList.contains("slide-cart")){const a=f.querySelectorAll('a[href="#slide-cart"]');0<a.length&&_.sideMenu(a,{close:"#cart-icon-close",beforeShow(){_.loadCss(t.theme_url+"/styles/wc/modules/basket",null,t.theme_v)}})}let c=!1;const e=f.querySelectorAll("#headerwrap .icon-shopping-cart"),h=()=>{for(let t=e.length-1;-1<t;--t)e[t].classList.remove("tf_loader")};if(_.body.on("added_to_cart removed_from_cart",function(t){const e=$(".cart-icon");if(e.hasClass("empty-cart")&&("added_to_cart"===t.type?e.removeClass("empty-cart"):parseInt($(".cart-icon-link span").text())<=0&&e.addClass("empty-cart")),"added_to_cart"===t.type&&(h(),!1===c)&&m.ajaxCartSeconds){c=!0;let o=parseInt(m.ajaxCartSeconds);const a=f.querySelector(_.isTouch?"#mobile-menu .cart-icon-link":".header-icons .cart-icon-link");if(null!==a){const r=a.getAttribute("href"),s=f.tfId(r.replace("#",""));null!==s&&(_.on("sidemenushow",(t,e,a)=>{r===t&&setTimeout(()=>{$(s).is(":hover")?s.tfOn("mouseleave",function(){a.hidePanel(),f.body.classList.remove("tf_auto_cart_open")},{once:!0,passive:!0}):(a.hidePanel(),f.body.classList.remove("tf_auto_cart_open")),c=!1},o)},!0),f.body.classList.add("tf_auto_cart_open"),setTimeout(()=>{a.click()},100))}}}).on("adding_to_cart",()=>{for(let t=e.length-1;-1<t;--t)e[t].classList.add("tf_loader")}),"undefined"!=typeof wc_add_to_cart_params&&f.body.tfOn("click",t=>{const e=t.target?t.target.closest(".remove_from_cart_button"):null;e&&(t.preventDefault(),e.classList.remove("tf_close"),e.classList.add("tf_loader"))}),m.ajaxSingleCart){const o=f.querySelector("form.cart");o&&o.tfOn("submit",async function(t){if(!(this.classList.contains("auction_form")||-1<window.location.search.indexOf("switch-subscription")||null!==this.closest(".product-type-external"))){t.preventDefault();const e=new FormData(this),a=this.tfClass("single_add_to_cart_button")[0],o=a?a.classList:null,r=this.querySelector('[name="add-to-cart"]');if(!(!r||o&&o.contains("loading"))){"INPUT"!==r.tagName&&e.set("add-to-cart",r.value),o&&(o.remove("added"),o.add("loading")),_.body.triggerHandler("adding_to_cart",[this.querySelector('[type="submit"]'),e]);try{const s=await _.fetch(e,null,null,woocommerce_params.wc_ajax_url.toString().replace("%%endpoint%%","theme_add_to_cart"));if(!s)throw"error";if(!s.fragments&&!s.success)throw s.data;const c=s.fragments,n=s.cart_hash;if(c){const i=Object.keys(c);let a=null;for(let e=i.length-1;-1<e;e--)for(let t=(a=f.querySelectorAll(i[e])).length-1;-1<t;t--)a[t].className+=" updating",a[t].outerHTML=c[i[e]]}o&&o.add("added"),_.body.triggerHandler("added_to_cart",[c,n]),m.redirect&&(window.location.href=m.redirect)}catch(t){const l=f.createDocumentFragment(),d=f.createElement("div"),u=Array.isArray(t)?t:[t];await _.loadJs(_.url+"js/admin/notification",!!window.TF_Notification);for(let e=0;e<u.length;++e){let t=f.createElement("template");t.innerHTML=u[e],l.appendChild(t.content)}d.className="wc_errors",d.appendChild(l),await TF_Notification.showHide("error",d,3e3)}o&&o.remove("loading"),h()}}})}})(jQuery,Themify,document,themify_vars,themifyScript);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка