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

see #27055.

git-svn-id: https://develop.svn.wordpress.org/trunk@28047 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2014-04-08 12:34:10 +00:00
parent 82ac1009c4
commit b48bc8e7d3

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 } );
});