Файловый менеджер - Редактировать - /home/kunzqhe/www/wp-content/plugins/themify-builder-pro/admin/js/tbp-active.min.js
Назад
'use strict';(function(e,b){function n(b){return!("advanced-posts"===b&&"archive"===tbp_local.template||"advanced-products"===b&&"product_archive"===tbp_local.template)}Themify.LoadCss(tbp_local.cssUrl,tbp_local.v);window.top.Themify.LoadCss(tbp_local.cssUrl,tbp_local.v);tbp_local.cssUrl=null;"undefined"!==typeof tbp_local&&tbp_local.template&&(document.body.classList.add("tbp_template_type_"+tbp_local.template),window.top.document.body.classList.add("tbp_template_type_"+tbp_local.template));let h= null;const q=function(f,a){e(".builder-posts-wrap > .themify_builder_slider",f).each(function(){this.swiper.destroy();e(this).find("article.post").first().prependTo(e(this).closest(".builder-posts-wrap")).siblings().remove()});var d=f.getElementsByClassName("tbp_advanchd_archive_wrap")[0],c=-1!==a.get("mod_name").indexOf("product")?"_product":"";const l="tbp_edit"+c+"_archive",p="tbp_edit"+c+"_single";c=["order","orderby","offset","meta_key"];const k=a.get("element_id"),m=e.extend(!0,{},a.get("mod_settings")); d.classList.add("themify_builder_content");d.classList.add("themify_builder_content-"+k);d.classList.add("themify_builder");d.setAttribute("id","themify_builder_content-"+k);d.setAttribute("data-postid",k);d=m.builder_content;let g=e("."+l);"string"===typeof d&&(d=JSON.parse(d));h={aap:!0};!0===n(a.attributes.mod_name)&&(c.push("terms"),c.push("term_type"),c.push("tax"),c.push("post_type"));for(let a=c.length-1;-1<a;--a)void 0!==m[c[a]]&&""!==m[c[a]]&&(h[c[a]]=m[c[a]]);b.Forms.LayoutPart.cache[k]= d;b.activeModel=b.ActionBar.hoverCid=d=null;document.body.className+=" tbp_app_is_edit tbp_module_"+a.get("mod_name");window.top.document.body.className+=" tbp_app_is_edit tbp_module_"+a.get("mod_name");g=g.add(e("."+l,window.top.document));for(c=g.length-1;-1<c;--c)g[c].classList.remove(l),g[c].classList.add(p);e(f).one("tb_layout_part_before_init",function(){const c=e(this).find(".tb_toolbar_save"),d=e(this).find(".tb_toolbar_close_btn");c.on("click",function(c){c.preventDefault();c.stopImmediatePropagation(); if(null!==b.activeModel||0<ThemifyBuilderCommon.Lightbox.$lightbox.length&&ThemifyBuilderCommon.Lightbox.$lightbox[0].classList.contains("tb_custom_css_lightbox"))c=ThemifyBuilderCommon.Lightbox.$lightbox[0].getElementsByClassName("builder_save_button")[0],void 0!==c&&c.click();c=a.get("mod_settings");c.builder_content=b.Utils.clear(b.Mixins.Builder.toJSON(b.Instances.Builder[b.builderIndex].el));a.set(c,{silent:!0});ThemifyBuilderCommon.showLoader("show");setTimeout(function(){ThemifyBuilderCommon.showLoader("hide"); b.Forms.LayoutPart.options=null;b.Forms.LayoutPart.isSaved=!0},100)});d.on("click",function(d){d.preventDefault();d.stopImmediatePropagation();const f=!0===b.Forms.LayoutPart.isSaved;h=null;b.Forms.LayoutPart.close(d);if(!0===f||0===b.builderIndex){e(this).off("click");c.off("click");delete b.Forms.LayoutPart.cache[k];b.activeModel=b.ActionBar.hoverCid=null;document.body.classList.remove("tbp_app_is_edit","tbp_module_"+a.get("mod_name"));window.top.document.body.classList.remove("tbp_app_is_edit", "tbp_module_"+a.get("mod_name"));for(d=g.length-1;-1<d;--d)g[d].classList.add(l),g[d].classList.remove(p);!0===f&&(ThemifyBuilderCommon.showLoader("show"),a.trigger("custom:preview:refresh",a.get("mod_settings")),setTimeout(function(){b.ActionBar.hoverCid=null;ThemifyBuilderCommon.showLoader("hide")},220))}});e(".tb_overlay").first().one("dblclick",function(a){a.preventDefault();a.stopImmediatePropagation();b.Forms.LayoutPart.options=null;b.Forms.LayoutPart.isSaved=!0;c.triggerHandler("click");d.triggerHandler("click")})})}; b.Constructor.advanced_posts_query={render:function(b,a){return!0===n("advanced-posts")?a.query_posts.render({type:"query_posts",id:"post_type",tax_id:"tax",term_id:"terms",slug_id:"slug",wrap_class:"tbp_app_post_query"},a):document.createDocumentFragment()}};b.Constructor.advanced_products_query={render:function(b,a){return!0===n("advanced-products")?(a.values.query_type&&("tag"===a.values.query_type?(a.values.query_type="product_tag",a.values.product_tag_terms=a.values.tag_products):"category"=== a.values.query_type&&(a.values.query_type="product_cat",a.values.product_cat_terms=a.values.category_products)),a.values.post_type="product",a.create([{type:"query_posts",id:"post_type",tax_id:"query_type",term_id:"#tmp_id#_terms"}])):document.createDocumentFragment()}};b.Constructor.tbp_advanched_layout={render:function(f,a){const d=document.createDocumentFragment();if("visual"===b.mode){const a=document.createElement("a"),f=function(a){a.stopPropagation();a.preventDefault();this.removeEventListener("click", f,{once:!0});const c=b.activeModel.cid;ThemifyConstructor.saveComponent();this.className+=" tb_edit";b.Models.Registry.lookup(c).trigger("edit",a,this)};a.className="tbp_advanched_archive_edit";a.href="#";a.textContent=tbp_local.edit;a.addEventListener("click",f,{once:!0});d.appendChild(a)}a.values[f.id]&&(a.values[f.id]=JSON.stringify(a.values[f.id]));d.appendChild(a.hidden.render(f,a));return d}};b.Constructor.fallback={render:function(b,a){return a.create([{id:"fallback_s",type:"toggle_switch", label:"fall_b",options:{on:{name:"yes",value:"en"},off:{name:"no",value:"dis"}},binding:{checked:{show:["fallback_i"]},not_checked:{hide:["fallback_i"]}}},{id:"fallback_i",type:"image",wrap_class:"pushed","class":"xlarge"}])}};b.Constructor.tbp_custom_css={render:function(b,a){return a.create([{id:"css",type:"custom_css"},{type:"custom_css_id"}])}};"visual"===b.mode&&(void 0!==tbp_local.id&&e.ajaxPrefilter(function(b,a,d){if(a.data&&("tb_render_element"===a.data.action||"tb_load_module_partial"=== a.data.action)){b.data+="&pageId="+tbp_local.id;a=null;if(null!==h)for(let c in h)"tax"===c?a=h[c]:b.data+="&"+c+"="+h[c];null===a&&(a=tbp_local.type);b.data+="&type="+a}}),Themify.body.on("tb_edit_advanced-posts tb_edit_advanced-products",function(f,a,d,c){if(!b.Forms.LayoutPart.id&&a&&("dblclick"===a.type||a.target.classList.contains("tb_edit")))return null!==b.activeModel&&e(".builder_save_button",ThemifyBuilderCommon.Lightbox.$lightbox[0]).click(),q(d,c),!0}));e(document).on("tb_editing_module", function(b){const a=themifyBuilder.DynamicQuery.input;e(ThemifyBuilderCommon.Lightbox.$lightbox[0]).find('.tb_field[data-type="query_posts"]').each(function(){const b=e(this);if(!b.prev(".tb_field.tbpdq").length){var c=b.find(".tb_search_input.tb_lb_option:first").prop("id");a.binding={off:{show:[c]},on:{hide:[c]}};"archive"!==tbp_local.template&&"product_archive"!==tbp_local.template&&(a.wrap_class="tf_hide");e(ThemifyConstructor.create([a])).insertBefore(b)}})})})(jQuery,tb_app);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка