From: Andrew Garrett
Date: Fri, 19 Feb 2010 20:40:11 +0000 (+0000)
Subject: Fix errors in Live Preview caused by extensions using document.write()
X-Git-Tag: 1.31.0-rc.0~37693
X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=d366019aebec0e4ea798cafebb6deb02516e3c11;p=lhc%2Fweb%2Fwiklou.git
Fix errors in Live Preview caused by extensions using document.write()
---
diff --git a/skins/common/preview.js b/skins/common/preview.js
index 44769033f4..db5633d0dd 100644
--- a/skins/common/preview.js
+++ b/skins/common/preview.js
@@ -16,15 +16,16 @@ function doLivePreview( e ) {
// Hide active diff, used templates, old preview if shown
var copyElements = ['#wikiPreview', '.templatesUsed', '.hiddencats',
'#catlinks'];
+ var copySelector = copyElements.join(',');
- $j.each( copyElements, function(k,v) { $j(v).fadeOut(); } );
+ $j.each( copyElements, function(k,v) { $j(v).fadeOut('fast'); } );
// Display a loading graphic
var loadSpinner = $j('');
$j('#wikiPreview').before( loadSpinner );
- var page = $j('');
- page.load( wgScript+'?action=submit',
+ var page = $j('
');
+ page.load( wgScript+'?action=submit '+copySelector,
postData,
function() {