Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24374
Modified Files:
serendipity_functions_images.inc.php
Log Message:
- The size of the popup window for non-image files should be 600x500
- Center the zoom window on the screen
Index: serendipity_functions_images.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions_images.inc.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- serendipity_functions_images.inc.php 10 Aug 2004 17:02:10 -0000 1.29
+++ serendipity_functions_images.inc.php 10 Aug 2004 17:39:52 -0000 1.30
@@ -834,8 +834,10 @@
</td>
<?php
if ($serendipity['authorid'] == $file['authorid'] || $file['authorid'] == '0' || $serendipity['serendipityUserlevel'] >= USERLEVEL_CHIEF) {
+ $popupWidth = ($is_image ? ($file['dimensions_width'] + 20) : 600);
+ $popupHeight = ($is_image ? ($file['dimensions_height'] + 20) : 500);
?>
- <td valign="middle" align="center"><img class="serendipityImageButton" title="<?php echo MEDIA_FULLSIZE; ?>" alt="<?php echo MEDIA_FULLSIZE; ?>" src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/zoom.png" border="0" onclick="F1 = window.open('<?php echo $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $file['path'] . $file['name'] . '.'. $file['extension']; ?>','Zoom','height=<?php echo ($file['dimensions_height'] + 20); ?>,width=<?php echo ($file['dimensions_width'] + 20); ?>,toolbar=no,menubar=no,location=no,resize=1,resizable=1<?php echo ($is_image ? '' : ',scrollbars=yes'); ?>');" /></td>
+ <td valign="middle" align="center"><img class="serendipityImageButton" title="<?php echo MEDIA_FULLSIZE; ?>" alt="<?php echo MEDIA_FULLSIZE; ?>" src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/zoom.png" border="0" onclick="F1 = window.open('<?php echo $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $file['path'] . $file['name'] . '.'. $file['extension']; ?>','Zoom','height=<?php echo $popupHeight; ?>,width=<?php echo $popupWidth; ?>,top='+ (screen.height-<?php echo $popupHeight ?>)/2 +',left='+ (screen.width-<?php echo $popupWidth ?>)/2 +',toolbar=no,menubar=no,location=no,resize=1,resizable=1<?php echo ($is_image ? '' : ',scrollbars=yes'); ?>');" /></td>
<td valign="middle" align="center"><img class="serendipityImageButton" title="<?php echo MEDIA_RENAME; ?>" alt="<?php echo MEDIA_RENAME; ?>" src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/rename.png" border="0" onclick="rename('<?php echo $file['id']; ?>', '<?php echo addslashes($file['name']); ?>')" /></td>
<?php if ($is_image) { ?><td valign="middle" align="center"><img class="serendipityImageButton" title="<?php echo IMAGE_RESIZE; ?>" alt="<?php echo IMAGE_RESIZE; ?>" src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/scale.png" border="0" onclick="location.href='?serendipity[adminModule]=images&serendipity[adminAction]=scaleSelect&serendipity[fid]=<?php echo $file['id']; ?>';" /></td><?php } ?>
<td valign="middle" align="center"><img class="serendipityImageButton" title="<?php echo MEDIA_DELETE; ?>" alt="<?php echo MEDIA_DELETE; ?>" src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/delete.png" border="0" onclick="location.href='?serendipity[adminModule]=images&serendipity[adminAction]=delete&serendipity[fid]=<?php echo $file['id']; ?>';" /></td>
|