r79689 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79688‎ | r79689 | r79690 >
Date:23:48, 5 January 2011
Author:neilk
Status:deferred
Tags:
Comment:
Fixed layout issue with IE6, IE7 with buttons piling up after end of form.
Used position: relative to solve another IE7 issue (see http://snook.ca/archives/html_and_css/position_relative_overflow_ie/)
removed maskSafeHide and maskSafeShow functions as they are no longer used
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizard.js (modified) (history)
  • /trunk/extensions/UploadWizard/resources/uploadWizard.css (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/uploadWizard.css
@@ -348,8 +348,7 @@
349349 }
350350
351351 .mwe-upwiz-stepdiv {
352 - height: 0px;
353 - overflow: hidden;
 352+ position: relative;
354353 }
355354
356355
Index: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js
@@ -1751,9 +1751,9 @@
17521752 // this will break if we ever allow people to page back and forth.
17531753 } else {
17541754 if ( selectedStepName === stepName ) {
1755 - stepDiv.maskSafeShow();
 1755+ stepDiv.hide();
17561756 } else {
1757 - stepDiv.maskSafeHide( 1000 );
 1757+ stepDiv.show( 1000 );
17581758 }
17591759 }
17601760
@@ -2396,6 +2396,7 @@
23972397
23982398 };
23992399
 2400+ // n.b. this is not called currently -- all uses of mask() are permanent
24002401 jQuery.fn.unmask = function( options ) {
24012402
24022403 $j.each( this, function( i, el ) {
@@ -2412,35 +2413,6 @@
24132414 };
24142415
24152416
2416 - /**
2417 - * Safe hide and show
2418 - * Rather than use display: none, this collapses the divs to zero height
2419 - * This is good because then the elements in the divs still have layout and we can do things like mask and unmask (above)
2420 - * XXX may be obsolete as we are not really doing this any more
2421 - * disable form fields so we do not tab through them when hidden
2422 - * XXX for some reason the disabling doesn't work with the date field.
2423 - */
2424 -
2425 - jQuery.fn.maskSafeHide = function( options ) {
2426 - $j.each( this.find( ':enabled' ), function(i, input) {
2427 - $j( input ).data( 'wasEnabled', true )
2428 - .attr( 'disabled', 'disabled' );
2429 - } );
2430 - return this.css( { 'height' : '0px', 'overflow' : 'hidden' } );
2431 - };
2432 -
2433 - // may be causing scrollbar to appear when div changes size
2434 - // re-enable form fields (disabled so we did not tab through them when hidden)
2435 - jQuery.fn.maskSafeShow = function( options ) {
2436 - $j.each( this.find( ':disabled' ), function (i, input) {
2437 - if ($j( input ).data( 'wasEnabled' )) {
2438 - $j( input ).removeAttr( 'disabled' )
2439 - .removeData( 'wasEnabled' );
2440 - }
2441 - } );
2442 - return this.css( { 'height' : 'auto', 'overflow' : 'visible' } );
2443 - };
2444 -
24452417 $j.validator.setDefaults( {
24462418 debug: true,
24472419 errorClass: 'mwe-validator-error'

Status & tagging log