use HTML_AJAXs replace function to alter content of content-div
authorAndreas Unterkircher <unki@netshadow.at>
Tue, 15 Jan 2008 18:39:37 +0000 (19:39 +0100)
committerAndreas Unterkircher <unki@netshadow.at>
Tue, 15 Jan 2008 18:39:37 +0000 (19:39 +0100)
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
phpfspot.class.php
phpfspot.js
themes/default/templates/single_photo.tpl

index 85d276e104d29a09a792cae3b5f59d004f83017c..467fdb2db1e83b5f763a93e7cb2a363a86c630bf 100644 (file)
@@ -520,7 +520,7 @@ class PHPFSPOT {
 
       $this->tmpl->show("single_photo.tpl");
 
 
       $this->tmpl->show("single_photo.tpl");
 
-      print "<script language=\"JavaScript\">self.location.hash = '#image';</script>\n";
+      print "<script language=\"JavaScript\">self.location.hash = '#photo';</script>\n";
 
    } // showPhoto()
 
 
    } // showPhoto()
 
index ca3f9c01508fa8c94e25eae0794823d7986b8f12..2079b80b27a9329ccc4b5c3306b089421f346820 100644 (file)
@@ -1,7 +1,6 @@
 function showImage(id)
 {
 function showImage(id)
 {
-   var image_div = document.getElementById("content");
-   image_div.innerHTML = HTML_AJAX.grab(encodeURI('rpc.php?action=showphoto&id=' + id));
+   HTML_AJAX.replace(document.getElementById("content"), encodeURI('rpc.php?action=showphoto&id=' + id));
 }
 
 function showCredits()
 }
 
 function showCredits()
index 19329cc73fd86e4e2ed737d289d1bb5185e577dd..2032f525896055678c0d41faa1e4f24324e17dc0 100644 (file)
@@ -64,9 +64,9 @@
 
  <div style="text-align: left; margin-top: 20px; margin-left: 20px;">
  { if $next_url == "" }
 
  <div style="text-align: left; margin-top: 20px; margin-left: 20px;">
  { if $next_url == "" }
-  <a href="javascript:showPhotoIndex();" onclick="click(this);">
+  <a href="javascript:showPhotoIndex();" onclick="click(this);" name="photo">
  { else }
  { else }
-  <a href="{$next_url}" onclick="click(this);" title="click for the next photo" name="image">
+  <a href="{$next_url}" onclick="click(this);" title="click for the next photo" name="photo">
  { /if }
    <img src="{$image_url}" width="{$width}" height="{$height}" alt="{$image_filename}" />
   </a>
  { /if }
    <img src="{$image_url}" width="{$width}" height="{$height}" alt="{$image_filename}" />
   </a>