X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.special%2Fmediawiki.special.upload.js;h=8c89ed97d8b0dc91cec8dbf715b8c04f94177285;hb=b5906606e1aa1a795231fb813b766818b1dd6c25;hp=c6ae5ac726a3817bfb5b50050f2f4abb749c2469;hpb=b2c0705b819f5da7a7c07919a76b05fc31b01c34;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js b/resources/src/mediawiki.special/mediawiki.special.upload.js index c6ae5ac726..8c89ed97d8 100644 --- a/resources/src/mediawiki.special/mediawiki.special.upload.js +++ b/resources/src/mediawiki.special/mediawiki.special.upload.js @@ -68,7 +68,7 @@ titles: ( new mw.Title( this.nameToCheck, mw.config.get( 'wgNamespaceIds' ).file ) ).getPrefixedText(), prop: 'imageinfo', iiprop: 'uploadwarning', - indexpageids: '' + indexpageids: true } ).done( function ( result ) { var resultOut = ''; if ( result.query ) { @@ -85,7 +85,9 @@ }, 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 @@ -119,7 +121,7 @@ text: '{{' + license + '}}', title: $( '#wpDestFile' ).val() || 'File:Sample.jpg', prop: 'text', - pst: '' + pst: true } ).done( function ( result ) { $spinnerLicense.remove(); uploadLicense.processResult( result, license ); @@ -426,7 +428,7 @@ 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 );