mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 02:10:45 +01:00
2c4438f379
git-svn-id: http://svn.automattic.com/wordpress/trunk@19997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 line
1.2 KiB
JavaScript
1 line
1.2 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.doc_title=b(document).attr("title");this.element.on("click",".return-to-admin",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.element.append("<iframe />");this.iframe=b("iframe").attr("src",this.base+"?"+jQuery.param(d));b("iframe").load(function(){title=b(this).contents().find("title").text();b(document).attr("title",title)});this.element.fadeIn(200,function(){c.body.addClass("customize-active")})},close:function(){this.element.fadeOut(200,function(){c.iframe.remove();c.iframe=null;c.body.removeClass("customize-active");b(document).attr("title",c.doc_title)})}};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); |