Ticket #23120: 23120.14.diff
File 23120.14.diff, 3.0 KB (added by , 9 years ago) |
---|
-
wp-admin/css/widgets.css
37 37 user-select: none; 38 38 } 39 39 40 .widget-title h3:before, 41 .widget-title h4:before { 42 -moz-osx-font-smoothing: grayscale; 43 -webkit-font-smoothing: antialiased; 44 -webkit-transition: all 0.2s ease-in-out; 45 background-color: #84d24c; 46 color: #fff; 47 content: "\f147"; 48 display: inline-block; 49 filter: alpha(opacity=0); 50 font: normal 26px/1 dashicons; 51 margin: -23px 15px -23px -15px; 52 opacity: 0; 53 overflow: hidden; 54 padding-bottom: 15px; 55 padding-top: 15px; 56 speak: none; 57 text-align: center; 58 transition: all 0.2s ease-in-out; 59 vertical-align: middle; 60 width: 0; 61 } 62 63 .widget.success .widget-title h3:before, 64 .widget.success .widget-title h4:before { 65 filter: alpha(opacity=100); 66 opacity: 1; 67 width: 48px; 68 } 69 70 .widget.failure .spinner { 71 background: #a00; 72 filter: alpha(opacity=100); 73 float: left; 74 margin-right: 5px; 75 margin-top: 2px; 76 opacity: 1; 77 padding: 3px 3px 1px; 78 visibility: visible; 79 } 80 81 .widget.failure .spinner:before { 82 -moz-osx-font-smoothing: grayscale; 83 -webkit-font-smoothing: antialiased; 84 color: #fff; 85 content: "\f335"; 86 font: normal 20px/1 dashicons; 87 speak: none; 88 } 89 90 .widget.failure .feedback { 91 float: left; 92 line-height: 28px; 93 margin-right: 10px; 94 } 95 40 96 .widgets-holder-wrap .widget-inside { 41 97 border-top: none; 42 98 padding: 1px 15px 15px 15px; -
wp-admin/js/widgets.js
1 /*global ajaxurl, isRtl */1 /*global ajaxurl, isRtl, _wpWidgetSettings */ 2 2 var wpWidgets; 3 3 (function($) { 4 4 var $document = $( document ); … … 456 456 if ( order ) { 457 457 wpWidgets.saveOrder(); 458 458 } 459 }) 460 .done( function () { 461 widget.find( '.widget-title' ).trigger( 'click' ); 462 widget.addClass( 'success' ); 463 464 setTimeout( function() { 465 widget.removeClass( 'success' ); 466 }, 1000 ); 467 }) 468 .fail( function() { 469 var $element = $( '<div class="feedback">' + _wpWidgetSettings.saveFailed + '</div>' ); 470 471 widget.find( '.widget-control-actions .alignright' ).append($element); 472 widget.addClass( 'failure' ); 473 474 $( '.spinner', widget ).addClass( 'is-active' ); 475 476 setTimeout( function() { 477 $( '.spinner', widget ).removeClass( 'is-active' ); 478 $element.remove(); 479 480 widget.removeClass( 'failure' ); 481 }, 1000 ); 459 482 }); 460 483 }, 461 484 -
wp-admin/widgets.php
31 31 } else { 32 32 wp_enqueue_script('admin-widgets'); 33 33 34 if ( wp_is_mobile() ) 34 wp_localize_script( 'admin-widgets', '_wpWidgetSettings', array( 35 'saveFailed' => __( 'Save failed, try again' ) 36 ) ); 37 38 if ( wp_is_mobile() ) { 35 39 wp_enqueue_script( 'jquery-touch-punch' ); 40 } 36 41 } 37 42 38 43 /**