From f883e31e3cf649c0b8e61b5351ace75406c56961 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 5 Dec 2013 04:56:48 +0000 Subject: [PATCH] Themes: Disable collapse actions when showing only a single theme; improve the responsive layout. props matveb. fixes #25962. git-svn-id: https://develop.svn.wordpress.org/trunk@26660 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/wp-admin.css | 15 +++++++++++++++ src/wp-admin/js/theme.js | 5 +++++ 2 files changed, 20 insertions(+) diff --git a/src/wp-admin/css/wp-admin.css b/src/wp-admin/css/wp-admin.css index f331dcdfa4..01b922aec1 100644 --- a/src/wp-admin/css/wp-admin.css +++ b/src/wp-admin/css/wp-admin.css @@ -7162,6 +7162,9 @@ body.folded .theme-overlay .theme-wrap { .theme-overlay .theme-info { width: 50%; } + .single-theme .theme-wrap { + padding: 10px; + } } @media only screen and (max-width: 480px) { @@ -7241,6 +7244,18 @@ body.folded .theme-overlay .theme-wrap { text-indent: 0; margin-left: -40px; } + + .single-theme .theme-wrap { + margin: 0 -12px 0 -10px; + padding: 10px; + } + .single-theme .theme-overlay .theme-about { + padding: 10px; + overflow: visible; + } + .single-theme .current-label { + display: none; + } } .broken-themes { diff --git a/src/wp-admin/js/theme.js b/src/wp-admin/js/theme.js index d1e547a8bb..1e10a1c9c5 100644 --- a/src/wp-admin/js/theme.js +++ b/src/wp-admin/js/theme.js @@ -268,6 +268,11 @@ themes.view.Details = wp.Backbone.View.extend({ event = event || window.event; + // Prevent collapsing detailed view when there is only one theme available + if ( themes.data.themes.length === 1 ) { + return; + } + // Detect if the click is inside the overlay // and don't close it unless the target was // the div.back button