r71154 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71153‎ | r71154 | r71155 >
Date:09:05, 16 August 2010
Author:thomasv
Status:ok
Tags:
Comment:
fix: do not rely on the order of evaluation of scripts
Modified paths:
  • /trunk/extensions/ProofreadPage/proofread.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ProofreadPage/proofread.js
@@ -1,10 +1,6 @@
22 // Author : ThomasV - License : GPL
33
44
5 -/* Default size of the high resolution image in edit mode */
6 -self.proofreadPageDefaultEditWidth = 1024;
7 -
8 -
95 function pr_init_tabs(){
106 var a = document.getElementById("p-namespaces");
117 if(!a) a = document.getElementById("p-cactions");
@@ -708,6 +704,7 @@
709705 } else {
710706 var w = parseInt(self.proofreadPageEditWidth);
711707 if( !w ) w = self.proofreadPageDefaultEditWidth;
 708+ if( !w ) w = 1024; /* Default size in edit mode */
712709 var view_url = pr_image_url( Math.min( w, self.proofreadPageWidth ) );
713710 //prevent the container from being resized once the image is downloaded.
714711 img_width = pr_horiz?0:parseInt(pr_width/2-70)-20;

Status & tagging log