r60311 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60310‎ | r60311 | r60312 >
Date:10:55, 23 December 2009
Author:thomasv
Status:ok
Tags:
Comment:
show links if no toolbar available; container width tweak
Modified paths:
  • /trunk/extensions/ProofreadPage/proofread.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ProofreadPage/proofread.js
@@ -497,11 +497,8 @@
498498 if(!zp_img) return;
499499
500500 if (delta == 0) {
501 - if(self.pr_horiz)
502 - //reduce width by 20 pixels in order to prevent horizontal scrollbar from showing up
503 - zp_img.width = image_container.offsetWidth-20;
504 - else
505 - zp_img.width = image_container.offsetWidth;
 501+ //reduce width by 20 pixels in order to prevent horizontal scrollbar from showing up
 502+ zp_img.width = image_container.offsetWidth-20;
506503 zp_img.style.margin = '0px 0px 0px 0px';
507504 image_container.style.cssText = self.container_css; //needed by IE6
508505
@@ -776,6 +773,12 @@
777774 image1.onclick = pr_toggle_layout;
778775 toolbar.appendChild(image1);
779776
 777+ } else {
 778+ var mb = document.createElement("div");
 779+ mb.style.cssText="background-color:#eeeeee;";
 780+ mb.innerHTML = "<a href=\"javascript:pr_toggle_visibility();\">headers</a> - <a href=\"javascript:pr_toggle_layout();\">layout</a> - <a href=\"javascript:pr_zoom(0);\">zoom</a> : <a href=\"javascript:xx=0;yy=0;pr_zoom(2);\">+</a> / <a href=\"javascript:xx=0;yy=0;pr_zoom(-2);\">\u2013</a>";
 781+ var p = table.parentNode;
 782+ p.insertBefore(mb,p.firstChild);
780783 }
781784 }
782785 }

Status & tagging log