r50504 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50503‎ | r50504 | r50505 >
Date:06:08, 12 May 2009
Author:thomasv
Status:ok
Tags:
Comment:
minor : adjusting height of textbox and margins
Modified paths:
  • /trunk/extensions/ProofreadPage/proofread.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ProofreadPage/proofread.js
@@ -147,7 +147,7 @@
148148 +'<textarea name="headerTextbox" rows="2" cols="80">'+pageHeader+'</textarea>'
149149 +'<br/>'+proofreadPageMessagePageBody+'<br/></div>'
150150 +'<textarea name="wpTextbox1" id="wpTextbox1" rows="40" cols="80">'+pageBody+'</textarea>'
151 - +'<div id="prp_footer" style="display:none"><br/>'+proofreadPageMessageFooter+'<br/>'
 151+ +'<div id="prp_footer" style="display:none">'+proofreadPageMessageFooter+'<br/>'
152152 +'<textarea name="footerTextbox" rows="2" cols="80">'+pageFooter+'</textarea></div>';
153153
154154
@@ -174,11 +174,12 @@
175175 if( h.style.cssText == ''){
176176 h.style.cssText = 'display:none';
177177 f.style.cssText = 'display:none';
178 - if(self.DisplayHeight) box.style.cssText = "height:"+(self.DisplayHeight-7)+"px";
 178+ box.style.cssText = "height:"+(self.DisplayHeight-7)+"px";
179179 } else {
180180 h.style.cssText = '';
181181 f.style.cssText = '';
182 - if(self.DisplayHeight) box.style.cssText = "height:"+(self.DisplayHeight-190)+"px";
 182+ if(!self.pr_horiz) box.style.cssText = "height:"+(self.DisplayHeight-169)+"px";
 183+ else box.style.cssText = "height:"+(self.DisplayHeight-7)+"px";
183184 }
184185 }
185186
@@ -331,18 +332,18 @@
332333 zoomamount_h = zp_clip.height/objh;
333334 zoomamount_w = zp_clip.width/objw;
334335
335 - zp_container.style.margin = '0px 0px 0px 0px';
336336 zp_container.style.width = objw+'px';
337337 zp_container.style.height = objh+'px';
 338+ zp_clip.style.margin = ((lastyy > objh )?(objh*(1-zoomamount_h)):(lastyy*(1-zoomamount_h))) + 'px 0px 0px '
 339+ + ((lastxx > objw )?(objw*(1-zoomamount_w)):(lastxx*(1-zoomamount_w))) + 'px';
338340
339 - zoom_move('');
340341 return false;
341342 }
342343
343344
344345 //zoom using two images (magnification glass)
345 -function proofreadPageZoom(){
346 -
 346+function pr_initzoom(){
 347+ if(proofreadPageIsEdit) return;
347348 if(!self.proofreadPageViewURL) return;
348349 if(self.DisplayWidth>800) return;
349350
@@ -602,7 +603,7 @@
603604 }
604605 image_container.innerHTML = "<img id=\"ProofReadImage\" src=\""+proofreadPageViewURL+"\" width=\""+img_w+"\" />";
605606 image_container.style.cssText = self.container_css;
606 - document.getElementById("wpTextbox1").style.cssText = "height:"+self.DisplayHeight+"px";
 607+ document.getElementById("wpTextbox1").style.cssText = "height:"+(self.DisplayHeight-7)+"px";
607608 pr_zoom(0);
608609 }
609610
@@ -655,7 +656,9 @@
656657 pr_make_edit_area(self.text_container,new_text.value);
657658 var copywarn = document.getElementById("editpage-copywarn");
658659 f.insertBefore(table,copywarn);
659 -
 660+ if (self.proofreadpage_show_headers){
 661+ pr_toggle_visibility();
 662+ }
660663 }
661664 else {
662665 self.text_container.appendChild(new_text);
@@ -810,17 +813,6 @@
811814 addOnloadHook(pr_init_tabs);
812815
813816
814 -function pr_initzoom(){
815 - if(document.getElementById("wpTextbox1")){
816 - if(self.pr_horiz)
817 - document.getElementById("wpTextbox1").style.cssText = "height:"+self.DisplayHeight+"px";
818 - else
819 - document.getElementById("wpTextbox1").style.cssText = "height:"+self.DisplayHeight+"px";
820 - pr_zoom(0);
821 - }
822 - else proofreadPageZoom();
823 -
824 -}
825817 hookEvent("load", pr_initzoom );
826818
827819

Status & tagging log