Ticket #41894: 41894.patch
File 41894.patch, 1.1 KB (added by , 8 years ago) |
---|
-
widgets.js
283 283 wpWidgets.hoveredSidebar = null; 284 284 285 285 if ( $widget.hasClass('deleting') ) { 286 286 287 wpWidgets.save( $widget, 1, 0, 1 ); // delete widget 288 287 289 $widget.remove(); 288 290 return; 289 291 } … … 372 374 }, 373 375 drop: function(e,ui) { 374 376 ui.draggable.addClass('deleting'); 377 375 378 $('#removing-widget').hide().children('span').empty(); 376 379 }, 377 380 over: function(e,ui) { … … 516 519 if ( animate ) { 517 520 order = 0; 518 521 widget.slideUp('fast', function(){ 522 519 523 $(this).remove(); 524 $(this).removeClass('widget-dirty') 520 525 wpWidgets.saveOrder(); 526 delete self.dirtyWidgets[ id ] 521 527 }); 522 528 } else { 523 529 widget.remove(); 530 widget.removeClass( 'widget-dirty' ); 524 531 532 // Clear the dirty flag from the widget. 533 delete self.dirtyWidgets[ id ]; 534 525 535 if ( sidebarId === 'wp_inactive_widgets' ) { 526 536 $( '#inactive-widgets-control-remove' ).prop( 'disabled' , ! $( '#wp_inactive_widgets .widget' ).length ); 527 537 }