| Index: trunk/extensions/ProofreadPage/ProofreadPage_body.php |
| — | — | @@ -357,19 +357,24 @@ |
| 358 | 358 | $height = $image->getHeight(); |
| 359 | 359 | if ( $m[2] ) { |
| 360 | 360 | $thumbName = $image->thumbName( array( 'width' => '##WIDTH##', 'page' => $m[3] ) ); |
| | 361 | + $thumbURL = $image->getThumbUrl( $thumbName ); |
| | 362 | + $thumbURL = str_replace( '%23', '#', $thumbURL ); |
| | 363 | + $fullURL = str_replace( '##WIDTH##', "$width", $thumbURL ); |
| 361 | 364 | } else { |
| 362 | 365 | $thumbName = $image->thumbName( array( 'width' => '##WIDTH##' ) ); |
| | 366 | + $thumbURL = $image->getThumbUrl( $thumbName ); |
| | 367 | + $thumbURL = str_replace( '%23', '#', $thumbURL ); |
| | 368 | + $fullURL = $image->getURL(); |
| 363 | 369 | } |
| 364 | | - $thumbURL = $image->getThumbUrl( $thumbName ); |
| 365 | | - $thumbURL = str_replace( '%23', '#', $thumbURL ); |
| 366 | 370 | $scan_link = Html::element( 'a', |
| 367 | | - array( 'href' => str_replace( '##WIDTH##', "$width", $thumbURL ), |
| | 371 | + array( 'href' => $fullURL, |
| 368 | 372 | 'title' => wfMsg( 'proofreadpage_image' ) ), |
| 369 | 373 | wfMsg( 'proofreadpage_image' ) ); |
| 370 | 374 | } else { |
| 371 | 375 | $width = 0; |
| 372 | 376 | $height = 0; |
| 373 | 377 | $thumbURL = ''; |
| | 378 | + $fullURL = ''; |
| 374 | 379 | $scan_link = ''; |
| 375 | 380 | } |
| 376 | 381 | |
| — | — | @@ -388,6 +393,7 @@ |
| 389 | 394 | 'proofreadPageHeight' => intval( $height ), |
| 390 | 395 | 'proofreadPageEditWidth' => $edit_width, |
| 391 | 396 | 'proofreadPageThumbURL' => $thumbURL, |
| | 397 | + 'proofreadPageURL' => $fullURL, |
| 392 | 398 | 'proofreadPageIsEdit' => intval( $isEdit ), |
| 393 | 399 | 'proofreadPageIndexLink' => $index_link, |
| 394 | 400 | 'proofreadPageNextLink' => $next_link, |
| Index: trunk/extensions/ProofreadPage/proofread.js |
| — | — | @@ -16,10 +16,15 @@ |
| 17 | 17 | // enforce quantization: width must be multiple of 100px |
| 18 | 18 | var width = 100 * Math.round( requested_width / 100 ); |
| 19 | 19 | // compare to the width of the image |
| 20 | | - width = Math.min( width, proofreadPageWidth ); |
| 21 | | - self.DisplayWidth = width; |
| 22 | | - self.DisplayHeight = width * proofreadPageHeight / proofreadPageWidth; |
| 23 | | - return proofreadPageThumbURL.replace( '##WIDTH##', '' + width ); |
| | 20 | + if( width < proofreadPageWidth ) { |
| | 21 | + self.DisplayWidth = width; |
| | 22 | + self.DisplayHeight = width * proofreadPageHeight / proofreadPageWidth; |
| | 23 | + return proofreadPageThumbURL.replace( '##WIDTH##', '' + width ); |
| | 24 | + } else { |
| | 25 | + self.DisplayWidth = proofreadPageWidth; |
| | 26 | + self.DisplayHeight = proofreadPageHeight; |
| | 27 | + return proofreadPageURL; |
| | 28 | + } |
| 24 | 29 | } |
| 25 | 30 | } |
| 26 | 31 | |