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. Built from https://develop.svn.wordpress.org/trunk@40556 git-svn-id: http://core.svn.wordpress.org/trunk@40425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d3c74e8ce9
commit
f1be128cde
|
@ -308,19 +308,21 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#dashboard_primary .widget-loading,
|
#dashboard_primary .widget-loading {
|
||||||
#dashboard_primary .dashboard-widget-control-form {
|
|
||||||
padding: 12px 12px 0;
|
padding: 12px 12px 0;
|
||||||
|
margin-bottom: 1em !important; /* Needs to override `.postbox .inside > p:last-child` in common.css */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Notice when JS is off. */
|
||||||
|
#dashboard_primary .inside .notice {
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
body #dashboard-widgets .postbox form .submit {
|
body #dashboard-widgets .postbox form .submit {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-widget-control-form {
|
/* Used only for configurable widgets. */
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-widget-control-form p {
|
.dashboard-widget-control-form p {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -308,19 +308,21 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#dashboard_primary .widget-loading,
|
#dashboard_primary .widget-loading {
|
||||||
#dashboard_primary .dashboard-widget-control-form {
|
|
||||||
padding: 12px 12px 0;
|
padding: 12px 12px 0;
|
||||||
|
margin-bottom: 1em !important; /* Needs to override `.postbox .inside > p:last-child` in common.css */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Notice when JS is off. */
|
||||||
|
#dashboard_primary .inside .notice {
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
body #dashboard-widgets .postbox form .submit {
|
body #dashboard-widgets .postbox form .submit {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-widget-control-form {
|
/* Used only for configurable widgets. */
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-widget-control-form p {
|
.dashboard-widget-control-form p {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -191,7 +191,7 @@ function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_
|
||||||
* @param array $meta_box
|
* @param array $meta_box
|
||||||
*/
|
*/
|
||||||
function _wp_dashboard_control_callback( $dashboard, $meta_box ) {
|
function _wp_dashboard_control_callback( $dashboard, $meta_box ) {
|
||||||
echo '<form method="post" class="dashboard-widget-control-form">';
|
echo '<form method="post" class="dashboard-widget-control-form wp-clearfix">';
|
||||||
wp_dashboard_trigger_widget_control( $meta_box['id'] );
|
wp_dashboard_trigger_widget_control( $meta_box['id'] );
|
||||||
wp_nonce_field( 'edit-dashboard-widget_' . $meta_box['id'], 'dashboard-widget-nonce' );
|
wp_nonce_field( 'edit-dashboard-widget_' . $meta_box['id'], 'dashboard-widget-nonce' );
|
||||||
echo '<input type="hidden" name="widget_id" value="' . esc_attr($meta_box['id']) . '" />';
|
echo '<input type="hidden" name="widget_id" value="' . esc_attr($meta_box['id']) . '" />';
|
||||||
|
@ -968,7 +968,7 @@ function wp_dashboard_rss_output( $widget_id ) {
|
||||||
* @return bool False on failure. True on success.
|
* @return bool False on failure. True on success.
|
||||||
*/
|
*/
|
||||||
function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = array() ) {
|
function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = array() ) {
|
||||||
$loading = '<p class="widget-loading hide-if-no-js">' . __( 'Loading…' ) . '</p><p class="hide-if-js">' . __( 'This widget requires JavaScript.' ) . '</p>';
|
$loading = '<p class="widget-loading hide-if-no-js">' . __( 'Loading…' ) . '</p><div class="hide-if-js notice notice-error inline"><p>' . __( 'This widget requires JavaScript.' ) . '</p></div>';
|
||||||
$doing_ajax = wp_doing_ajax();
|
$doing_ajax = wp_doing_ajax();
|
||||||
|
|
||||||
if ( empty($check_urls) ) {
|
if ( empty($check_urls) ) {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.8-alpha-40555';
|
$wp_version = '4.8-alpha-40556';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue