diff --git a/src/wp-admin/css/wp-admin.css b/src/wp-admin/css/wp-admin.css index 97983eb04d..fa94992043 100644 --- a/src/wp-admin/css/wp-admin.css +++ b/src/wp-admin/css/wp-admin.css @@ -10810,33 +10810,33 @@ li#wp-admin-bar-toggle-button { #menu-locations-wrap .widefat { width: 100%; } - } + @media only screen and (min-width: 1250px) { #widgets-left #available-widgets .widget { width: 49%; float: left; } - + #widgets-left #available-widgets .widget:nth-child(even) { float: right; } - #widgets-right .widgets-holder-wrap { - width: 48.5%; + #widgets-right .sidebars-column-1, + #widgets-right .sidebars-column-2 { float: left; - } - - #widgets-right .widgets-holder-wrap:nth-child(odd) { - clear: both; - } - - #widgets-right .widgets-holder-wrap:nth-child(even) { - float: right; + width: 49%; } - #widgets-right.single-sidebar .widgets-holder-wrap { + #widgets-right .sidebars-column-1 { + margin-right: 2%; + } + + #widgets-right.single-sidebar .sidebars-column-1, + #widgets-right.single-sidebar .sidebars-column-2 { + float: none; width: 100%; + margin: 0; } } diff --git a/src/wp-admin/js/widgets.js b/src/wp-admin/js/widgets.js index b4fb34c4ce..0273f2eafb 100644 --- a/src/wp-admin/js/widgets.js +++ b/src/wp-admin/js/widgets.js @@ -12,13 +12,14 @@ wpWidgets = { sidebars = $('div.widgets-sortables'), isRTL = !! ( 'undefined' !== typeof isRtl && isRtl ); - $('#widgets-right').children('.widgets-holder-wrap').children('.sidebar-name').click( function() { - var $this = $(this), parent = $this.parent(); - if ( parent.hasClass('closed') ) { - parent.removeClass('closed'); + $('#widgets-right .sidebar-name').click( function() { + var $this = $(this), wrap = $this.closest('.widgets-holder-wrap'); + + if ( wrap.hasClass('closed') ) { + wrap.removeClass('closed'); $this.siblings('.widgets-sortables').sortable('refresh'); } else { - parent.addClass('closed'); + wrap.addClass('closed'); } }); diff --git a/src/wp-admin/widgets.php b/src/wp-admin/widgets.php index 93c92c76c4..1385f9f957 100644 --- a/src/wp-admin/widgets.php +++ b/src/wp-admin/widgets.php @@ -345,27 +345,28 @@ do_action( 'widgets_admin_page' ); ?> $registered_sidebar ) { if ( false !== strpos( $registered_sidebar['class'], 'inactive-sidebar' ) || 'orphaned_widgets' == substr( $sidebar, 0, 16 ) ) { $wrap_class = 'widgets-holder-wrap'; if ( !empty( $registered_sidebar['class'] ) ) $wrap_class .= ' ' . $registered_sidebar['class']; -?> - + ?>