Файловый менеджер - Редактировать - /home/kunzqhe/www/wp-content/plugins/builder-mosaic/assets/admin.min.js
Ðазад
'use strict';(function(f,B,C,b){let D=null,u=".grid-stack .grid-stack-item{position:absolute;left:0;top:0;padding:0}.grid-stack.grid-stack-1{width:auto;margin-left:0;height:auto!important}.grid-stack.grid-stack-1 .builder_mosaic_item.grid-stack-item{position:relative;top:0;left:0;width:auto;margin-bottom:20px}";const e=builderMosaicAdmin,c=window.top,g=c.document.createElement("style"),l={},E=function(b,c){if(void 0===l["l"+b]){l["l"+b]=!0;let c=8.333*b;0===b%3&&(c=Math.round(c));g.textContent+='.grid-stack .grid-stack-item[data-gs-x="'+ b+'"]{left:'+c+"%}"}void 0===l["w"+c]&&(l["w"+c]=!0,b=8.333*c,0===c%3&&(b=Math.round(b)),g.textContent+='.grid-stack .grid-stack-item[data-gs-width="'+c+'"]{width:'+b+"%}")};g.textContent=u;c.document.head.appendChild(g);u=null;C.Constructor.tile_grid={render:function(g,m){let l=!1,n=null,k=null;const u=function(a){if(null===D){const d=e.jqui;c.Themify.LoadAsync(d+"core.min.js",function(){c.Themify.LoadAsync(d+"widget.min.js",function(){c.Themify.LoadAsync(d+"mouse.min.js",function(){c.Themify.LoadAsync(d+ "draggable.min.js",function(){c.Themify.LoadAsync(d+"droppable.min.js",function(){c.Themify.LoadAsync(d+"resizable.min.js",function(){c.Themify.LoadAsync(e.path+"assets/gridstack.js",function(){c.Themify.LoadAsync(e.path+"assets/gridstack.jQueryUI.js",function(){D=!0;a()},e.v)},e.v)},themify_vars.wp,!1,function(){return"undefined"!==typeof c.jQuery.fn.resizable})},themify_vars.wp,!1,function(){return"undefined"!==typeof c.jQuery.fn.droppable})},themify_vars.wp,!1,function(){return"undefined"!==typeof c.jQuery.fn.draggable})}, themify_vars.wp,!1,function(){return"undefined"!==typeof c.jQuery.fn.mouse})},themify_vars.wp,!1,function(){return"undefined"!==typeof c.jQuery.widget})},themify_vars.wp,!1,function(){return"undefined"!==typeof c.jQuery.ui})}else a()},J=function(){const a=[],d=c.document.getElementsByClassName("grid-stack-item");for(let h=0,e=d.length;h<e;++h){var b=f(d[h]);b.is(":visible")&&(b=c.jQuery(b).data("_gridstack_node"),a.push({x:b.x,y:b.y,width:b.width,height:b.height}))}return JSON.stringify(a)},F=function(a, d){l=!1;void 0===d&&(d=!0);d&&n.removeAll();for(let d in a){let c=b.createElement("div"),h=b.createElement("div");c.className="grid-stack-item-content";h.appendChild(c);n.addWidget(h,a[d]);E(a[d].x,a[d].width)}l=!0;d&&k.triggerHandler("change.tile_grid_change")};null===D&&c.Themify.LoadCss(e.admin_css,e.v);const p=b.createElement("div"),v=b.createElement("div"),w=b.createElement("div"),t=b.createElement("span"),q=b.createElement("div"),x=b.createElement("div"),r=b.createElement("a"),G=m.hidden.render({id:g.id, class:"builder_tile_grid_template",type:"hidden",control:{control_type:"change"}},m),H=b.createElement("div"),K=b.createElement("div"),y=b.createElement("div"),z=b.createElement("a"),A=b.createElement("a"),L=m.select.render({id:"layout"},m),I=L.querySelector("select");p.className="builder_tile_grid";v.id="mosaic-presets";w.className="load-template";t.className="template-grid-icon";q.className="load-template-panel";x.className="presets";H.id="tile-grid-editor";K.className="grid-stack";r.href="#";r.id= "tftp-save-preset";r.setAttribute("data-prompt",e.labels.name);r.textContent=e.labels.save;y.className="builder_grid_actions";z.className="tb_builder_add_tile";z.textContent=e.labels.add;A.className="tb_builder_remove_tile";A.textContent=e.labels.remove;for(let a in g.options){let d=b.createElement("a");d.className="tb_mosaic_preset";d.width=d.height=70;d.setAttribute("data-index",a);d.setAttribute("data-template",g.options[a].template);x.appendChild(d)}q.appendChild(x);q.appendChild(b.createTextNode(e.labels.custom)); q.appendChild(b.createElement("br"));q.appendChild(L);w.appendChild(q);t.appendChild(C.Utils.getIcon("ti-layout-column3"));t.appendChild(b.createTextNode(e.labels.template));t.appendChild(C.Utils.getIcon("ti-angle-down"));w.appendChild(t);v.appendChild(r);v.appendChild(w);H.appendChild(K);y.appendChild(z);y.appendChild(A);p.appendChild(v);p.appendChild(G);p.appendChild(H);p.appendChild(y);z.addEventListener("click",function(a){a.preventDefault();a.stopPropagation();a=b.createElement("div");const d= b.createElement("div");a.className="grid-stack-item-content";d.appendChild(a);a=n.addWidget(d,{x:void 0,y:void 0,width:3,height:2,autoPosition:!0});E(a.getAttribute("data-gs-x"),a.getAttribute("data-gs-width"))});A.addEventListener("click",function(a){a.preventDefault();a.stopPropagation();a=k.find(".selected");0<a.length&&n.removeWidget(a)});I.addEventListener("change",function(a){a=this.value;"object"===typeof e.presets[a]&&F(f.parseJSON(e.presets[a].content))},{passive:!0});x.addEventListener("click", function(a){a.preventDefault();a.stopPropagation();a.target.classList.contains("tb_mosaic_preset")&&F(f(a.target).data("template"))});const M=function(a){if("object"===typeof e.presets){const d=b.createDocumentFragment();d.appendChild(b.createElement("option"));for(let c in e.presets){let h=b.createElement("option");h.value=c;h.textContent=e.presets[c].title;void 0!==a&&c===a.layout&&(h.selected=!0);d.appendChild(h)}I.innerHTML="";I.appendChild(d)}};r.addEventListener("click",function(a){a.preventDefault(); a.stopPropagation();const b=prompt(f(this).data("prompt"),f("#mod_title").val());if(b&&0!==k.length){var c=J();ThemifyBuilderCommon.showLoader("show");f.ajax({url:themifyBuilder.ajaxurl,type:"POST",data:{action:"builder_tiled_posts_save_preset",name:b,grid:c},success:function(a){e.presets[a]={title:b,content:c};M({layout:a})},complete:function(a){ThemifyBuilderCommon.showLoader("spinhide")}})}});b.addEventListener("tb_editing_mosaic",function(){u(function(){const a=c.document;k=f(".grid-stack",a); n=new c.GridStack.init({float:!1,rtl:B.isRTL,resizable:{handles:"e, se, s, sw, w"},disableDrag:!1,disableResize:!1},k[0]);k.on("click",".grid-stack-item",function(){f(this).siblings().removeClass("selected").end().addClass("selected")});k.on("change.tile_grid_change",function(a,b){l&&(G.value=J(),B.triggerEvent(G,"change"))});n.on("change",function(a,b){for(a=b.length-1;-1<a;--a)E(b[a].x,b[a].width)});"undefined"!==typeof m.values.template&&F(f.parseJSON(m.values.template),!1);f("#tiled_posts_display", a).trigger("change.tiled_posts_display");M(g);(f("#post_type_ptb",a).find(":checked").length?f("#post_type_ptb").find(":checked"):f("#post_type_ptb",a).find('input[type="radio"]:first').attr("checked","checked")).trigger("change")});const a=ThemifyBuilderCommon.Lightbox.$lightbox.find("#tiled_posts_display"),b=function(a){void 0!==a&&(a=ThemifyBuilderCommon.Lightbox.$lightbox[0].querySelector('.tb_mosaic_tabs a[href$="_'+a+'"]'))&&a.click()};a.on("change",function(){b(f(this).val())});b(m.values[a[0].id]); B.body.one("themify_builder_lightbox_close",function(){a.off("change");k&&k.off("change");n=k=null});ThemifyBuilderCommon.Lightbox.$lightbox.off("click.ptb_field_settings").on("click.ptb_field_settings",".mosaic_ptb_field_group",function(a){a.preventDefault();a.stopPropagation();f(this).toggleClass("expanded").nextUntil(".mosaic_ptb_field_group").toggle()})},{once:!0});return p}}})(jQuery,Themify,tb_app,document);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка