r86026 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86025‎ | r86026 | r86027 >
Date:06:33, 14 April 2011
Author:neilk
Status:ok
Tags:
Comment:
fix bug 25999 - removing unsuccessful uploads should reset upload page
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizard.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js
@@ -1006,7 +1006,7 @@
10071007 function( upload ) {
10081008 upload.start();
10091009 },
1010 - function() {
 1010+ function() {
10111011 allowCloseWindow();
10121012 $j().notify( gM( 'mwe-upwiz-files-complete' ) );
10131013 _this.showFileNext();
@@ -1093,6 +1093,7 @@
10941094 // $j( '#mwe-upwiz-upload-ctrl' ).attr( 'disabled', 'disabled' );
10951095 $j( '#mwe-upwiz-upload-ctrl-container' ).hide();
10961096
 1097+
10971098 // remove the border from the filelist. We can't hide it or make it invisible since it contains the displaced
10981099 // file input element that becomes the "click here to add"
10991100 $j( '#mwe-upwiz-filelist' ).removeClass( 'mwe-upwiz-filled-filelist' );
@@ -1104,6 +1105,11 @@
11051106 $j( '#mwe-upwiz-add-file span' ).msg( 'mwe-upwiz-add-file-0' );
11061107 $j( '#mwe-upwiz-add-file-container' ).addClass('mwe-upwiz-add-files-0');
11071108 $j( '#mwe-upwiz-add-file-container' ).removeClass('mwe-upwiz-add-files-n');
 1109+
 1110+ // recovering from an earlier attempt to upload
 1111+ $j( '#mwe-upwiz-upload-ctrls' ).show();
 1112+ $j( '#mwe-upwiz-progress' ).hide();
 1113+ $j( '#mwe-upwiz-add-file' ).show();
11081114 }
11091115
11101116 // allow an "add another upload" button only if we aren't at max

Status & tagging log