PATH:
home
/
fengshp
/
www
/
wp-content
/
plugins
/
themify-builder-pro
/
admin
/
js
((t,e,i,s)=>{"use strict";t.on("tbp_ready",(o=>{t.on("tbp_layout_loaded",(t=>{new class extends t{constructor(t){super(t)}getOptions(){const t=[{id:"tbp_theme_name",label:i.opt_labels.tbp_theme_name,type:"text"}];return i.opt_labels.tbp_theme_screenshot&&t.push({id:"tbp_theme_screenshot",label:i.opt_labels.tbp_theme_screenshot,type:"image",description:i.opt_labels.tbp_theme_screenshot_desc}),t}async importDemo(t,e){const i=e.terms,s=e.posts,o=e.menu_locations,a=e.menu,n=e.menu_items;if(a){const t={menu:a};o&&(t.menu_locations=o),await this.import("menu",t)}i&&await this.import("terms",i),s&&await this.import("posts",s),n&&await this.import("menu_items",n)}}("theme")}),!0);({init(){e.tfClass("tbp_themes")[0].tfOn(t.click,(t=>{const e=t.target.closest(".tb_more_details");e&&(t.stopPropagation(),this.details(e.dataset.id))}),{passive:!0}),this.overlay=e.tfClass("theme-overlay")[0]},details(o){o=parseInt(o);const a=wp.template("tbp-theme-single"),n=t.click,r=i.themes;let h,c,_=null;for(let t=r.length-1;t>-1;--t)if(r[t].theme_id===o){_=r[t],h=r[t+1],c=r[t-1];break}if(null!==_){_.next=h!==s,_.prev=c!==s,this.overlay.classList.toggle("active",_.active),this.overlay.innerHTML=a(_);const o=this.overlay.tfClass("close")[0],r=this.overlay.tfClass("left")[0],d=this.overlay.tfClass("right")[0],l=this.overlay.tfClass("delete-theme")[0],m=this.overlay.tfClass("tbp_lightbox_edit")[0],p=this.overlay.tfClass("tbp_erase_demo")[0],b=t=>{t.preventDefault(),t.stopPropagation(),this.overlay.innerHTML="",this.overlay.classList.add("active"),y()},f=function(i){if(i.preventDefault(),i.stopPropagation(),!this.classList.contains("disabled")){const i=this.classList.contains("left")?c.theme_id:h.theme_id,s=e.tfClass("tb_more_details");for(let e=s.length-1;e>-1;--e)if(s[e].dataset.id==i){y(),t.triggerEvent(s[e],n);break}}},w=function(t){t.stopPropagation(),t.preventDefault(),confirm(i.confirmDelete)&&(window.location.href=this.href)},u=function(i){i.stopPropagation(),i.preventDefault(),t.triggerEvent(e.querySelector('.tbp_themes .tbp_lightbox_edit[data-post-id="'+this.dataset.postId+'"]'),i.type),b(i)},y=()=>{r.tfOff(n,f),d.tfOff(n,f),o.tfOff(n,b,{once:!0}),l?.tfOff(n,w),m?.tfOff(n,u)},g=async e=>{e&&(e.stopPropagation(),e.preventDefault()),await t.loadJs(t.url+"js/admin/notification",!!window.TF_Notification),await TF_Notification.show("info",i.erase.processing);try{const e=await t.fetch({action:"tbp_ajax_erase_demo",nonce:i.nonce});if(!e.success)throw"error";"repeat"===e.data?await g():await TF_Notification.showHide("done",i.erase.done,2e3)}catch(e){const t="string"==typeof e?e:"";throw await TF_Notification.showHide("error",i.erase.error.replace("%error%",t),4e3),e}};l?.tfOn(n,w),m?.tfOn(n,u),p?.tfOn(n,g),o.tfOn(n,b,{once:!0}),r.tfOn(n,f),d.tfOn(n,f)}}}).init()}),!0)})(Themify,document,tbp_admin,void 0);
[+]
..
[+]
components
[-] tbp-admin.js
[edit]
[-] tbp-admin.js.gz
[edit]
[-] tbp-theme.js
[edit]
[-] tbp-theme.js.gz
[edit]