changeset 785:7735f97b2bbf

Preliminal implementation of the preview image zoom box.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 21 Nov 2014 05:32:19 +0200
parents c6498b120ad1
children 85f5f569f6fc
files ajax.js msite.inc.php
diffstat 2 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ajax.js	Thu Nov 20 17:07:46 2014 +0200
+++ b/ajax.js	Fri Nov 21 05:32:19 2014 +0200
@@ -201,14 +201,17 @@
   var nitem = document.getElementById("messageBox");
   if (nitem)
   {
-    nitem.innerHTML = "<img src='"+file+"' alt='"+file+"' /><br />"+
-      "<div class='messageBoxControls'>"+
-      "<input id='messageBoxClose' type='button' value=' Close '>"+
+    nitem.innerHTML = "<div class='imageBoxInner'>"+
+      "<img src='"+file+"' alt='"+file+"' />"+
       "</div>";
 
-    var elem = document.getElementById("messageBoxClose");
+    var elem = document.getElementById("messageBox");
     elem.onclick = function () { jsCloseMessageBox(0, 0); }
 
     nitem.style.display = "block";
+
+    return false;
   }
+
+  return true;
 }
--- a/msite.inc.php	Thu Nov 20 17:07:46 2014 +0200
+++ b/msite.inc.php	Fri Nov 21 05:32:19 2014 +0200
@@ -781,7 +781,7 @@
       {
         echo
           "<a href=\"".ihentities($pdata["previewURL"]).
-          "\" onClick=\"jsShowPreviewImage('".ihentities($pdata["previewURL"])."')\">".
+          "\" onClick=\"return jsShowPreviewImage('".ihentities($pdata["previewURL"])."');\">".
           "<img class=\"imagePreview\" src=\"".ihentities($pdata["thumbURL"]).
           "\" alt=\"Preview\" /></a>";
       }