Index: wp-admin/js/theme.js =================================================================== --- wp-admin/js/theme.js (revision 27620) +++ wp-admin/js/theme.js (working copy) @@ -1153,11 +1153,14 @@ searchContainer: $( '.theme-navigation' ), uploader: function() { - $( 'a.upload.button' ).on( 'click', function() { - $( '.upload-theme' ) - .toggleClass( 'opened' ) - .hasClass( 'opened' ) ? $( this ).text( l10n.back ) : $( this ).text( l10n.upload ); + $( 'a.upload' ).on( 'click', function() { + $( 'body' ).addClass( 'show-upload-theme' ); + themes.router.navigate( themes.router.baseUrl( '?upload' ), { replace: true } ); }); + $( 'a.browse-themes' ).on( 'click', function() { + $( 'body' ).removeClass( 'show-upload-theme' ); + themes.router.navigate( themes.router.baseUrl( '' ), { replace: true } ); + }); }, moreFilters: function() { @@ -1168,7 +1171,8 @@ themes.InstallerRouter = Backbone.Router.extend({ routes: { 'theme-install.php?theme=:slug': 'preview', - 'theme-install.php(?sort=:sort)': 'sort', + 'theme-install.php?sort=:sort': 'sort', + 'theme-install.php?upload': 'upload', '': 'sort' }, @@ -1225,6 +1229,10 @@ self.view.trigger( 'theme:close' ); }); + themes.router.on( 'route:upload', function( slug ) { + $( 'a.upload' ).trigger( 'click' ); + }); + this.extraRoutes(); }, Index: wp-admin/css/themes.css =================================================================== --- wp-admin/css/themes.css (revision 27620) +++ wp-admin/css/themes.css (working copy) @@ -1065,9 +1065,6 @@ 16.2 - Install Themes ------------------------------------------------------------------------------*/ -.theme-install-php h2 .upload { - margin-left: 10px; -} .theme-navigation { background: #fff; box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); @@ -1081,6 +1078,17 @@ position: relative; width: 100%; } +.theme-install-php a.upload, +.theme-install-php a.browse-themes { + cursor: pointer; +} +.theme-install-php a.browse-themes, +.theme-install-php.show-upload-theme a.upload { + display: none; +} +.theme-install-php.show-upload-theme a.browse-themes { + display: inline; +} .upload-theme { -moz-box-sizing: border-box; box-sizing: border-box; @@ -1092,7 +1100,7 @@ position: relative; top: 10px; } -.upload-theme.opened { +body.show-upload-theme .upload-theme { display: block; } .upload-theme .wp-upload-form { @@ -1110,8 +1118,8 @@ padding: 40px 0 0; text-align: center; } -.upload-theme.opened + .theme-navigation, -.upload-theme.opened + .theme-navigation + .theme-browser { +body.show-upload-theme .upload-theme + .theme-navigation, +body.show-upload-theme .upload-theme + .theme-navigation + .theme-browser { display: none; } .theme-navigation .theme-count { @@ -1201,6 +1209,26 @@ display: none !important; } +@media only screen and (max-width: 1120px) { + .theme-install-php .theme-search { + margin: 20px 0; + position: static; + width: 100%; + } + .more-filters-container { + border-bottom: 1px solid #eee; + } + .upload-theme .wp-upload-form { + margin: 20px 0; + max-width: 100%; + } + .upload-theme .install-help { + font-size: 15px; + padding: 20px 0 0; + text-align: left; + } +} + .rating { margin: 30px 0; } Index: wp-admin/theme-install.php =================================================================== --- wp-admin/theme-install.php (revision 27620) +++ wp-admin/theme-install.php (working copy) @@ -104,7 +104,8 @@