Index: trunk/extensions/ProofreadPage/proofread.js |
— | — | @@ -147,7 +147,7 @@ |
148 | 148 | +'<textarea name="headerTextbox" rows="2" cols="80">'+pageHeader+'</textarea>' |
149 | 149 | +'<br/>'+proofreadPageMessagePageBody+'<br/></div>' |
150 | 150 | +'<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/>' |
152 | 152 | +'<textarea name="footerTextbox" rows="2" cols="80">'+pageFooter+'</textarea></div>'; |
153 | 153 | |
154 | 154 | |
— | — | @@ -174,11 +174,12 @@ |
175 | 175 | if( h.style.cssText == ''){ |
176 | 176 | h.style.cssText = 'display:none'; |
177 | 177 | 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"; |
179 | 179 | } else { |
180 | 180 | h.style.cssText = ''; |
181 | 181 | 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"; |
183 | 184 | } |
184 | 185 | } |
185 | 186 | |
— | — | @@ -331,18 +332,18 @@ |
332 | 333 | zoomamount_h = zp_clip.height/objh; |
333 | 334 | zoomamount_w = zp_clip.width/objw; |
334 | 335 | |
335 | | - zp_container.style.margin = '0px 0px 0px 0px'; |
336 | 336 | zp_container.style.width = objw+'px'; |
337 | 337 | 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'; |
338 | 340 | |
339 | | - zoom_move(''); |
340 | 341 | return false; |
341 | 342 | } |
342 | 343 | |
343 | 344 | |
344 | 345 | //zoom using two images (magnification glass) |
345 | | -function proofreadPageZoom(){ |
346 | | - |
| 346 | +function pr_initzoom(){ |
| 347 | + if(proofreadPageIsEdit) return; |
347 | 348 | if(!self.proofreadPageViewURL) return; |
348 | 349 | if(self.DisplayWidth>800) return; |
349 | 350 | |
— | — | @@ -602,7 +603,7 @@ |
603 | 604 | } |
604 | 605 | image_container.innerHTML = "<img id=\"ProofReadImage\" src=\""+proofreadPageViewURL+"\" width=\""+img_w+"\" />"; |
605 | 606 | 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"; |
607 | 608 | pr_zoom(0); |
608 | 609 | } |
609 | 610 | |
— | — | @@ -655,7 +656,9 @@ |
656 | 657 | pr_make_edit_area(self.text_container,new_text.value); |
657 | 658 | var copywarn = document.getElementById("editpage-copywarn"); |
658 | 659 | f.insertBefore(table,copywarn); |
659 | | - |
| 660 | + if (self.proofreadpage_show_headers){ |
| 661 | + pr_toggle_visibility(); |
| 662 | + } |
660 | 663 | } |
661 | 664 | else { |
662 | 665 | self.text_container.appendChild(new_text); |
— | — | @@ -810,17 +813,6 @@ |
811 | 814 | addOnloadHook(pr_init_tabs); |
812 | 815 | |
813 | 816 | |
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 | | -} |
825 | 817 | hookEvent("load", pr_initzoom ); |
826 | 818 | |
827 | 819 | |