Theme Installer: Prevent default events for "Upload Theme" and "Browse" buttons.

see #27055.
Built from https://develop.svn.wordpress.org/trunk@28047


git-svn-id: http://core.svn.wordpress.org/trunk@27877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2014-04-08 12:35:18 +00:00
parent ad278c17e0
commit f2d874e3db
2 changed files with 5 additions and 3 deletions

View File

@ -1475,11 +1475,13 @@ themes.view.Installer = themes.view.Appearance.extend({
searchContainer: $( '.theme-navigation' ),
uploader: function() {
$( 'a.upload' ).on( 'click', function() {
$( 'a.upload' ).on( 'click', function( event ) {
event.preventDefault();
$( 'body' ).addClass( 'show-upload-theme' );
themes.router.navigate( themes.router.baseUrl( '?upload' ), { replace: true } );
});
$( 'a.browse-themes' ).on( 'click', function() {
$( 'a.browse-themes' ).on( 'click', function( event ) {
event.preventDefault();
$( 'body' ).removeClass( 'show-upload-theme' );
themes.router.navigate( themes.router.baseUrl( '' ), { replace: true } );
});

File diff suppressed because one or more lines are too long