if ( result.query ) {
resultOut = result.query.pages[ result.query.pageids[ 0 ] ].imageinfo[ 0 ];
}
- $spinnerDestCheck.remove();
uploadWarning.processResult( resultOut, uploadWarning.nameToCheck );
+ } ).always( function () {
+ $spinnerDestCheck.remove();
} );
},
},
setWarning: function ( warning ) {
- $( '#wpDestFile-warning' ).html( warning );
+ var $warning = $( $.parseHTML( warning ) );
+ mw.hook( 'wikipage.content' ).fire( $warning );
+ $( '#wpDestFile-warning' ).empty().append( $warning );
// Set a value in the form indicating that the warning is acknowledged and
// doesn't need to be redisplayed post-upload
prop: 'text',
pst: true
} ).done( function ( result ) {
- $spinnerLicense.remove();
uploadLicense.processResult( result, license );
+ } ).always( function () {
+ $spinnerLicense.remove();
} );
},
var reader = new FileReader();
if ( callbackBinary && 'readAsBinaryString' in reader ) {
// To fetch JPEG metadata we need a binary string; start there.
- // todo:
+ // TODO
reader.onload = function () {
callbackBinary( reader.result );