r61906 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61905‎ | r61906 | r61907 >
Date:05:25, 3 February 2010
Author:werdna
Status:ok
Tags:
Comment:
LiquidThreads: Fix issue where clicking "Change Subject" repeatedly would cause multiple subject-editing forms by hiding the link when the form is open
Modified paths:
  • /trunk/extensions/LiquidThreads/lqt.js (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/lqt.js
@@ -392,6 +392,8 @@
393393
394394 'handleChangeSubject' : function(e) {
395395 e.preventDefault();
 396+
 397+ $j(this).closest('.lqt-command-edit-subject').hide();
396398
397399 // Grab the h2
398400 var threadId = $j(this).data('thread-id');
@@ -414,6 +416,7 @@
415417 var form = $j(this).closest('.mw-subject-editor');
416418 var header = form.closest('.lqt_header');
417419 header.contents().filter('.mw-headline').show();
 420+ header.next().find('.lqt-command-edit-subject').show();
418421 form.remove();
419422
420423 } );
@@ -476,6 +479,7 @@
477480 subjectForm.remove();
478481 spinner.remove();
479482 header.contents().filter('.mw-headline').show();
 483+ header.next().find('.lqt-command-edit-subject').show();
480484 }
481485 }
482486
@@ -491,6 +495,8 @@
492496
493497 if ( result == 'success' ) {
494498 spinner.remove();
 499+ header.next().find('.lqt-command-edit-subject').show();
 500+
495501 var thread = $j('#lqt_thread_id_'+threadId);
496502 liquidThreads.doReloadThread( thread );
497503 } else {

Status & tagging log