Index: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js |
— | — | @@ -1772,14 +1772,9 @@ |
1773 | 1773 | |
1774 | 1774 | _this.currentStepName = selectedStepName; |
1775 | 1775 | |
1776 | | - if ( selectedStepName == 'file' ) { |
| 1776 | + if ( selectedStepName == 'file' && _this.uploads.length === 0 ) { |
1777 | 1777 | // add one upload field to start (this is the big one that asks you to upload something) |
1778 | 1778 | var upload = _this.newUpload(); |
1779 | | - // XXX using a timeout is lame, are there other options? |
1780 | | - // XXX Trevor suggests that using addClass() may queue stuff unnecessarily; use 'concrete' HTML |
1781 | | - setTimeout( function() { |
1782 | | - upload.ui.moveFileInputToCover( '#mwe-upwiz-add-file' ); |
1783 | | - }, 300 ); |
1784 | 1779 | } |
1785 | 1780 | |
1786 | 1781 | $j.each( _this.uploads, function(i, upload) { |
— | — | @@ -1807,6 +1802,9 @@ |
1808 | 1803 | var upload = new mw.UploadWizardUpload( _this.api, '#mwe-upwiz-filelist' ); |
1809 | 1804 | _this.uploadToAdd = upload; |
1810 | 1805 | |
| 1806 | + // we explicitly move the file input to cover the upload button |
| 1807 | + upload.ui.moveFileInputToCover( '#mwe-upwiz-add-file' ); |
| 1808 | + |
1811 | 1809 | // we bind to the ui div since unbind doesn't work for non-DOM objects |
1812 | 1810 | |
1813 | 1811 | $j( upload.ui.div ).bind( 'filenameAccepted', function(e) { _this.updateFileCounts(); e.stopPropagation(); } ); |
Index: trunk/extensions/UploadWizard/SpecialUploadWizard.php |
— | — | @@ -193,7 +193,7 @@ |
194 | 194 | . '<li id="mwe-upwiz-step-thanks"><div>' . wfMsg( 'mwe-upwiz-step-thanks' ) . '</div></li>' |
195 | 195 | . '</ul>' |
196 | 196 | |
197 | | - // the individual steps, all at once - hide until styled |
| 197 | + // the individual steps, all at once - hide until needed |
198 | 198 | . '<div id="mwe-upwiz-content">' |
199 | 199 | |
200 | 200 | . '<div class="mwe-upwiz-stepdiv" id="mwe-upwiz-stepdiv-tutorial" style="display:none;">' |