fa15fe4754
git-svn-id: https://develop.svn.wordpress.org/trunk@20252 602fd350-edb4-49c9-b593-d223f7449a82
1 line
1.1 KiB
JavaScript
1 line
1.1 KiB
JavaScript
if(typeof wp==="undefined"){var wp={}}(function(a,b){var c={initialize:function(){this.body=b(document.body);this.element=b("#customize-container");this.base=b(".admin-url",this.element).val();this.element.on("click",".close-full-overlay",function(){c.close();return false});this.element.on("click",".collapse-sidebar",function(){c.element.toggleClass("collapsed");return false})},open:function(d){d.customize="on";this.iframe=b("<iframe />",{src:this.base+"?"+jQuery.param(d)}).appendTo(this.element);this.element.fadeIn(200,function(){c.body.addClass("customize-active full-overlay-active")})},close:function(){this.element.fadeOut(200,function(){c.iframe.remove();c.iframe=null;c.body.removeClass("customize-active full-overlay-active")})}};b(function(){c.initialize();b(".thickbox-preview").click(function(g){var d,f,e;g.preventDefault();g.stopImmediatePropagation();d=b(this).attr("href");f=d.match("template=([^&]*)")[1];e=d.match("stylesheet=([^&]*)")[1];c.open({template:f,stylesheet:e})}).filter(function(){return"Preview"==b(this).text()}).text("Customize")});a.CustomizeLoader=c})(wp,jQuery); |