Файловый менеджер - Редактировать - /home/kunzqhe/photostocker/wp-content/themes/themify-ultra/themify/themify-builder/js/editor/themify-global-styles.min.js
Ðазад
(($,n,i)=>{"use strict";const t=function(){this.form=n.tfId("tb_admin_new_gs"),this.loadAddNewForm(),this.addNew(),this.deleteStyle(),this.restore(),this.scalePreview(),this.importFile()};t.prototype.addNew=function(){const t=n.tfClass("tb_admin_save_gs")[0];t&&t.tfOn("click",e=>{e.preventDefault(),this.validateForm()?(e.target.text=i.i18n.creating,$.ajax({type:"POST",url:i.ajaxurl,dataType:"json",data:{action:"tb_save_custom_global_style",nonce:i.nonce,form_data:$(this.form).serialize()},success(t){"failed"===t.status?(alert(t.msg),e.target.text=i.i18n.create):"success"===t.status?window.location=t.url:e.target.text=i.i18n.create}})):alert(i.i18n.formValid)})},t.prototype.validateForm=function(){let a=!0;return $.each($(this.form).serializeArray(),function(t,e){if(""==e.value)return a=!1}),a},t.prototype.loadAddNewForm=function(){const t=$(".tb_add_new_gs");if(0!==t.length){t.magnificPopup({type:"inline",midClick:!0,callbacks:{close(){n.tfId("tb_admin_new_gs").reset()}}});const e=n.tfClass("tb_gs_export");for(let t=e.length-1;-1<t;--t)e[t].tfOn("click",a=>{a.preventDefault(),Themify.fetch({action:"tb_get_gs_post",id:a.target.dataset.id,nonce:i.nonce}).then(e=>{this.loadJsZip().then(()=>{let t=new JSZip;t.file("builder_gs_data_export.txt",JSON.stringify(e)),t.generateAsync({type:"blob"}).then(t=>{const e=a.target.dataset.title+"_export_.zip";this.donwload(t,e)})})})})}},t.prototype.deleteStyle=function(){const t=$(".tb_remove_gs");0!==t.length&&t.on("click",function(t){t.preventDefault();const e=$(this),a=e.parents(".tb_admin_gs_list").data("list"),n="publish"===a?i.i18n.deleteConfirm:i.i18n.deleteConfirm2;confirm(n)&&$.ajax({type:"POST",url:i.ajaxurl,dataType:"json",data:{action:"tb_delete_global_style",nonce:i.nonce,status:a,id:e.attr("data-id")},success(t){"failed"===t.status?(alert(t.msg),e.parents(".tb_gs_element").fadeIn()):"success"===t.status&&e.parents(".tb_gs_element").fadeOut()}})})},t.prototype.restore=function(){const t=$(".tb_gs_restore");0!==t.length&&t.on("click",function(t){t.preventDefault();const e=$(this);e.parents(".tb_gs_element").fadeOut(),$.ajax({type:"POST",url:i.ajaxurl,dataType:"json",data:{action:"tb_restore_global_style",nonce:i.nonce,id:e.attr("data-id")},success(t){"failed"===t.status&&(alert(t.msg),e.parents(".tb_gs_element").fadeIn())}})})},t.prototype.scalePreview=()=>{$(".themify_builder_content").each(function(){let t=$(this),e=t.parent(),a=Math.min(e.width()/t.outerWidth(),e.height()/t.outerHeight());t.css({transform:"translate(-50%, -50%) scale("+a+")"})})},t.prototype.importFile=()=>{const t=n.tfClass("tb_import_gs")[0],s=this;t&&t.tfOn("click",t=>{t.preventDefault();const e=n.createElement("input");e.type="file",e.accept=".zip,.txt",e.tfOn("change",function(t){const e=this.files[0],a=function(t){Themify.fetch({action:"tb_import_gs_posts_ajax",data:t,nonce:i.nonce}).then(t=>{location.reload()})};if("text/plain"===e.type){const n=new FileReader;n.tfOn("loadend",function(t){if(this.readyState!==FileReader.DONE)throw Error(i.i18n.invalid_file);a(t.target.result)},{passive:!0,once:!0}).readAsText(e)}else"application/x-zip-compressed"!==e.type&&"application/zip"!==e.type||s.loadJsZip().then(()=>{const t=new JSZip;t.loadAsync(e).then(t=>{const e=t.files;if(!e||!e["builder_gs_data_export.txt"])throw Error(i.i18n.missing_file);t.file("builder_gs_data_export.txt").async("text").then(t=>{a(t)})}).catch(t=>{throw t})})}).click()})},t.prototype.loadJsZip=()=>Themify.loadJs("https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js",!!window.JSZip,!1),t.prototype.donwload=(t,e)=>{let a=n.createElement("a");a.download=e,a.rel="noopener",a.href=URL.createObjectURL(t),setTimeout(()=>{URL.revokeObjectURL(a.href),a=null},7e3),a.click()},new t})(jQuery,document,themifyGlobalStylesVars);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка