r60041 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60040‎ | r60041 | r60042 >
Date:19:25, 14 December 2009
Author:tparscal
Status:ok (Comments)
Tags:
Comment:
Removed now unneeded TOC UI updating code from Toolbar code. The resize event is now being used to keep all UI elements sized properly.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js
@@ -484,23 +484,19 @@
485485 if ( show ) {
486486 $section.fadeIn( 'fast' );
487487 dH = $section.outerHeight() - dH;
488 - if ( 'toc' in context.modules ) {
489 - context.modules.toc.$toc.animate({'height': "+="+dH}, $section.outerHeight() * 2);
490 - }
491 - $sections.animate( { 'height': $section.outerHeight() }, $section.outerHeight() * 2, function() {
492 - $(this).css('overflow', 'visible').css('height', 'auto');
493 - context.fn.trigger( 'resize' );
494 - } );
 488+ $sections
 489+ .animate( { 'height': $section.outerHeight() }, $section.outerHeight() * 2, function() {
 490+ $(this).css( 'overflow', 'visible' ).css( 'height', 'auto' );
 491+ context.fn.trigger( 'resize' );
 492+ } );
495493 $(this).addClass( 'current' );
496494 } else {
497 - $sections.css('height', $section.outerHeight() )
498 - .animate( { 'height': 0 }, $section.outerHeight() * 2, function() {
499 - $(this).css('overflow', 'visible');
 495+ $sections
 496+ .css( 'height', $section.outerHeight() )
 497+ .animate( { 'height': 'hide' }, $section.outerHeight() * 2, function() {
 498+ $(this).css( 'overflow', 'visible' );
500499 context.fn.trigger( 'resize' );
501500 } );
502 - if ( 'toc' in context.modules ) {
503 - context.modules.toc.$toc.animate({'height': "-="+$section.outerHeight()}, $section.outerHeight() * 2);
504 - }
505501 }
506502 // Click tracking
507503 if($.trackAction != undefined){
@@ -601,12 +597,7 @@
602598 var $section = s.$sections.find( '.section:visible' );
603599 if ( $section.size() ) {
604600 $sections.animate( { 'height': $section.outerHeight() }, $section.outerHeight() * 2, function( ) {
605 - if ( 'toc' in context.modules ) {
606 - context.modules.toc.$toc.height(
607 - context.$ui.find( '.wikiEditor-ui-left' )
608 - .outerHeight() - context.$ui.find( '.tab-toc' ).outerHeight()
609 - )
610 - }
 601+ context.fn.trigger( 'resize' );
611602 } );
612603 }
613604 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r60042Combined, minified and version bumped for r60041.tparscal20:04, 14 December 2009

Comments

#Comment by Catrope (talk | contribs)   20:02, 14 December 2009

Style versions and recombine?

Status & tagging log