Theme Customizer: Begin integration into the install process. Combine previews, details, and install into a single workflow. see #19910.

git-svn-id: https://develop.svn.wordpress.org/trunk@20138 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith
2012-03-07 17:35:17 +00:00
parent f3c63b54c1
commit 6e93f773b4
5 changed files with 176 additions and 68 deletions
+37
View File
@@ -1,3 +1,40 @@
/*
* Theme Install
*
* Displays theme previews on theme install pages.
*/
jQuery( function($) {
var preview = $('#theme-installer'),
info = preview.find('.install-theme-info'),
panel = preview.find('.wp-full-overlay-main'),
body = $( document.body );
preview.on( 'click', '.close-full-overlay', function( event ) {
preview.fadeOut( 200, function() {
panel.empty();
body.removeClass('theme-installer-active full-overlay-active');
});
event.preventDefault();
});
preview.on( 'click', '.collapse-sidebar', function( event ) {
preview.toggleClass('collapsed');
event.preventDefault();
});
$('#availablethemes').on( 'click', '.available-theme', function( event ) {
var src;
info.html( $(this).find('.install-theme-info').html() );
src = info.find( '.theme-preview-url' ).val();
panel.html( '<iframe src="' + src + '" />');
preview.fadeIn( 200, function() {
body.addClass('theme-installer-active full-overlay-active');
});
event.preventDefault();
});
});
var ThemeViewer;
(function($){