From 284359ccf0dc9467c065ea0729f42a8cc94560cd Mon Sep 17 00:00:00 2001 From: Michael Dale Date: Mon, 19 Oct 2009 23:50:42 +0000 Subject: [PATCH] * fixed js2 fileexist checking related to rewrite of special upload page in r57868 --- .../libAddMedia/mvBaseUploadInterface.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js b/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js index 75658a6680..5839c90d63 100644 --- a/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js +++ b/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js @@ -728,7 +728,11 @@ mvBaseUploadInterface.prototype = { //set up option defaults; if(!opt.warn_target) opt.warn_target = '#wpDestFile-warning'; - + + //add the wpDestFile-warning target: + if( $j( '#wpDestFile-warning' ).length == 0 ) + $j('#mw-htmlform-options tr:last').after(''); + //empty target warn: $j( opt.warn_target ).empty(); @@ -743,7 +747,7 @@ mvBaseUploadInterface.prototype = { 'iiprop':'url|mime|size', 'iiurlwidth': 150 } - },function(data){ + },function(data){ //remove spinner: $j('#mw-spinner-wpDestFile').remove(); if(data && data.query && data.query.pages){ @@ -754,11 +758,8 @@ mvBaseUploadInterface.prototype = { if( data.query.pages[ page_id ].imageinfo ) { var ntitle = ( data.query.normalized)? data.query.normalized[0].to : data.query.pages[ page_id ].title var img = data.query.pages[ page_id ].imageinfo[0]; - $j('#wpDestFile-warning').html( - '' + '' ); } } -- 2.20.1