Index: trunk/extensions/ProofreadPage/proofread.js |
— | — | @@ -145,11 +145,16 @@ |
146 | 146 | pageFooter = pageFooter.split("&").join("&") |
147 | 147 | |
148 | 148 | container.innerHTML = '' |
149 | | - + '<div id="prp_header" style="display:none">' + escapeQuotesHTML(proofreadPageMessageHeader) + '<br/>' |
150 | | - + '<textarea name="headerTextbox" rows="2" cols="80">' + pageHeader + '</textarea>' |
151 | | - + '<br/>' + escapeQuotesHTML(proofreadPageMessagePageBody) + '<br/></div>' |
152 | | - + '<textarea name="wpTextbox1" id="wpTextbox1" rows="40" cols="80">'+pageBody+'</textarea>' |
153 | | - + '<div id="prp_footer" style="display:none">' + escapeQuotesHTML(proofreadPageMessageFooter) + '<br/>' |
| 149 | + + '<div id="prp_header" style="display:none;">' |
| 150 | + + '<span style="color:gray;font-size:80%;line-height:100%;">' |
| 151 | + + escapeQuotesHTML(proofreadPageMessageHeader) + '</span>' |
| 152 | + + '<textarea name="headerTextbox" rows="2" cols="80">' + pageHeader + '</textarea><br/>' |
| 153 | + + '<span style="color:gray;font-size:80%;line-height:100%;">' |
| 154 | + + escapeQuotesHTML(proofreadPageMessagePageBody) + '</span></div>' |
| 155 | + + '<textarea name="wpTextbox1" id="wpTextbox1" style="height:' + ( self.DisplayHeight - 6 ) + 'px;">' + pageBody + '</textarea>' |
| 156 | + + '<div id="prp_footer" style="display:none;">' |
| 157 | + + '<span style="color:gray;font-size:80%;line-height:100%;">' |
| 158 | + + escapeQuotesHTML(proofreadPageMessageFooter) + '</span><br/>' |
154 | 159 | + '<textarea name="footerTextbox" rows="2" cols="80">'+pageFooter+'</textarea></div>'; |
155 | 160 | |
156 | 161 | |
— | — | @@ -168,6 +173,22 @@ |
169 | 174 | } |
170 | 175 | |
171 | 176 | |
| 177 | +function pr_reset_size() { |
| 178 | + |
| 179 | + var box = document.getElementById("wpTextbox1"); |
| 180 | + var h = document.getElementById("prp_header"); |
| 181 | + var f = document.getElementById("prp_footer"); |
| 182 | + if( h.style.cssText == 'display:none;') { |
| 183 | + box.style.cssText = "height:" + ( self.DisplayHeight - 6 ) + "px"; |
| 184 | + } else { |
| 185 | + if( self.pr_horiz ) { |
| 186 | + box.style.cssText = "height:" + ( self.DisplayHeight - 6 ) + "px"; |
| 187 | + } else { |
| 188 | + box.style.cssText = "height:" + ( self.DisplayHeight - 6 - h.offsetHeight - f.offsetHeight) + "px"; |
| 189 | + } |
| 190 | + } |
| 191 | +} |
| 192 | + |
172 | 193 | function pr_toggle_visibility() { |
173 | 194 | |
174 | 195 | var box = document.getElementById("wpTextbox1"); |
— | — | @@ -176,22 +197,21 @@ |
177 | 198 | if( h.style.cssText == ''){ |
178 | 199 | h.style.cssText = 'display:none'; |
179 | 200 | f.style.cssText = 'display:none'; |
180 | | - box.style.cssText = "height:"+(self.DisplayHeight-7)+"px"; |
181 | 201 | } else { |
182 | 202 | h.style.cssText = ''; |
183 | 203 | f.style.cssText = ''; |
184 | | - if(!self.pr_horiz) box.style.cssText = "height:"+(self.DisplayHeight-169)+"px"; |
185 | | - else box.style.cssText = "height:"+(self.DisplayHeight-7)+"px"; |
186 | 204 | } |
| 205 | + pr_reset_size(); |
187 | 206 | } |
188 | 207 | |
189 | 208 | function pr_toggle_layout() { |
190 | 209 | |
191 | | - if (!self.pr_horiz) |
| 210 | + if ( self.pr_horiz ) { |
| 211 | + pr_fill_table(false); |
| 212 | + } else { |
192 | 213 | pr_fill_table(true); |
193 | | - else |
194 | | - pr_fill_table(false); |
195 | | - |
| 214 | + } |
| 215 | + pr_reset_size(); |
196 | 216 | } |
197 | 217 | |
198 | 218 | |
— | — | @@ -594,7 +614,7 @@ |
595 | 615 | } |
596 | 616 | else{ |
597 | 617 | if(!horizontal_layout){ |
598 | | - self.DisplayHeight = Math.ceil(height*0.9); |
| 618 | + self.DisplayHeight = Math.ceil(height*0.85); |
599 | 619 | self.DisplayWidth = parseInt(width/2-70); |
600 | 620 | img_w = self.DisplayWidth; |
601 | 621 | self.container_css = "background:#000000; overflow:hidden; width:"+self.DisplayWidth+"px; height:"+self.DisplayHeight+"px;"; |
— | — | @@ -610,7 +630,6 @@ |
611 | 631 | + "\" width=\""+img_w+"\" />"; |
612 | 632 | |
613 | 633 | image_container.style.cssText = self.container_css; |
614 | | - document.getElementById("wpTextbox1").style.cssText = "height:"+(self.DisplayHeight-7)+"px"; |
615 | 634 | pr_zoom(0); |
616 | 635 | } |
617 | 636 | |