]> dev.renevier.net Git - syp.git/blobdiff - inc/templates_index.php
when clicking image in popup, show it full screen
[syp.git] / inc / templates_index.php
index 2d599268e7a88722f0c54b474ac9d30f24a94754..a84a9c6ade648f0e1830310a4403d257d90d43f2 100644 (file)
@@ -11,13 +11,34 @@ try {
 }
 
 $bbox = $connection->mbr ();
+if (defined ("THUMBSMAXSIZE") && (THUMBSMAXSIZE > 0)) {
+    $thumbsmaxsize = THUMBSMAXSIZE;
+} else {
+    $thumbsmaxsize = 400; // default value;
+}
 ?>
-<html>
+<html lang="<?php echo $lang?>">
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
     <title><?php echo defined ("SITETITLE") ? SITETITLE : "SYP"?></title>
+    <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="news.php">
     <link rel="stylesheet" href="./openlayers/theme/default/style.css" type="text/css">
     <link rel="stylesheet" href="./media/syp.css" type="text/css">
+    <style type="text/css">
+        .olPopup p {
+            <?php printf("width: %dpx;\n", $thumbsmaxsize)?>
+        }
+        .olPopup img {
+            <?php printf("max-height: %dpx;\n", $thumbsmaxsize)?>
+            <?php printf("max-width: %dpx;\n", $thumbsmaxsize)?>
+
+            /* for IE (does not understand max-heigth max-width) */
+            <?php printf("_height: expression((this.scrollHeight>this.scrollWidth) ? 
+                 Math.min(parseInt(this.scrollHeight), %d ) + 'px' : 'auto');\n", $thumbsmaxsize)?>
+            <?php printf("_width: expression((this.scrollWidth>this.scrollHeight) ? 
+                 Math.min(parseInt(this.scrollWidth), %d ) + 'px' : 'auto');\n", $thumbsmaxsize)?>
+        }
+    </style>
 
     <script type="text/javascript">
         var SypStrings = {
@@ -52,5 +73,15 @@ $bbox = $connection->mbr ();
         <div id="map"></div>
         <div id="message"></div>
 
+    <div id="bigimg_container">
+    <div id="bigimg_transparency"></div>
+        <div id="bigimg_content">
+            <img id="bigimg" onclick="SYP.closeBigImage()">
+            <img id="bigimg_close" alt="<?php ptrans('close')?>" 
+                    src="openlayers/theme/default/img/close.gif" 
+                    onclick="SYP.closeBigImage()">
+        </div>
+    </div>
+
 </body>
 </html>