r87473 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87472‎ | r87473 | r87474 >
Date:23:28, 4 May 2011
Author:tparscal
Status:ok
Tags:
Comment:
Added use of jquery.appear to prevent laoding rating data until the rating tool is made visible - which in most cases is not on load since it's at the bottom of the page. This depends on r87472.
Modified paths:
  • /trunk/extensions/ArticleFeedback/ArticleFeedback.hooks.php (modified) (history)
  • /trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedback/ArticleFeedback.hooks.php
@@ -87,6 +87,7 @@
8888 'parentheses',
8989 ),
9090 'dependencies' => array(
 91+ 'jquery.appear',
9192 'jquery.tipsy',
9293 'jquery.json',
9394 'jquery.localize',
Index: trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js
@@ -758,8 +758,10 @@
759759 if ( !showOptions ) {
760760 context.$ui.find( '.articleFeedback-options' ).hide();
761761 }
762 - // Show initial form and report values
763 - $.articleFeedback.fn.load.call( context );
 762+ // Show initial form and report values when the tool is visible
 763+ context.$ui.appear( function() {
 764+ $.articleFeedback.fn.load.call( context );
 765+ } );
764766 }
765767 }
766768 };

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r87472Added jquery.appear, which adds a new event which fires the first time someth...tparscal23:26, 4 May 2011

Status & tagging log