diff --git a/src/js/_enqueues/admin/postbox.js b/src/js/_enqueues/admin/postbox.js
index 9789518b65..2e3583a302 100644
|
a
|
b
|
|
| 41 | 41 | var $el = $( this ), |
| 42 | 42 | p = $el.parent( '.postbox' ), |
| 43 | 43 | id = p.attr( 'id' ), |
| 44 | | ariaExpandedValue; |
| | 44 | ariaExpandedValue, |
| | 45 | closestPostbox = $( this ).closest( '.postbox' ); |
| 45 | 46 | |
| 46 | 47 | if ( 'dashboard_browser_nag' === id ) { |
| 47 | 48 | return; |
| 48 | 49 | } |
| 49 | 50 | |
| | 51 | if ( $el.hasClass( 'handle-order-prev' ) ) { |
| | 52 | // The handle order prev button was clicked. |
| | 53 | closestPostbox.prev().before( closestPostbox ); |
| | 54 | postboxes.save_order( postboxes.page ); |
| | 55 | $el.focus(); |
| | 56 | return; |
| | 57 | } |
| | 58 | |
| | 59 | if ( $el.hasClass( 'handle-order-next' ) ) { |
| | 60 | // The handle order next button was clicked. |
| | 61 | closestPostbox.next().after( closestPostbox ); |
| | 62 | postboxes.save_order( postboxes.page ); |
| | 63 | $el.focus(); |
| | 64 | return; |
| | 65 | } |
| | 66 | |
| 50 | 67 | p.toggleClass( 'closed' ); |
| 51 | 68 | |
| 52 | 69 | ariaExpandedValue = ! p.hasClass( 'closed' ); |
| … |
… |
|
| 99 | 116 | * @return {void} |
| 100 | 117 | */ |
| 101 | 118 | add_postbox_toggles : function (page, args) { |
| 102 | | var $handles = $( '.postbox .hndle, .postbox .handlediv' ); |
| | 119 | var $handles = $( '.postbox .hndle, .postbox .handlediv, .postbox .handle-order-next, .postbox .handle-order-prev' ); |
| 103 | 120 | |
| 104 | 121 | this.page = page; |
| 105 | 122 | this.init( page, args ); |
| … |
… |
|
| 202 | 219 | */ |
| 203 | 220 | init : function(page, args) { |
| 204 | 221 | var isMobile = $( document.body ).hasClass( 'mobile' ), |
| 205 | | $handleButtons = $( '.postbox .handlediv' ); |
| | 222 | $handleButtons = $( '.postbox .ui-actions .handlediv' ); |
| 206 | 223 | |
| 207 | 224 | $.extend( this, args || {} ); |
| 208 | 225 | $('#wpbody-content').css('overflow','hidden'); |
diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css
index a8b8112b00..32e32accdb 100644
|
a
|
b
|
html.wp-toolbar { |
| 2057 | 2057 | font-weight: 400; |
| 2058 | 2058 | } |
| 2059 | 2059 | |
| | 2060 | .postbox .handle-order-prev, |
| | 2061 | .postbox .handle-order-next, |
| 2060 | 2062 | .postbox .handlediv { |
| 2061 | 2063 | display: none; |
| 2062 | 2064 | float: right; |
| … |
… |
html.wp-toolbar { |
| 2069 | 2071 | cursor: pointer; |
| 2070 | 2072 | } |
| 2071 | 2073 | |
| | 2074 | .postbox .handle-order-prev, |
| | 2075 | .postbox .handle-order-next, |
| 2072 | 2076 | .js .postbox .handlediv { |
| 2073 | | display: block; |
| | 2077 | display: inline-block; |
| 2074 | 2078 | } |
| 2075 | 2079 | |
| 2076 | 2080 | .sortable-placeholder { |
| … |
… |
img { |
| 3048 | 3052 | content: "\f140"; |
| 3049 | 3053 | } |
| 3050 | 3054 | |
| | 3055 | .js .postbox .handle-order-next .toggle-indicator:before { |
| | 3056 | content: "\f347"; |
| | 3057 | } |
| | 3058 | |
| | 3059 | .js .postbox .handle-order-prev .toggle-indicator:before { |
| | 3060 | content: "\f343"; |
| | 3061 | } |
| | 3062 | |
| | 3063 | .js .postbox .handle-order-next .toggle-indicator:before, |
| | 3064 | .js .postbox .handle-order-prev .toggle-indicator:before, |
| 3051 | 3065 | .js .postbox .handlediv .toggle-indicator:before { |
| 3052 | 3066 | margin-top: 4px; |
| 3053 | 3067 | width: 20px; |
| … |
… |
img { |
| 3055 | 3069 | text-indent: -1px; /* account for the dashicon alignment */ |
| 3056 | 3070 | } |
| 3057 | 3071 | |
| | 3072 | .rtl.js .postbox .handle-order-next .toggle-indicator:before, |
| | 3073 | .rtl.js .postbox .handle-order-prev .toggle-indicator:before, |
| 3058 | 3074 | .rtl.js .postbox .handlediv .toggle-indicator:before { |
| 3059 | 3075 | text-indent: 1px; /* account for the dashicon alignment */ |
| 3060 | 3076 | } |
| … |
… |
img { |
| 3065 | 3081 | color: #72777c; |
| 3066 | 3082 | } |
| 3067 | 3083 | |
| | 3084 | .js .postbox .handle-order-next:focus, |
| | 3085 | .js .postbox .handle-order-prev:focus, |
| 3068 | 3086 | .js .postbox .handlediv:focus { |
| 3069 | 3087 | box-shadow: none; |
| 3070 | 3088 | outline: none; |
| 3071 | 3089 | } |
| 3072 | 3090 | |
| | 3091 | .js .postbox .handle-order-next:focus .toggle-indicator:before, |
| | 3092 | .js .postbox .handle-order-prev:focus .toggle-indicator:before, |
| 3073 | 3093 | .js .postbox .handlediv:focus .toggle-indicator:before { |
| 3074 | 3094 | box-shadow: |
| 3075 | 3095 | 0 0 0 1px #5b9dd9, |
diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php
index 5e6838eab1..9257d803d3 100644
|
a
|
b
|
function do_meta_boxes( $screen, $context, $object ) { |
| 1315 | 1315 | ) . '</span>'; |
| 1316 | 1316 | echo '<span class="toggle-indicator" aria-hidden="true"></span>'; |
| 1317 | 1317 | echo '</button>'; |
| | 1318 | |
| | 1319 | echo '<button type="button" class="handle-order-next">'; |
| | 1320 | echo '<span class="screen-reader-text">' . sprintf( |
| | 1321 | /* translators: Meta box title. */ |
| | 1322 | __( 'Move %s panel to next position' ), |
| | 1323 | $widget_title |
| | 1324 | ) . '</span>'; |
| | 1325 | echo '<span class="toggle-indicator" aria-hidden="true"></span>'; |
| | 1326 | echo '</button>'; |
| | 1327 | |
| | 1328 | echo '<button type="button" class="handle-order-prev">'; |
| | 1329 | echo '<span class="screen-reader-text">' . sprintf( |
| | 1330 | /* translators: Meta box title. */ |
| | 1331 | __( 'Move %s panel to previous position' ), |
| | 1332 | $widget_title |
| | 1333 | ) . '</span>'; |
| | 1334 | echo '<span class="toggle-indicator" aria-hidden="true"></span>'; |
| | 1335 | echo '</button>'; |
| 1318 | 1336 | } |
| 1319 | 1337 | echo '<h2 class="hndle">'; |
| 1320 | 1338 | if ( 'dashboard_php_nag' === $box['id'] ) { |