r68684 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68683‎ | r68684 | r68685 >
Date:21:37, 28 June 2010
Author:aaron
Status:ok
Tags:
Comment:
Added timer to review box collapse on mouseOut
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevsXML.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/client/flaggedrevs.js (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -290,7 +290,7 @@
291291 $wgAvailableRights[] = 'stablesettings';
292292
293293 # Bump this number every time you change flaggedrevs.css/flaggedrevs.js
294 -$wgFlaggedRevStyleVersion = 76;
 294+$wgFlaggedRevStyleVersion = 77;
295295
296296 $wgExtensionFunctions[] = 'efLoadFlaggedRevs';
297297
Index: trunk/extensions/FlaggedRevs/FlaggedRevsXML.php
@@ -323,7 +323,7 @@
324324 $encPath = htmlspecialchars( FlaggedRevs::styleUrlPath() . '/img' );
325325 $img = '<img id="mw-fr-revisiontoggle" class="fr-toggle-arrow"';
326326 $img .= " src=\"{$encPath}/arrow-down.png\" style=\"display:none;\"";
327 - $img .= ' onMouseOver="FlaggedRevs.showBoxDetails()"';
 327+ $img .= ' onMouseOver="FlaggedRevs.onBoxMouseOver()"';
328328 $img .= ' title="' . wfMsgHtml( 'revreview-toggle-title' ) . '"';
329329 $img .= ' alt="' . wfMsgHtml( 'revreview-toggle-show' ) . '" />';
330330 return $img;
Index: trunk/extensions/FlaggedRevs/client/flaggedrevs.js
@@ -13,6 +13,8 @@
1414 'toggleShow' : '(+)',
1515 'toggleHide' : '(-)'
1616 },
 17+ /* Dropdown collapse timer */
 18+ 'boxCollapseTimer': null,
1719 /* Hide rating/diff clutter */
1820 'enableShowhide': function() {
1921 // Rating detail box
@@ -76,11 +78,18 @@
7779 toggle.innerHTML = this.messages.toggleShow;
7880 }
7981 },
80 -
 82+
 83+ /* Expands flag info box details on mouseOver */
 84+ 'onBoxMouseOver': function( event ) {
 85+ window.clearTimeout( this.boxCollapseTimer );
 86+ this.boxCollapseTimer = null;
 87+ this.showBoxDetails();
 88+ },
 89+
8190 /* Hides flag info box details on mouseOut *except* for event bubbling */
8291 'onBoxMouseOut': function( event ) {
8392 if( !this.isMouseOutBubble( event, 'mw-fr-revisiontag' ) ) {
84 - this.hideBoxDetails();
 93+ this.boxCollapseTimer = window.setTimeout( this.hideBoxDetails, 150 );
8594 }
8695 },
8796

Status & tagging log