Ticket #23120: 23120.8.diff
File 23120.8.diff, 2.0 KB (added by , 11 years ago) |
---|
-
Users/mepstein/Sites/elftest.dev/wp-admin/css/wp-admin.css
5938 5938 margin: 2px 5px 0; 5939 5939 } 5940 5940 5941 .spinner.success:before { 5942 font: normal 20px/1 'dashicons'; 5943 content: '\f147'; 5944 color: #e9ffe9; 5945 } 5946 5947 .spinner.error { 5948 font: normal 20px/1 'dashicons'; 5949 content: '\f335'; 5950 color: #ffe9e9; 5951 } 5952 5941 5953 .no-float { 5942 5954 float: none; 5943 5955 } -
Users/mepstein/Sites/elftest.dev/wp-admin/js/widgets.js
313 313 action: 'widgets-order', 314 314 savewidgets: $('#_wpnonce_widgets').val(), 315 315 sidebars: [] 316 } ;316 }, spinner; 317 317 318 318 if ( sidebarId ) { 319 $( '#' + sidebarId ).find('.spinner:first').css('display', 'inline-block');319 spinner = $( '#' + sidebarId ).find('.spinner:first').css('display', 'inline-block'); 320 320 } 321 321 322 322 $('div.widgets-sortables').each( function() { … … 326 326 }); 327 327 328 328 $.post( ajaxurl, data, function() { 329 $('.spinner').hide(); 329 if ( spinner ) { 330 spinner.addClass( 'success' ).css( 'opacity', 1 ).fadeOut( 'slow', function() { 331 spinner.removeClass( 'success' ); 332 }); 333 } 334 }) 335 .error( function() { 336 if ( spinner ) { 337 spinner.addClass( 'error' ).css( 'opacity', 1 ).fadeOut( 'slow', function() { 338 spinner.removeClass( 'error' ); 339 }); 340 } 330 341 }); 331 342 }, 332 343 … … 372 383 widget.remove(); 373 384 } 374 385 } else { 375 $('.spinner').hide(); 386 $('.spinner', widget).addClass('success').fadeOut('slow', function() { 387 $(this).removeClass('success'); 388 }); 376 389 if ( r && r.length > 2 ) { 377 390 $( 'div.widget-content', widget ).html(r); 378 391 wpWidgets.appendTitle( widget );