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:
parent
ad278c17e0
commit
f2d874e3db
|
@ -1475,11 +1475,13 @@ themes.view.Installer = themes.view.Appearance.extend({
|
||||||
searchContainer: $( '.theme-navigation' ),
|
searchContainer: $( '.theme-navigation' ),
|
||||||
|
|
||||||
uploader: function() {
|
uploader: function() {
|
||||||
$( 'a.upload' ).on( 'click', function() {
|
$( 'a.upload' ).on( 'click', function( event ) {
|
||||||
|
event.preventDefault();
|
||||||
$( 'body' ).addClass( 'show-upload-theme' );
|
$( 'body' ).addClass( 'show-upload-theme' );
|
||||||
themes.router.navigate( themes.router.baseUrl( '?upload' ), { replace: true } );
|
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' );
|
$( 'body' ).removeClass( 'show-upload-theme' );
|
||||||
themes.router.navigate( themes.router.baseUrl( '' ), { replace: true } );
|
themes.router.navigate( themes.router.baseUrl( '' ), { replace: true } );
|
||||||
});
|
});
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue