auto-move browser window up when displaying single photo and the user has scrolled...
authorAndreas Unterkircher <unki@netshadow.at>
Tue, 15 Jan 2008 18:33:06 +0000 (19:33 +0100)
committerAndreas Unterkircher <unki@netshadow.at>
Tue, 15 Jan 2008 18:33:06 +0000 (19:33 +0100)
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
phpfspot.class.php
themes/default/templates/single_photo.tpl

index cf0a60c2b0a109b12d34c2b4b4202daeba3916a9..85d276e104d29a09a792cae3b5f59d004f83017c 100644 (file)
@@ -520,6 +520,8 @@ class PHPFSPOT {
 
       $this->tmpl->show("single_photo.tpl");
 
 
       $this->tmpl->show("single_photo.tpl");
 
+      print "<script language=\"JavaScript\">self.location.hash = '#image';</script>\n";
+
    } // showPhoto()
 
    /**
    } // showPhoto()
 
    /**
index 4bc61d181620fe73acb7dc582099fb83b1495631..19329cc73fd86e4e2ed737d289d1bb5185e577dd 100644 (file)
@@ -66,7 +66,7 @@
  { if $next_url == "" }
   <a href="javascript:showPhotoIndex();" onclick="click(this);">
  { else }
  { if $next_url == "" }
   <a href="javascript:showPhotoIndex();" onclick="click(this);">
  { else }
-  <a href="{$next_url}" onclick="click(this);" title="click for the next photo"
+  <a href="{$next_url}" onclick="click(this);" title="click for the next photo" name="image">
  { /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>