r57935 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57934‎ | r57935 | r57936 >
Date:23:50, 19 October 2009
Author:dale
Status:deferred
Tags:
Comment:
* fixed js2 fileexist checking related to rewrite of special upload page in r57868
Modified paths:
  • /trunk/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js (modified) (history)

Diff [purge]

Index: trunk/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js
@@ -728,7 +728,11 @@
729729 //set up option defaults;
730730 if(!opt.warn_target)
731731 opt.warn_target = '#wpDestFile-warning';
732 -
 732+
 733+ //add the wpDestFile-warning target:
 734+ if( $j( '#wpDestFile-warning' ).length == 0 )
 735+ $j('#mw-htmlform-options tr:last').after('<tr><td></td><td id="wpDestFile-warning"></td></tr>');
 736+
733737 //empty target warn:
734738 $j( opt.warn_target ).empty();
735739
@@ -743,7 +747,7 @@
744748 'iiprop':'url|mime|size',
745749 'iiurlwidth': 150
746750 }
747 - },function(data){
 751+ },function(data){
748752 //remove spinner:
749753 $j('#mw-spinner-wpDestFile').remove();
750754 if(data && data.query && data.query.pages){
@@ -754,11 +758,8 @@
755759 if( data.query.pages[ page_id ].imageinfo ) {
756760 var ntitle = ( data.query.normalized)? data.query.normalized[0].to : data.query.pages[ page_id ].title
757761 var img = data.query.pages[ page_id ].imageinfo[0];
758 - $j('#wpDestFile-warning').html(
759 - '<ul>' +
760 - '<li>'+
761 - gM('mwe-fileexists', ntitle) +
762 - '</li>'+
 762+ $j('#wpDestFile-warning').html(
 763+ gM('mwe-fileexists', ntitle) +
763764 '<div class="thumb tright">' +
764765 '<div style="width: ' + ( parseInt(img.thumbwidth)+2 ) + 'px;" class="thumbinner">' +
765766 '<a title="' + ntitle + '" class="image" href="' + img.descriptionurl + '">' +
@@ -776,8 +777,7 @@
777778 gM('mwe-fileexists-thumb') +
778779 '</div>' +
779780 '</div>'+
780 - '</div>' +
781 - '</ul>'
 781+ '</div>'
782782 );
783783 }
784784 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r57868Rewrote Special:Upload to allow easier extension. Mostly backwards compatible...btongminh19:41, 18 October 2009

Status & tagging log