WordPress.org

Make WordPress Core

Changeset 40556


Ignore:
Timestamp:
04/25/2017 04:41:26 PM (2 years ago)
Author:
afercia
Message:

Widgets: Improve the News dashboard widget no-js notice.

In the rare case this notice was displayed, it was unstyled. Uses the notice
error style to make it prettier and consistent with other no-js notices.
Also, some CSS clean-up.

Fixes #40529.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/dashboard.css

    r40052 r40556  
    309309}
    310310
    311 #dashboard_primary .widget-loading,
    312 #dashboard_primary .dashboard-widget-control-form {
     311#dashboard_primary .widget-loading {
    313312    padding: 12px 12px 0;
     313    margin-bottom: 1em !important; /* Needs to override `.postbox .inside > p:last-child` in common.css */
     314}
     315
     316/* Notice when JS is off. */
     317#dashboard_primary .inside .notice {
     318    margin: 0;
    314319}
    315320
     
    318323}
    319324
    320 .dashboard-widget-control-form {
    321     overflow: hidden;
    322 }
    323 
     325/* Used only for configurable widgets. */
    324326.dashboard-widget-control-form p {
    325327    margin-top: 0;
  • trunk/src/wp-admin/includes/dashboard.php

    r40394 r40556  
    192192 */
    193193function _wp_dashboard_control_callback( $dashboard, $meta_box ) {
    194     echo '<form method="post" class="dashboard-widget-control-form">';
     194    echo '<form method="post" class="dashboard-widget-control-form wp-clearfix">';
    195195    wp_dashboard_trigger_widget_control( $meta_box['id'] );
    196196    wp_nonce_field( 'edit-dashboard-widget_' . $meta_box['id'], 'dashboard-widget-nonce' );
     
    969969 */
    970970function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = array() ) {
    971     $loading = '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><p class="hide-if-js">' . __( 'This widget requires JavaScript.' ) . '</p>';
     971    $loading = '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><div class="hide-if-js notice notice-error inline"><p>' . __( 'This widget requires JavaScript.' ) . '</p></div>';
    972972    $doing_ajax = wp_doing_ajax();
    973973
Note: See TracChangeset for help on using the changeset viewer.