Ticket #31233: 31233.14.diff
File 31233.14.diff, 4.4 KB (added by , 9 years ago) |
---|
-
src/wp-admin/css/common.css
1288 1288 padding: 2px; 1289 1289 } 1290 1290 1291 .notice-dismissible { 1292 padding-right: 38px; 1293 position: relative; 1294 } 1295 1296 .notice-dismissible button.close { 1297 position: absolute; 1298 right: 0; 1299 top: 0; 1300 border: none; 1301 margin: 2px; 1302 padding: 7px; 1303 background: none; 1304 color: #bbb; 1305 cursor: pointer; 1306 } 1307 1308 @-moz-document url-prefix() { 1309 .notice-dismissible button.close { 1310 right: 1px; 1311 top: 1px; 1312 } 1313 } 1314 1315 .notice-dismissible button.close:hover { 1316 color: #c00; 1317 } 1318 1319 .notice-dismissible button.close:focus { 1320 color: #c00; 1321 outline: 1px solid #5b9dd9; /* IE 8 and modern browsers */ 1322 box-shadow: 0 0 2px 1px rgba(30, 140, 190, .8); /* modern browsers */ 1323 } 1324 1325 .ie8 .dashicons-dismiss:before { 1326 display: block; 1327 } 1328 1291 1329 .notice-success, 1292 1330 div.updated { 1293 1331 border-color: #7ad03a; 1294 1332 } 1295 1333 1296 1334 .notice-warning { 1297 1335 border-color: #ffba00; 1298 1336 } 1299 1337 1300 1338 .notice-error, 1301 1339 div.error { 1302 1340 border-color: #dd3d36; 1303 1341 } 1304 1342 1305 1343 .notice-info { 1306 1344 border-color: #00a0d2; 1307 1345 } 1308 1346 1309 1347 .wrap .notice, … … 3129 3167 line-height: 175%; 3130 3168 } 3131 3169 3170 .notice-dismissible { 3171 padding-right: 46px; 3172 } 3173 3174 .notice-dismissible button.close { 3175 margin: 6px; 3176 } 3177 3132 3178 .wrap .icon32 + h2 { 3133 3179 margin-top: -2px; 3134 3180 } -
src/wp-admin/edit-form-advanced.php
410 410 <div id="notice" class="notice notice-warning"><p id="has-newer-autosave"><?php echo $notice ?></p></div> 411 411 <?php endif; ?> 412 412 <?php if ( $message ) : ?> 413 <div id="message" class="updated"><p><?php echo $message; ?></p></div> 413 <div id="message" class="updated notice-dismissible"> 414 <p><?php echo $message; ?></p> 415 <button type="button" class="close hide-if-no-js"> 416 <span class="dashicons dashicons-dismiss"> 417 <span class="screen-reader-text"></span> 418 </span> 419 </button> 420 </div> 414 421 <?php endif; ?> 415 422 <div id="lost-connection-notice" class="error hidden"> 416 423 <p><span class="spinner"></span> <?php _e( '<strong>Connection lost.</strong> Saving has been disabled until you’re reconnected.' ); ?> -
src/wp-admin/js/common.js
373 373 $firstHeading.nextAll( 'div.updated, div.error, div.notice' ).addClass( 'below-h2' ); 374 374 $( 'div.updated, div.error, div.notice' ).not( '.below-h2, .inline' ).insertAfter( $firstHeading ); 375 375 376 // Make notices dismissible 377 $( '.notice-dismissible' ).each( function() { 378 var $this = $( this ), 379 $button = $( 'button.close', $this ), 380 btnText = commonL10n.dismiss || '', 381 append = false; 382 383 // Create the button markup if it has not been added 384 if ( $button.length === 0 ) { 385 $button = $( '<button type="button" class="close hide-if-no-js"><span class="dashicons dashicons-dismiss"><span class="screen-reader-text"></span></span></button>' ); 386 append = true; 387 } 388 389 // Ensure plain text 390 $button.find( '.screen-reader-text' ).text( btnText ); 391 392 // Only append if we need to 393 if ( append ) { 394 $this.append( $button ); 395 } 396 397 $button.on( 'click.wp-dismiss-notice', function( event ) { 398 event.preventDefault(); 399 $this.slideUp( 'fast' ); 400 }); 401 }); 402 376 403 // Init screen meta 377 404 screenMeta.init(); 378 405 -
src/wp-includes/script-loader.php
79 79 80 80 $scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), false, 1 ); 81 81 did_action( 'init' ) && $scripts->localize( 'common', 'commonL10n', array( 82 'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete.") 82 'warnDelete' => __( "You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete." ), 83 'dismiss' => __( 'Dismiss this notice.' ), 83 84 ) ); 84 85 85 86 $scripts->add( 'wp-a11y', "/wp-includes/js/wp-a11y$suffix.js", array( 'jquery' ), false, 1 );