File Editor
Directories:
.. (Back)
dev
Files:
customize-controls.min.js
customize-dependency.min.js
customize-preview.min.js
Create New File
Create
Edit File: customize-controls.min.js
!function(api,$){api.sectionConstructor["sinatra-info"]=api.Section.extend({attachEvents:function(){},isContextuallyActive:function(){return!0}}),api.sinatraCustomizerPreviewer={init:function(){var control;this.preview.bind("set-footer-widget",(function(data){(control=api.control("sidebars_widgets["+data+"]")).focus(),api.Widgets.availableWidgetsPanel.open(control)})),this.preview.bind("set-navigation-widget",(function(data){(control=api.control("nav_menu_locations["+data+"]")).focus()}))}};var sinatraOldPreviewer=api.Previewer;api.Previewer=sinatraOldPreviewer.extend({initialize:function(params,options){api.sinatraCustomizerPreviewer.preview=this,sinatraOldPreviewer.prototype.initialize.call(this,params,options)}}),_.each(sinatra_customizer_localized.preview_url_for_section,(function(url,id){url&&wp.customize.section(id,(function(section){section.expanded.bind((function(isExpanded){isExpanded&&wp.customize.previewer.previewUrl.set(url)}))}))})),$(document).ready((function($){var $tooltip,$icon_pos_l,$title_width;(api.sinatraCustomizerPreviewer.init(),$(".sinatra-control-responsive").each((function(){$(this).find(".control-responsive").first().addClass("active")})),$(".customize-control").on("click",".sinatra-responsive-switchers span",(function(event){var $this=$(this),$switcher_container=$this.closest(".sinatra-responsive-switchers"),$switcher_buttons=$switcher_container.find("li span"),$device=$(event.currentTarget).data("device"),$control=$(".sinatra-control-responsive"),$body=$(".wp-full-overlay"),$footer_devices=$(".wp-full-overlay-footer .devices");$switcher_container.hasClass("expanded")?$this.parent().is(":first-child")&&$this.hasClass("active")?($switcher_container.removeClass("expanded"),$this.removeClass("active")):($switcher_buttons.removeClass("active"),$this.addClass("active")):($switcher_container.addClass("expanded"),$this.addClass("active")),$control.find(".control-responsive").removeClass("active"),$control.find(".control-responsive."+$device).addClass("active"),$control.removeClass("control-device-desktop control-device-tablet control-device-mobile").addClass("control-device-"+$device),$body.removeClass("preview-desktop preview-tablet preview-mobile").addClass("preview-"+$device),$footer_devices.find("button").removeClass("active").attr("aria-pressed",!1),$footer_devices.find("button.preview-"+$device).addClass("active").attr("aria-pressed",!0)})),$(".wp-full-overlay-footer .devices button").on("click",(function(event){$(this);var $devices=$(".customize-control .sinatra-responsive-switchers"),$device=$(event.currentTarget).data("device"),$control=$(".sinatra-control-responsive");$devices.find("span").removeClass("active"),$devices.find("span.preview-"+$device).addClass("active"),"desktop"===$device?$devices.removeClass("expanded"):$devices.addClass("expanded"),$control.find(".control-responsive").removeClass("active"),$control.find(".control-responsive."+$device).addClass("active"),$control.removeClass("control-device-desktop control-device-tablet control-device-mobile").addClass("control-device-"+$device)})),$(".sinatra-tooltip").length)&&$(".sinatra-tooltip").each((function(){($tooltip=$(this)).hasClass("top-right-tooltip")||$tooltip.hasClass("small-tooltip")||($title_width=$tooltip.closest(".sinatra-control-wrapper").outerWidth(),($icon_pos_l=$tooltip.closest(".sinatra-info-icon").css("position","static").position().left)<$title_width-$icon_pos_l?($tooltip[0].style.setProperty("--tooltip-left",Math.min(104,$icon_pos_l)+"px"),$tooltip.css("left",Math.max(0,$icon_pos_l-104))):($tooltip.css("left",Math.min($icon_pos_l-90,$title_width-208)),$icon_pos_l<$title_width-104?$tooltip[0].style.setProperty("--tooltip-left","90px"):$tooltip[0].style.setProperty("--tooltip-left",$icon_pos_l-178+"px")))}))}))}(wp.customize,jQuery);
Save Changes
Rename File
Rename