r105573 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105572‎ | r105573 | r105574 >
Date:19:10, 8 December 2011
Author:jeroendedauw
Status:reverted
Tags:
Comment:
Follow up to r105571;
Modified paths:
  • /trunk/extensions/Reviews/resources/reviews.display.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Reviews/resources/reviews.display.js
@@ -22,14 +22,22 @@
2323
2424 review.remove( function( success ) {
2525 if ( success ) {
26 - $this.closest( 'table' ).closest( 'tr' ).slideUp( 'slow', function() {
27 - $this.remove();
28 - } );
 26+ $tr = $this.closest( 'table' ).closest( 'tr' );
 27+
 28+ if ( $( '.reviews-pager-table > tr' ).length > 1 ) {
 29+ $tr.slideUp( 'slow', function() { $tr.remove(); } );
 30+ }
 31+ else {
 32+ $table = $tr.closest( 'table' );
 33+ $table.slideUp( 'slow', function() {
 34+ $table.remove();
 35+ $( '#reviewslist' ).remove();
 36+ } );
 37+ }
2938 }
3039 else {
3140 // TODO
3241 alert( 'The review could not be removed.' );
33 - $this.button( 'enable' );
3442 }
3543 } );
3644 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r105571adding deletion link to main uijeroendedauw18:59, 8 December 2011

Status & tagging log