Revert r26593 so Available and Inactive widgets are once again collapsible. Make the arrows only appear on hover when uncollapsed. Fixes #26327, props nacin.

git-svn-id: https://develop.svn.wordpress.org/trunk@26608 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Thomas 2013-12-04 16:30:05 +00:00
parent d4a2c7d2a0
commit 71588c2933
3 changed files with 13 additions and 10 deletions

View File

@ -10487,6 +10487,15 @@ h3.tb {
text-decoration: none !important;
}
.js #widgets-left .sidebar-name .sidebar-name-arrow {
display: none;
}
.js #widgets-left .widgets-holder-wrap.closed .sidebar-name .sidebar-name-arrow,
.js #widgets-left .sidebar-name:hover .sidebar-name-arrow {
display: block;
}
/* Show the arrow only on hover */
.js .sidebar-name .sidebar-name-arrow:before,
.js .meta-box-sortables .postbox .handlediv:before {

View File

@ -71,21 +71,14 @@ function wp_list_widget_controls( $sidebar, $sidebar_name = '' ) {
$description = wp_sidebar_description( $sidebar );
echo '<div id="' . esc_attr( $sidebar ) . '" class="widgets-sortables">';
if ( $sidebar_name ) {
if( 'Inactive Widgets' != $sidebar_name ) {
?>
<div class="sidebar-name">
<div class="sidebar-name-arrow"><br /></div>
<h3><?php echo esc_html( $sidebar_name ); ?> <span class="spinner"></span></h3>
</div>
<?php
} else {
?>
<div>
<h3><?php echo esc_html( $sidebar_name ); ?> <span class="spinner"></span></h3>
</div>
<?php
}
}
echo '<div class="sidebar-description">';

View File

@ -329,7 +329,8 @@ do_action( 'widgets_admin_page' ); ?>
<div class="widget-liquid-left">
<div id="widgets-left">
<div id="available-widgets" class="widgets-holder-wrap">
<div>
<div class="sidebar-name">
<div class="sidebar-name-arrow"><br /></div>
<h3><?php _e('Available Widgets'); ?> <span id="removing-widget"><?php _ex('Deactivate', 'removing-widget'); ?> <span></span></span></h3>
</div>
<div class="widget-holder">
@ -349,7 +350,7 @@ do_action( 'widgets_admin_page' ); ?>
$theme_sidebars = array();
foreach ( $wp_registered_sidebars as $sidebar => $registered_sidebar ) {
if ( false !== strpos( $registered_sidebar['class'], 'inactive-sidebar' ) || 'orphaned_widgets' == substr( $sidebar, 0, 16 ) ) {
$wrap_class = ( $registered_sidebar['id'] == 'wp_inactive_widgets' ) ? '' : 'widgets-holder-wrap';
$wrap_class = 'widgets-holder-wrap';
if ( !empty( $registered_sidebar['class'] ) )
$wrap_class .= ' ' . $registered_sidebar['class'];