Файловый менеджер - Редактировать - /home/kunzqhe/www/wp-content/themes/themify-ultra/themify/customizer/js/themify.customize-control.min.js
Назад
'use strict';(function(n,c){function l(a){try{a=JSON.parse(a)}catch(b){a={}}return a}function v(a){a=a.prev("li");return 0<a.length&&0===a.children(".themify-control-title").length?v(a):a.index()}n=document.createElement("script");var w=document.getElementsByTagName("script")[0];n.src=("https:"==document.location.protocol?"https":"http")+"://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js";n.type="text/javascript";n.async="true";w.parentNode.insertBefore(n,w);var e=wp.customize,x=!0;window.onbeforeunload= function(){if(!wp.customize.state("saved")())return themifyCustomizerControls.confirm_on_unload};e.bind("pane-contents-reflowed",function(){c(".themify-subaccordion").each(function(){var a=c(this),b=a.data("accordion"),d=c("."+b+"-group");if(d.is("#customize-control-customcss_ctrl")){b=d.find(".CodeMirror-scroll").scrollTop();var f=d.find(".CodeMirror").get(0);d.appendTo(a);"undefined"!==typeof f&&"CodeMirror"in f&&(f.CodeMirror.focus(),f.CodeMirror.scrollTo(0,b))}else d.appendTo(a);c(d.get().reverse()).each(function(){if(0=== c(this).children(".themify-control-title").length){var b=v(c(this));c(this).appendTo(d.eq(b).children(".themify-control-sub-accordeon").first())}})});c('li[id*="nav_menu_locations"]').each(function(){c(this).appendTo(c(this).prev().find(".themify-subaccordion"))});x&&(c("#accordion-section-themify_options:visible").find(".accordion-section-title").trigger("click"),c(".themify-suba-toggle.themify-control-title").unbind("click").click(function(a){a.preventDefault();a=c(this).closest("li").find(".themify-control-sub-accordeon"); c(this).hasClass("topen")?(c(this).removeClass("topen"),a.slideUp()):(c(this).addClass("topen"),a.slideDown())}),c(".themify-control-sub-accordeon").hide(),c("body").on("mouseover",".devices [data-device]",function(a){a=""+c(this).data("device").replace("_"," ");c(this).append('<span class="themify_customize_tooltip">'+a+"</span>")}).on("mouseout",".devices [data-device]",function(a){c(this).children(".themify_customize_tooltip").remove()}),c.event.trigger("themify_customizer_ready"),x=!1)});e.ThemifySubAccordion= e.Control.extend({ready:function(){var a=c(".themify-suba-toggle",this.container),b=a.next();c(".customize-control.customize-control-themify_subaccordion_end").remove();a.on("click",function(a){a.preventDefault();c(this).parent().toggleClass("topen");b.toggleClass("tpanelopen");b.hasClass("tpanelopen")?b.slideDown():b.slideUp()});a=c('select[data-customize-setting-link^="nav_menu_locations"]',this.container);a.closest("label").map(function(){c(this).replaceWith(c(this).contents())});a.wrap('<div class="themify-customizer-brick" />').wrap('<div class="custom-select nav-menu-select" />')}}); e.controlConstructor.themify_subaccordion_start=e.ThemifySubAccordion;e.ThemifyControl=e.Control.extend({value:{},field:"",openMedia:function(){var a=this,b=c(a.field,a.container),d="";c(".open-media",a.container).on("click",function(f){f.preventDefault();d=wp.media.frames.file_frame=wp.media({title:c(this).data("uploader-title"),library:{type:["image"]},button:{text:c(this).data("uploader-button-text")},multiple:!1});d.on("select",function(){var f=d.state().get("selection").first().toJSON(),g=c('<a href="#" class="remove-image tf_close"></a><img src="'+ f.url+'" />').css("display","inline-block"),e=c(".themify_control_preview",a.container),k=c("a",e),l=c("img",e);a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()].id=f.id,a.value[a.id][a.getCurrentDevice()].src=f.url):(a.value[a.id].id=f.id,a.value[a.id].src=f.url);b.val(JSON.stringify(a.value[a.id])).trigger("change");0<k.length&&k.remove();0<l.length&&l.remove();e.append(g).fadeIn()});d.open()}); c(".open-media-wrap",a.container).on("click",".remove-image",function(d){d.preventDefault();a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()].id="",a.value[a.id][a.getCurrentDevice()].src=""):(a.value[a.id].id="",a.value[a.id].src="");b.val(JSON.stringify(a.value[a.id])).trigger("change");c(this).next().remove();c(this).remove()})},pickColor:function(){var a=this,b=c(a.field,a.container),d=0,f= c(".color-select",a.container),h=c(".remove-color",a.container);f.minicolors({defaultValue:"",letterCase:"lowercase",opacity:!0,swatches:themifyColorManager.toColorsArray(),show:function(){themifyColorManager.initColorPicker();var b=c(this);b.closest("li").is(":last-child")&&(b.closest(".color-picker").addClass("color-picker-visible"),b=c(".wp-full-overlay-sidebar-content"),b.scrollTop(b.scrollTop()+140))},change:function(c,f){"headerwrap_background_ctrl"===a.id&&themifyCustomizerControls.header_transparnet&& 1>d&&(alert(themifyCustomizerControls.header_transparnet),d++);a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()].color=c.replace("#",""),a.value[a.id][a.getCurrentDevice()].opacity=f):(a.value[a.id].color=c.replace("#",""),a.value[a.id].opacity=f);b.val(JSON.stringify(a.value[a.id])).trigger("change");h.show()},hide:function(){""!=c(this).val()&&(a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&& (a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()].color=c(this).val().replace("#","")):a.value[a.id].color=c(this).val().replace("#",""),b.val(JSON.stringify(a.value[a.id])).trigger("change"),h.show());var d=c(this);d.closest("li").is(":last-child")&&d.closest(".color-picker").removeClass("color-picker-visible")}});h.on("click",function(c){c.preventDefault();a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]= {}),a.value[a.id][a.getCurrentDevice()]=_.omit(a.value[a.id][a.getCurrentDevice()],"color"),a.value[a.id][a.getCurrentDevice()]=_.omit(a.value[a.id][a.getCurrentDevice()],"opacity")):(a.value[a.id]=_.omit(a.value[a.id],"color"),a.value[a.id]=_.omit(a.value[a.id],"opacity"));b.val(JSON.stringify(a.value[a.id])).trigger("change");f.minicolors("value","");f.minicolors("opacity","");h.hide()})},pickBorderColor:function(){var a=this,b=c(a.field,a.container),d=c(".color-select",a.container),f=c(".remove-color", a.container),h=c(".same",a.container);d.minicolors({defaultValue:"",letterCase:"lowercase",opacity:!0,swatches:themifyColorManager.toColorsArray(),change:function(d,f){var g=c(this).data("side");d=d.replace("#","");h.prop("checked")?a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()].color=d,a.value[a.id][a.getCurrentDevice()].opacity=f,a.value[a.id][a.getCurrentDevice()].same="same"):(a.value[a.id].color= d,a.value[a.id].opacity=f,a.value[a.id].same="same"):a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()][g]=_.extend({},a.value[a.id][a.getCurrentDevice()][g],{color:d,opacity:f}),"top"===g&&(a.value[a.id][a.getCurrentDevice()].color=d,a.value[a.id][a.getCurrentDevice()].opacity=f),a.value[a.id][a.getCurrentDevice()].same=""):(a.value[a.id][g]=_.extend({},a.value[a.id][g],{color:d,opacity:f}),"top"=== g&&(a.value[a.id].color=d,a.value[a.id].opacity=f),a.value[a.id].same="");a.setting.set("{}",{silent:!0});b.val(JSON.stringify(a.value[a.id])).trigger("change");c(this).parent().next().show()},hide:function(){if(c(this).val()){var d=c(this).val(),f=c(this).data("side");d=d.replace("#","");h.prop("checked")?a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()].color=d,a.value[a.id][a.getCurrentDevice()].same= "same"):(a.value[a.id].color=d,a.value[a.id].same="same"):a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()][f]=_.extend({},a.value[a.id][a.getCurrentDevice()][f],{color:d}),"top"===f&&(a.value[a.id][a.getCurrentDevice()].color=d),a.value[a.id][a.getCurrentDevice()].same=""):(a.value[a.id][f]=_.extend({},a.value[a.id][f],{color:d}),"top"===f&&(a.value[a.id].color=d),a.value[a.id].same="");b.val(JSON.stringify(a.value[a.id])).trigger("change"); c(this).parent().next().show()}},show:function(){themifyColorManager.initColorPicker()}});f.on("click",function(d){d.preventDefault();d=c(this).data("side");h.prop("checked")?a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()]=_.omit(a.value[a.id][a.getCurrentDevice()],["color","opacity"]),a.value[a.id][a.getCurrentDevice()].same="same"):(a.value[a.id].color="",a.value[a.id].opacity="",a.value[a.id].same= "same"):a.isResponsiveStyling()?(_.isUndefined(a.value[a.id][a.getCurrentDevice()])&&(a.value[a.id][a.getCurrentDevice()]={}),a.value[a.id][a.getCurrentDevice()][d]=_.extend({},a.value[a.id][a.getCurrentDevice()][d],{color:"",opacity:""}),"top"===d&&(a.value[a.id][a.getCurrentDevice()]=_.omit(a.value[a.id][a.getCurrentDevice()],["color","opacity"])),a.value[a.id][a.getCurrentDevice()].same=""):(a.value[a.id][d]=_.extend({},a.value[a.id][d],{color:"",opacity:""}),"top"===d&&(a.value[a.id].color="", a.value[a.id].opacity=""),a.value[a.id].same="");b.val(JSON.stringify(a.value[a.id])).trigger("change");d=c(this).siblings(".minicolors").children(".color-select");d.minicolors("value","");d.minicolors("opacity","");c(this).hide()})},transparent:function(a){var b=this,d=c(b.field,b.container);a.on("click",function(){var a=c(this);a.prop("checked")?(b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()].transparent= "transparent"):b.value[b.id].transparent="transparent",a.parent().prev().addClass("transparent")):(b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()].transparent=""):b.value[b.id].transparent="",a.parent().prev().removeClass("transparent"));d.val(JSON.stringify(b.value[b.id])).trigger("change")});a.prop("checked")&&a.parent().prev().addClass("transparent")},dropdown:function(a,b){var d=this,f=c(d.field, d.container);a.on("change",function(){var a=d.value[d.id],g=d.getCurrentDevice(),e=c("option:selected",c(this)).val();d.isResponsiveStyling()?(_.isUndefined(a[g])&&(a[g]={}),a[g][b]=e):a[b]=e;f.val(JSON.stringify(a)).trigger("change")})},collapse:function(a){var b=this,d=c(b.field,b.container);a.on("click",function(){var a=c(this);if(a.prop("checked"))b.value[b.id].disabled="disabled",a.parent().siblings(".themify-customizer-brick").stop().slideUp();else{b.value[b.id].disabled="";var h=a.parent().parent().find('input[type="checkbox"].same'); 0<h.length&&h.prop("checked")?a.parent().siblings(".useforall, .collapse-same").stop().slideDown():a.parent().siblings(".themify-customizer-brick").stop().slideDown()}d.val(JSON.stringify(b.value[b.id])).trigger("change")});a.prop("checked")&&a.parent().siblings(".themify-customizer-brick").hide()},input:function(a,b){var d=this,f=c(d.field,d.container);a.on("keyup",function(){d.isResponsiveStyling()?(_.isUndefined(d.value[d.id][d.getCurrentDevice()])&&(d.value[d.id][d.getCurrentDevice()]={}),d.value[d.id][d.getCurrentDevice()][b]= c(this).val()):d.value[d.id][b]=c(this).val();f.val(JSON.stringify(d.value[d.id])).trigger("change")})},dimension:function(a){var b=this,d=c(b.field,b.container);a.on("keyup",function(){var a=b.value[b.id],h=b.getCurrentDevice(),g=c(this).val();b.isResponsiveStyling()?(_.isUndefined(a[h])&&(a[h]={}),a[h].width=g):a.width=g;d.val(JSON.stringify(a)).trigger("change")})},dimensionSame:function(a){var b=this,d=c(b.field,b.container),f=c(".same",b.container);a.on("keyup",function(){var a=c(this).data("side"), g=c(this).val();f.prop("checked")?b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()].width=g,b.value[b.id][b.getCurrentDevice()].same="same"):(b.value[b.id].width=g,b.value[b.id].same="same"):b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()][a]=_.extend({},b.value[b.id][b.getCurrentDevice()][a], {width:g}),"top"===a&&(b.value[b.id][b.getCurrentDevice()].width=g),b.value[b.id][b.getCurrentDevice()].same=""):(b.value[b.id][a]=_.extend({},b.value[b.id][a],{width:g}),"top"===a&&(b.value[b.id].width=g),b.value[b.id].same="");d.val(JSON.stringify(b.value[b.id])).trigger("change")})},auto:function(a){var b=this,d=c(b.field,b.container),f=a.data("hide"),h=c(b.container).find("."+f);a.on("click",function(){var a=c(this),f=b.value[b.id],e=b.getCurrentDevice();a=a.prop("checked")?"auto":"";b.isResponsiveStyling()? (_.isUndefined(f[e])&&(f[e]={}),f[e].auto=a):f.auto=a;h.stop().toggleClass("hide-horizontally",a);d.val(JSON.stringify(f)).trigger("change")});a.prop("checked")&&h.addClass("hide-horizontally")},autoSame:function(a){var b=this,d=c(b.field,b.container),f=c(".same",b.container);a.on("click",function(){var a=c(this),g=a.data("hide"),e=c(this).data("side"),k={};f.prop("checked")?(a.prop("checked")?(k.auto="auto",b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]= {}),b.value[b.id][b.getCurrentDevice()].auto="auto",b.value[b.id][b.getCurrentDevice()].top=_.extend({},b.value[b.id][b.getCurrentDevice()].top,k)):(b.value[b.id].auto="auto",b.value[b.id].top=_.extend({},b.value[b.id].top,k)),c(b.container).find("."+g).stop().addClass("hide-horizontally")):(k.auto="",b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()].auto="",b.value[b.id][b.getCurrentDevice()].top= _.extend({},b.value[b.id][b.getCurrentDevice()].top,k)):(b.value[b.id].auto="",b.value[b.id].top=_.extend({},b.value[b.id].top,k)),c(b.container).find("."+g).stop().removeClass("hide-horizontally")),b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()].same="same"):b.value[b.id].same="same"):(a.prop("checked")?(k.auto="auto",b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&& (b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()][e]=_.extend({},b.value[b.id][b.getCurrentDevice()][e],k),"top"===e&&(b.value[b.id][b.getCurrentDevice()].auto="auto")):(b.value[b.id][e]=_.extend({},b.value[b.id][e],k),"top"===e&&(b.value[b.id].auto="auto")),c(b.container).find("."+g).stop().addClass("hide-horizontally")):(k.auto="",b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()][e]= _.extend({},b.value[b.id][b.getCurrentDevice()][e],k),"top"===e&&(b.value[b.id][b.getCurrentDevice()].auto="")):(b.value[b.id][e]=_.extend({},b.value[b.id][e],k),"top"===e&&(b.value[b.id].auto="")),c(b.container).find("."+g).stop().removeClass("hide-horizontally")),b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()].same=""):b.value[b.id].same="");d.val(JSON.stringify(b.value[b.id])).trigger("change")}); a.each(function(){var a=c(this),d=a.data("hide");a.prop("checked")&&c(b.container).find("."+d).addClass("hide-horizontally")})},dropdownSame:function(a,b){var d=this,f=c(d.field,d.container),e=c(".same",d.container);a.on("change",function(){var a=c(this).data("side"),h=c("option:selected",c(this)).val();if(e.prop("checked"))d.isResponsiveStyling()?(_.isUndefined(d.value[d.id][d.getCurrentDevice()])&&(d.value[d.id][d.getCurrentDevice()]={}),d.value[d.id][d.getCurrentDevice()][b]=h,d.value[d.id][d.getCurrentDevice()].same= "same"):(d.value[d.id][b]=h,d.value[d.id].same="same");else{var k={};k[b]=h;d.isResponsiveStyling()?(_.isUndefined(d.value[d.id][d.getCurrentDevice()])&&(d.value[d.id][d.getCurrentDevice()]={}),d.value[d.id][d.getCurrentDevice()][a]=_.extend({},d.value[d.id][d.getCurrentDevice()][a],k),"top"===a&&(d.value[d.id][d.getCurrentDevice()][b]=h),d.value[d.id][d.getCurrentDevice()].same=""):(d.value[d.id][a]=_.extend({},d.value[d.id][a],k),"top"===a&&(d.value[d.id][b]=h),d.value[d.id].same="")}f.val(JSON.stringify(d.value[d.id])).trigger("change")})}, dropdownBorderSame:function(a){var b=this,d=c(b.field,b.container),f=c(".same",b.container);a.on("change",function(){var a=c(this),e=a.data("side"),m=c("option:selected",a).val();f.prop("checked")?b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()].style=m,b.value[b.id][b.getCurrentDevice()].same="same"):(b.value[b.id].style=m,b.value[b.id].same="same"):b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&& (b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()][e]=_.extend({},b.value[b.id][b.getCurrentDevice()][e],{style:m}),"top"===e&&(b.value[b.id][b.getCurrentDevice()].style=m),b.value[b.id][b.getCurrentDevice()].same=""):(b.value[b.id][e]=_.extend({},b.value[b.id][e],{style:m}),"top"===e&&(b.value[b.id].style=m),b.value[b.id].same="");d.val(JSON.stringify(b.value[b.id])).trigger("change");"none"===m?a.parent().siblings(".color-picker, .border-width, .dimension-unit-label").hide(): a.parent().siblings(".color-picker, .border-width, .dimension-unit-label").show()});a.each(function(){var b=c(this);"none"===c("option:selected",b).val()?b.parent().siblings(".color-picker, .border-width, .dimension-unit-label").hide():b.parent().siblings(".color-picker, .border-width, .dimension-unit-label").show()})},hideComponentsSame:function(a){var b=this,d=c(b.field,b.container),f=c(".component",b.container),e=c(".dimension-row-label:not(.same-label)",b.container),g=a.parent().parent().find(".same-label"); a.on("click",function(){c(this).prop("checked")?(b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()].same="same"):b.value[b.id].same="same",f.stop().slideUp(),e.hide(),g.text(g.data("same"))):(b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()].same=""):b.value[b.id].same="",f.stop().slideDown(), e.show(),g.text(g.data("notsame")));d.val(JSON.stringify(b.value[b.id])).trigger("change")});a.prop("checked")&&(f.hide(),e.hide(),g.text(g.data("same")))},getSelectedData:function(a,b,d){return(a=c(".selected",a).data(b))?a:d},fontStyle:function(a){var b=this,d=c(b.field,b.container);c(".button",a).on("click",function(){var f=c(this).data("style");"underline"===f&&c('.button.selected[data-style="linethrough"]',a).removeClass("selected");"linethrough"===f&&c('.button.selected[data-style="underline"]', a).removeClass("selected");"italic"===f&&c('.button.selected[data-style="normal"]',a).removeClass("selected");"normal"===f&&c('.button.selected[data-style="italic"]',a).removeClass("selected");"nostyle"===f&&c('.button:not([data-style="nostyle"])',a).removeClass("selected");"nostyle"!==f&&c('.button[data-style="nostyle"]',a).removeClass("selected");c(this).toggleClass("selected");b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}), c(".button",a).each(function(){b.value[b.id][b.getCurrentDevice()][c(this).data("style")]=c(this).hasClass("selected")?c(this).data("style"):""})):c(".button",a).each(function(){b.value[b.id][c(this).data("style")]=c(this).hasClass("selected")?c(this).data("style"):""});d.val(JSON.stringify(b.value[b.id])).trigger("change")})},textTransform:function(a){var b=this,d=c(b.field,b.container);c(".button",a).on("click",function(){var f=c(this).data("texttransform");c(".button",a).not(this).removeClass("selected"); c(this).toggleClass("selected");"notexttransform"===f?c('.button:not([data-texttransform="notexttransform"])',a).removeClass("selected"):c('.button[data-texttransform="notexttransform"]',a).removeClass("selected");b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()].texttransform=b.getSelectedData(a,"texttransform")):b.value[b.id].texttransform=b.getSelectedData(a,"texttransform");d.val(JSON.stringify(b.value[b.id])).trigger("change")})}, textAlign:function(a){var b=this,d=c(b.field,b.container);c(".button",a).on("click",function(){var f=c(this).data("align");c(".button",a).not(this).removeClass("selected");c(this).toggleClass("selected");"noalign"===f&&c('.button:not([data-align="noalign"])',a).removeClass("selected");"noalign"!==f&&c('.button[data-align="noalign"]',a).removeClass("selected");b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()].align= b.getSelectedData(a,"align")):b.value[b.id].align=b.getSelectedData(a,"align");d.val(JSON.stringify(b.value[b.id])).trigger("change")})},fontFamily:function(a){var b=this,d=c(b.field,b.container);a.on({change:function(){var a=c(this).closest("li").find(".font_weight_select"),e=0<a.length?c(this).find("option:selected").data("variants"):!1;b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()].family= l(c("option:selected",c(this)).val())):b.value[b.id].family=l(c("option:selected",c(this)).val());if(e){a.closest(".themify-customizer-brick").show();e=c.trim(e).split(",");a.find("option").each(function(){-1===c.inArray(c(this).val(),e)?c(this).hide():c(this).show()});var g=a.find("option:selected");g.is(":visible")||(g.prop("selected",!1),a.find("option").each(function(){if("none"!=c(this).css("display"))return c(this).prop("selected",!0).trigger("change"),!1}))}else"string"===typeof e?a.val("").find("option").hide().closest(".themify-customizer-brick").hide(): a.find("option").show().closest(".themify-customizer-brick").show();d.val(JSON.stringify(b.value[b.id])).trigger("change");c("#themify_font_preview").hide()},focusin:function(){var a=c(this).data("selected");if(0<c(".themify_add_fonts").length){var d=c(".themify_add_fonts").html();d=c(d);d.find("option").removeAttr("selected");a&&d.find('option[data-value="'+a+'"]').attr("selected","selected");c(this).html(d)}else{c("body").append('<span id="themify_font_preview"><span class="themify_font_wait"></span>Font Preview</span>'); var e=l(decodeURI(c("#themify_fonts_hidden").val())),m=e.cf,k=e.google,n=e.fonts;d="";e=null;if(0<m.length){for(var p in m){e=m[p].name;var u=m[p].value,q='{"fonttype":"cf","name":"'+u+'"}';r=a&&a==u?'selected="selected"':"";e=b.escapeHtml(e);d+="<option data-variants='"+m[p].variants+"' data-value='"+u+"' class='cf_font' "+r+" value='"+q+"'>"+e+"</option>"}m=null;c(this).children("optgroup").first().html(d);d=""}for(p in n){e=n[p].value;var r=a&&a==e?'selected="selected"':"";e=b.escapeHtml(e);q= '{"fonttype":"websafe","name":"'+e+'"}';d+="<option "+r+" data-value='"+e+"' value='"+q+"'>"+n[p].name+"</option>"}n=null;c(this).children("optgroup.themify_wsf_optgroup").html(d);d="";for(p in k)e=k[p].name,r=a&&a==e?'selected="selected"':"",q='{"fonttype":"google"',e=b.escapeHtml(e),q+=',"name":"'+e+'"}',d+="<option data-variants='"+k[p].variants+"' data-value='"+e+"' class='google_font' "+r+" value='"+q+"'>"+k[p].name+"</option>";k=null;c(this).children("optgroup").last().html(d);c(this).addClass("themify_add_fonts"); c("#themify_fonts_hidden").remove();b.fontHover()}var t=c(this);t.off("focusin").scombobox({wrap:!0,reassignId:!1,empty:a?!1:!0,showDropDown:!0,beforeClose:function(){c("#themify_font_preview").hide()},afterClose:function(){var a=t.closest(".scombobox").find(".scombobox-display");c.trim(a.val())||t.data("selected","").find("option:selected").prop("selected",!1).trigger("change");c("#themify_font_preview").is(":visible")&&!t.find(".scombobox-list").is(":visible")&&c("#themify_font_preview").hide()}})}})}, escapeHtml:function(a){var b={"&":"&","<":"<",">":">",'"':""","'":"'"};return a.replace(/[&<>"']/g,function(a){return b[a]})},fontHover:function(){c(".themify_combobox").delegate(".scombobox-list p","mouseover",function(a){a.stopImmediatePropagation();var b=c("#themify_font_preview");if(c(this).data("value")&&c(this).is(":visible")){a=l(c(this).data("value"));var d=c(this).offset();b.css({top:d.top-7,left:d.left+260});"google"!==a.fonttype&&"cf"!==a.fonttype||c(this).hasClass("themify_font_loaded")? b.css("font-family",a.name).removeClass("themify_show_wait").show():(c(".themify_combobox .scombobox-list p").removeClass("current"),c(this).addClass("current"),b.addClass("themify_show_wait"),setTimeout(function(){var a=c(".themify_combobox p.current");if(a.closest(".scombobox-list").is(":visible")){var d=l(a.data("value")),e=a.offset(),m={fontloading:function(c,d){b.css("font-family",c).removeClass("themify_show_wait");a.addClass("themify_font_loaded")}};b.css({top:e.top-7,left:e.left+260}).show(); "google"===d.fonttype?m.google={families:[d.name]}:m.custom={families:[d.name],urls:[themifyCustomizerControls.cf_api_url+d.name]};WebFont.load(m)}else b.hide()},800))}else b.hide()})},inputOption:function(a,b){var d=this,e=c(d.field,d.container),h;a.on("keyup",function(){var a=c(this).val();"blogname"===b&&c(".customize-control-themify_logo").find(".site-name").each(function(){c(this).val(a)});clearTimeout(h);h=setTimeout(function(){c.post(ajaxurl,{action:"themify_customizer_save_option",option:b, value:a,nonce:themifyCustomizerControls.nonce},function(a){"saved"===a&&(d.value[d.id].stamp=(new Date).getTime(),e.val(JSON.stringify(d.value[d.id])).trigger("change"))})},750)})},saveOption:function(a,b){var d=this;c.post(ajaxurl,{action:"themify_customizer_save_option",option:a,value:b,nonce:themifyCustomizerControls.nonce},function(a){"saved"===a&&d.saveOptionCallback()})},saveOptionCallback:function(){},changeMode:function(a){var b=this,d=c(b.field,b.container);c(a+"-mode",b.container).each(function(){c(this).on("click", function(){var e=c(this);c(a+"-mode-wrap",b.container).hide();c(a+"-"+e.val()+"-mode",b.container).show();b.value[b.id].mode=e.val();d.val(JSON.stringify(b.value[b.id])).trigger("change")})});c(a+"-mode-wrap",b.container).hide();c(a+"-"+c('input[type="radio"]'+a+"-mode:checked").val()+"-mode",b.container).show()},addQueryArg:function(a,b,c){c=c||window.location.href;var d,e=new RegExp("([?&])"+a+"=.*?(&|#|$)(.*)","gi");return e.test(c)?"undefined"!==typeof b&&null!==b?c.replace(e,"$1"+a+"="+b+"$2$3"): (d=c.split("#"),c=d[0].replace(e,"$1$3").replace(/(&|\?)$/,""),"undefined"!==typeof d[1]&&null!==d[1]&&(c+="#"+d[1]),c):"undefined"!==typeof b&&null!==b?(e=-1!==c.indexOf("?")?"&":"?",d=c.split("#"),c=d[0]+e+a+"="+b,"undefined"!==typeof d[1]&&null!==d[1]&&(c+="#"+d[1]),c):c},getParameterByName:function(a,b){b||(b=window.location.href);a=a.replace(/[\[\]]/g,"\\$&");return(a=(new RegExp("[?&]"+a+"(=([^&#]*)|&|#|$)")).exec(b))?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null},isResponsiveStyling:function(){return"desktop"!== e.previewedDevice.get()},getCurrentDevice:function(){return e.previewedDevice.get()},radioChange:function(a,b){var d=this,e=c(d.field,d.container),h=a.find('input[type="radio"]:checked').val();a.find('input[type="radio"]').on("click",function(){var f=c(this).val();d.isResponsiveStyling()?(_.isUndefined(d.value[d.id][d.getCurrentDevice()])&&(d.value[d.id][d.getCurrentDevice()]={}),d.value[d.id][d.getCurrentDevice()][b]=f):(d.value[d.id][b]=f,a.closest(".customize-control").data("deskValue",f));a.nextAll('[class*="-mode-wrap"]').hide(); a.nextAll('[class*="-'+f+'-mode"]').show();e.val(JSON.stringify(d.value[d.id])).trigger("change")});a.nextAll('[class*="-mode-wrap"]').hide();a.nextAll('[class*="-'+h+'-mode"]').show()}});e.ThemifyFont=e.ThemifyControl.extend({field:".themify_font_control",ready:function(){var a=c(this.field,this.container);this.value[this.id]=a.val()?l(a.val()):{};this.collapse(c(".disable-control",this.container));this.fontFamily(c(".themify_font_family",this.container));this.input(c(".font_size_num",this.container), "sizenum");this.dropdown(c(".font_size_unit",this.container),"sizeunit");this.input(c(".letter_spacing",this.container),"letterspacing");this.dropdown(c(".letter_spacing_unit",this.container),"letterspacingunit");this.input(c(".font_line_num",this.container),"linenum");this.dropdown(c(".font_line_unit",this.container),"lineunit");this.dropdown(c(".font_weight_select",this.container),"weight");this.fontStyle(c(".themify_font_style",this.container));this.textTransform(c(".themify_text_transform",this.container)); this.textAlign(c(".themify_font_align",this.container))}});e.controlConstructor.themify_font=e.ThemifyFont;e.controlConstructor.themify_text_decoration=e.ThemifyFont;e.ThemifyLogo=e.ThemifyControl.extend({field:".themify_logo_control",ready:function(){var a=c(this.field,this.container);this.value[this.id]=a.val()?l(a.val()):{};this.inputOption(c(".site-name",this.container),"blogname");this.input(c(".site-link",this.container),"link");this.openMedia();this.input(c(".img-width",this.container),"imgwidth"); this.input(c(".img-height",this.container),"imgheight");this.collapse(c(".disable-control",this.container));this.fontFamily(c(".themify_font_family",this.container));this.input(c(".font_size_num",this.container),"sizenum");this.dropdown(c(".font_size_unit",this.container),"sizeunit");this.input(c(".font_line_num",this.container),"linenum");this.dropdown(c(".font_line_unit",this.container),"lineunit");this.input(c(".letter_spacing",this.container),"letterspacing");this.dropdown(c(".letter_spacing_unit", this.container),"letterspacingunit");this.dropdown(c(".font_weight_select",this.container),"weight");this.fontStyle(c(".themify_font_style",this.container));this.textTransform(c(".themify_text_transform",this.container));this.textAlign(c(".themify_font_align",this.container));this.pickColor();this.radioChange(c(".logo-modes",this.container),"mode")}});e.controlConstructor.themify_logo=e.ThemifyLogo;e.ThemifyTagline=e.ThemifyControl.extend({field:".themify_tagline_control",ready:function(){var a=c(this.field, this.container);this.value[this.id]=a.val()?l(a.val()):{};this.changeMode(".tagline");this.inputOption(c(".site-description",this.container),"blogdescription");this.openMedia();this.input(c(".img-width",this.container),"imgwidth");this.input(c(".img-height",this.container),"imgheight");this.collapse(c(".disable-control",this.container));this.fontFamily(c(".themify_font_family",this.container));this.input(c(".font_size_num",this.container),"sizenum");this.dropdown(c(".font_size_unit",this.container), "sizeunit");this.input(c(".letter_spacing",this.container),"letterspacing");this.dropdown(c(".letter_spacing_unit",this.container),"letterspacingunit");this.input(c(".font_line_num",this.container),"linenum");this.dropdown(c(".font_line_unit",this.container),"lineunit");this.dropdown(c(".font_weight_select",this.container),"weight");this.fontStyle(c(".themify_font_style",this.container));this.textTransform(c(".themify_text_transform",this.container));this.textAlign(c(".themify_font_align",this.container)); this.pickColor();this.input(c(".site-description-link",this.container),"link")}});e.controlConstructor.themify_tagline=e.ThemifyTagline;e.ThemifyBackground=e.ThemifyControl.extend({field:".themify_background_control",noImage:function(a){var b=this,d=c(b.field,b.container),e=c(".open-media-wrap, .image-label, .background-style, .background-position",b.container);a.on("click",function(){c(this).prop("checked")?(b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]= {}),b.value[b.id][b.getCurrentDevice()].noimage="noimage"):b.value[b.id].noimage="noimage",e.stop().slideUp()):(b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()].noimage=""):b.value[b.id].noimage="",e.stop().slideDown());d.val(JSON.stringify(b.value[b.id])).trigger("change")});a.prop("checked")&&e.hide()},fixedBg:function(a){var b=this,d=c(b.field,b.container);a.on("click",function(){c(this).prop("checked")? b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()].fixedbg="fixed"):b.value[b.id].fixedbg="fixed":b.isResponsiveStyling()?(_.isUndefined(b.value[b.id][b.getCurrentDevice()])&&(b.value[b.id][b.getCurrentDevice()]={}),b.value[b.id][b.getCurrentDevice()].fixedbg=""):b.value[b.id].fixedbg="";d.val(JSON.stringify(b.value[b.id])).trigger("change")})},ready:function(){var a=c(this.field,this.container); this.value[this.id]=a.val()?l(a.val()):{};this.noImage(c(".disable-control",this.container));this.fixedBg(c('.fixed-bg input[type="checkbox"]',this.container));this.openMedia();this.dropdown(c(".image-style",this.container),"style");this.dropdown(c(".position-style",this.container),"position");this.pickColor();this.transparent(c(".color-transparent",this.container))}});e.controlConstructor.themify_background=e.ThemifyBackground;e.ThemifyColor=e.ThemifyControl.extend({field:".themify_color_control", ready:function(){var a=c(this.field,this.container);this.value[this.id]=a.val()?l(a.val()):{};this.pickColor();this.transparent(c(".color-transparent",this.container))}});e.controlConstructor.themify_color=e.ThemifyColor;e.ThemifyImage=e.ThemifyBackground.extend({field:".themify_image_control",ready:function(){var a=c(this.field,this.container);this.value[this.id]=a.val()?l(a.val()):{};this.input(c(".img-width",this.container),"imgwidth");this.input(c(".img-height",this.container),"imgheight");this.openMedia()}}); e.controlConstructor.themify_image=e.ThemifyImage;e.ThemifyBorder=e.ThemifyControl.extend({field:".themify_border_control",ready:function(){var a=c(this.field,this.container);a.val()?this.value[this.id]=l(a.val()):(a={color:"",opacity:"",style:"",width:""},this.value[this.id]={},this.value[this.id].top=a,this.value[this.id].left=a,this.value[this.id].bottom=a,this.value[this.id].right=a);this.collapse(c(".disable-control",this.container));this.pickBorderColor();this.dropdownBorderSame(c(".border-style", this.container));this.dimensionSame(c(".dimension-width",this.container));this.hideComponentsSame(c(".same",this.container))}});e.controlConstructor.themify_border=e.ThemifyBorder;e.ThemifyMargin=e.ThemifyControl.extend({field:".themify_margin_control",ready:function(){var a=c(this.field,this.container);a.val()?this.value[this.id]=l(a.val()):(a={width:"",unit:"px"},this.value[this.id]={},this.value[this.id].top=a,this.value[this.id].left=a,this.value[this.id].bottom=a,this.value[this.id].right=a); this.collapse(c(".disable-control",this.container));this.dimensionSame(c(".dimension-width",this.container));this.dropdownSame(c(".dimension-unit",this.container),"unit");this.autoSame(c(".auto-prop",this.container));this.hideComponentsSame(c(".same",this.container))}});e.controlConstructor.themify_margin=e.ThemifyMargin;e.ThemifyPadding=e.ThemifyMargin.extend({field:".themify_padding_control"});e.controlConstructor.themify_padding=e.ThemifyPadding;e.ThemifyWidth=e.ThemifyControl.extend({field:".themify_width_control", ready:function(){var a=c(this.field,this.container);a.val()?this.value[this.id]=l(a.val()):this.value[this.id]={width:"",unit:"px",auto:""};this.dimension(c(".dimension-width",this.container));this.dropdown(c(".dimension-unit",this.container),"unit");this.auto(c(".auto-prop",this.container))}});e.controlConstructor.themify_width=e.ThemifyWidth;e.ThemifyHeight=e.ThemifyWidth.extend({field:".themify_height_control"});e.controlConstructor.themify_height=e.ThemifyHeight;e.ThemifyPosition=e.ThemifyControl.extend({field:".themify_position_control", dropdownPosition:function(a,b){var d=this,e=c(d.field,d.container),h=a.find("option:selected").val();a.on("change",function(){var a=c(this),f=c("option:selected",a).val();d.value[d.id][b]=f;e.val(JSON.stringify(d.value[d.id])).trigger("change");f&&"static"!==f?a.closest(".themify-customizer-brick").parent().find(".position-wrap").show():a.closest(".themify-customizer-brick").parent().find(".position-wrap").hide()});h&&"static"!==h?a.closest(".themify-customizer-brick").parent().find(".position-wrap").show(): a.closest(".themify-customizer-brick").parent().find(".position-wrap").hide()},ready:function(){var a=c(this.field,this.container);this.value[this.id]=a.val()?l(a.val()):{position:""};this.dropdownPosition(c(".position",this.container),"position");this.dimensionSame(c(".dimension-width",this.container));this.dropdownSame(c(".dimension-unit",this.container),"unit");this.autoSame(c(".auto-prop",this.container))}});e.controlConstructor.themify_position=e.ThemifyPosition;e.ThemifyCustomCSS=e.ThemifyControl.extend({field:".themify_customcss_control", expand:function(a){c(".themify-expand",a.container).on("click",function(b){b.preventDefault();a.editor.codemirror.setOption("fullScreen",!0);c(".close-custom-css-expanded").addClass("enable-expanded-area");c(".close-custom-css-expanded").on("click",function(){a.editor.codemirror.setOption("fullScreen",!1);c(".close-custom-css-expanded").removeClass("enable-expanded-area")})})},ready:function(){var a=c(this.field,this.container),b=c(".customcss",this.container);this.value[this.id]=a.data("value")? window.atob(a.data("value")):"";a.data("value","");a.val(this.value[this.id]);this.initSyntaxHighlightingEditor();"undefined"!==typeof this.editor?this.editor.codemirror.getValue():this.container.find("textarea").val();this.expand(this,b)},initSyntaxHighlightingEditor:function(a){if("undefined"!==typeof wp.codeEditor){var b=this;a=a?a.find("textarea"):b.container.find("textarea");var d=wp.codeEditor.defaultSettings?_.clone(wp.codeEditor.defaultSettings):{};d.codemirror=_.extend({},d.codemirror,{indentUnit:2, tabSize:2,mode:"css"});b.editor=wp.codeEditor.initialize(a,d);c(b.editor.codemirror.display.lineDiv).attr({role:"textbox","aria-multiline":"true","aria-label":b.params.label,"aria-describedby":"editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"});b.editor.codemirror.on("change",function(a){b.container.find("textarea").val(a.getValue()).trigger("change")});b.editor.codemirror.on("keydown",function(a,b){27==b.keyCode&&b.stopPropagation()})}}}); e.controlConstructor.themify_customcss=e.ThemifyCustomCSS;e.ThemifyImageSelect=e.ThemifyControl.extend({field:".themify_image_select_control",ready:function(){var a=this,b=c(a.field,a.container);b.val()?a.value[a.id]=l(b.val()):a.value[a.id]={type:"",selected:""};c(".image-select",a.container).on("click",function(d){d.preventDefault();a.value[a.id].selected=c(this).data("option");b.val(JSON.stringify(a.value[a.id])).trigger("change")})}});e.controlConstructor.themify_image_select=e.ThemifyImageSelect; e.ThemifyTools=e.ThemifyControl.extend({field:".themify_tools_control",clearing:!1,saveOptionCallback:function(){c("#customize-header-actions").find(".save").trigger("click")},ready:function(){var a=this;e.bind("saved",function(){if(e.ThemifyTools.field){if("true"===a.getParameterByName("cleared"))window.location.reload();else{var b=window.top.location.href;b="#"==b[b.length-1]?b.replace("#",""):b;window.top.location=b}e.ThemifyTools.field=!1}});c(".clearall",a.container).on("click",function(){if(window.confirm(themifyCustomizerControls.clearMessage)){e.ThemifyTools.field= !0;c(".themify-customizer-value-field").each(function(){c(this).val("").trigger("change")});e.previewer.send("themify-customize-clearall");var b=c(".customize-control-themify_logo").find(".site-name").val(),d=c(".customize-control-themify_tagline").find(".site-name").val(),f=c(this).data("sitename"),h=c(this).data("tagline");b!=f||d!=h?(a.saveOption("blogname",f),a.saveOption("blogdescription",h)):a.saveOptionCallback()}});c(".customize-export",a.container).on("click",function(a){"Published"!=c("#customize-header-actions").find(".save").val()&& (window.confirm(themifyCustomizerControls.exportMessage)||a.preventDefault())})}});e.controlConstructor.themify_tools=e.ThemifyTools;(function(){var a,b;c("body").on("click","#customize-footer-actions .devices button",function(){var d=c(this).data("device"),e=c("#customize-preview");"object"===typeof themifyCustomizerControls.responsiveBreakpoints&&(a=themifyCustomizerControls.responsiveBreakpoints[d])?("tablet_landscape"===d&&(a=976),b={width:a+"px",marginLeft:-a/2}):b={width:"",marginLeft:""};e.css(b)})})(); c("body").on("click","#customize-control-start_mobile_menu_acc_ctrl > .themify-suba-toggle",function(a){var b=c("#customize-preview > iframe")[0].contentWindow;c(this).closest(".customize-control").hasClass("topen")?(c("#customize-footer-actions .preview-desktop").click(),setTimeout(function(){c("#customize-preview").width()>themifyCustomizerControls.mobile_menu_trigger_point&&c("#customize-preview").css({width:themifyCustomizerControls.mobile_menu_trigger_point+"px",marginLeft:(c("#customize-preview").width()- themifyCustomizerControls.mobile_menu_trigger_point)/2});setTimeout(function(){b.jQuery("body").hasClass("mobile-menu-visible")||b.jQuery("#menu-icon span").click()},1E3)},1E3)):c("#customize-footer-actions .preview-desktop").click()}).on("click","#customize-footer-actions button",function(){c(this).hasClass("preview-desktop")||c("#customize-control-start_mobile_menu_acc_ctrl.topen .themify-suba-toggle").click()})})(wp,jQuery);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка