CoreFiles by mySites.guru
customize-loader.dev.js59 lines, 1,445 bytes, from wordpress-3.4-beta1.zip
Raw History Compare with 3.3-beta4
md5
4a0b8e2123676cc8a5833a0673ad08c5
sha1
b64d845c4386dbb8177bb5b666f00bb5f5c7ff35
sha256
97c1219bf07e4ba6b5f2bd647829e31e7155cc19ff7e7151ac2abfc1f76a493a
if ( typeof wp === 'undefined' )
	var wp = {};

(function( exports, $ ){
	var Loader = {
		initialize: function() {
			this.body      = $( document.body );
			this.element   = $( '#customize-container' );
			this.base      = $( '.admin-url', this.element ).val();

			this.element.on( 'click', '.close-full-overlay', function() {
				Loader.close();
				return false;
			});

			this.element.on( 'click', '.collapse-sidebar', function() {
				Loader.element.toggleClass('collapsed');
				return false;
			});
		},
		open: function( params ) {
			params.customize = 'on';

			this.iframe = $( '<iframe />', {
				src: this.base + '?' + jQuery.param( params )
			}).appendTo( this.element );

			this.element.fadeIn( 200, function() {
				Loader.body.addClass( 'customize-active full-overlay-active' );
			});
		},
		close: function() {
			this.element.fadeOut( 200, function() {
				Loader.iframe.remove();
				Loader.iframe = null;
				Loader.body.removeClass( 'customize-active full-overlay-active' );
			});
		}
	};

	$( function() {
		Loader.initialize();

		$('#current-theme, #availablethemes').on( 'click', '.load-customize', function( event ) {
			var load = $(this);

			event.preventDefault();

			// Load the theme.
			Loader.open({
				template:   load.data('customizeTemplate'),
				stylesheet: load.data('customizeStylesheet')
			});
		});
	});

	// Expose the API to the world.
	exports.CustomizeLoader = Loader;
})( wp, jQuery );

No other release has this exact content. See every version of this file.