r78392 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78391‎ | r78392 | r78393 >
Date:17:21, 14 December 2010
Author:krinkle
Status:ok
Tags:
Comment:
* Removing wfSupportsAjax() call. We don't use legacy sajax_ anymore, jQuery takes care of this
* Thus also removing the dependency on mediawiki.legacy.ajax in mediawiki.action.watch.ajax
* Moving the show() call further down in jsMessage. Before this commit the box shows for a split second (empty) and then it suddenly grows with content. Now moved it down so that it comes into view, filled already. Also made it possible to bring back the slideDown effect without ugly flashes.
Modified paths:
  • /trunk/phase3/resources/Resources.php (modified) (history)
  • /trunk/phase3/resources/mediawiki.action/mediawiki.action.watch.ajax.js (modified) (history)
  • /trunk/phase3/resources/mediawiki.util/mediawiki.util.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki.action/mediawiki.action.watch.ajax.js
@@ -73,7 +73,7 @@
7474 $links.click( function( event ) {
7575 var $link = $( this );
7676
77 - if( wgAjaxWatch.supported === false || !mw.config.get( 'wgEnableWriteAPI' ) || !wfSupportsAjax() ) {
 77+ if( wgAjaxWatch.supported === false || !mw.config.get( 'wgEnableWriteAPI' ) ) {
7878 // Lazy initialization so we don't toss up
7979 // ActiveX warnings on initial page load
8080 // for IE 6 users with security settings.
Index: trunk/phase3/resources/mediawiki.util/mediawiki.util.js
@@ -346,7 +346,6 @@
347347 }
348348 }
349349
350 - $messageDiv.show();
351350 if ( className ) {
352351 $messageDiv.attr( 'class', 'mw-js-message-' + className );
353352 }
@@ -357,6 +356,8 @@
358357 } else {
359358 $messageDiv.html( message );
360359 }
 360+
 361+ $messageDiv.slideDown();
361362 return true;
362363 }
363364 }
Index: trunk/phase3/resources/Resources.php
@@ -342,7 +342,7 @@
343343 ),
344344 'mediawiki.action.watch.ajax' => array(
345345 'scripts' => 'resources/mediawiki.action/mediawiki.action.watch.ajax.js',
346 - 'dependencies' => array( 'mediawiki.util', 'mediawiki.legacy.ajax' ),
 346+ 'dependencies' => array( 'mediawiki.util' ),
347347 ),
348348 'mediawiki.special.preferences' => array(
349349 'scripts' => 'resources/mediawiki.special/mediawiki.special.preferences.js',

Status & tagging log