summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8>2006-12-19 22:38:23 +0000
committercookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8>2006-12-19 22:38:23 +0000
commit7ec1daba838cbda434c0313cbdf6344124caed5b (patch)
tree80753bd0da8e2d14639473f31186f92c91f58691
parent5f024c275cfa57890561c465e4fd0b33753eb74f (diff)
photos werden gross bei mouseover, danke Henryk
git-svn-id: svn://svn.cccv.de/engel-system@215 29ba0400-6e00-0410-a75a-ca02368028f8
-rwxr-xr-xwww-ssl/inc/css/grossbild.js62
-rwxr-xr-xwww-ssl/inc/funktion_user.php2
-rwxr-xr-xwww-ssl/inc/header.php1
3 files changed, 64 insertions, 1 deletions
diff --git a/www-ssl/inc/css/grossbild.js b/www-ssl/inc/css/grossbild.js
new file mode 100755
index 00000000..618ecc1f
--- /dev/null
+++ b/www-ssl/inc/css/grossbild.js
@@ -0,0 +1,62 @@
+ function isClass(object, className) {
+ return (object.className.search('(^|\\s)' + className + '(\\s|$)') != -1);
+ }
+
+ var grossbild_an = 0
+
+ function grossbild_over(e) {
+ if(grossbild_an) return
+ grossbild_an = 1
+ if(!e) e = window.event;
+ body = document.getElementsByTagName("body")[0]
+ i = document.createElement("img")
+ i.src = e.target.src;
+ i.style.position = "absolute"
+ /*a = ""
+ for(b in e) a += b + " "
+ alert(a)*/
+ i.style.top = e.clientY + window.scrollY
+ i.style.left = e.clientX + window.scrollX
+ i.id = "mouseoverphoto"
+ i.onmouseover = grossbild_over
+ i.onmouseout = grossbild_out
+ //i.onmousemove = grossbild_move
+ body.appendChild(i);
+ }
+
+ function grossbild_out(e) {
+ if(!grossbild_an) return
+ grossbild_an = 0
+ if(!e) e = window.event;
+ body = document.getElementsByTagName("body")[0]
+ i = document.getElementById("mouseoverphoto")
+ body.removeChild(i)
+ }
+
+ function grossbild_move(e) {
+ if(!e) e = window.event;
+ i = document.getElementById("mouseoverphoto")
+ i.style.top = e.clientY + window.scrollY
+ i.style.left = e.clientX + window.scrollX
+}
+
+ function grossbild_register(objekt) {
+ objekt.onmouseover = grossbild_over
+ objekt.onmouseout = grossbild_out
+ objekt.onmousemove = grossbild_move
+ }
+
+ function grossbild_registrieren() {
+ if(grossbild_altonload)
+ grossbild_altonload()
+
+ objekte = document.getElementsByTagName("img");
+ for(var i = 0; i < objekte.length; i++) {
+ if(isClass(objekte[i], "photo")) {
+ grossbild_register(objekte[i])
+ }
+ }
+ }
+
+ var grossbild_altonload = window.onload
+ window.onload = grossbild_registrieren
diff --git a/www-ssl/inc/funktion_user.php b/www-ssl/inc/funktion_user.php
index ac8744cf..c99e54fe 100755
--- a/www-ssl/inc/funktion_user.php
+++ b/www-ssl/inc/funktion_user.php
@@ -77,7 +77,7 @@ function GetPicturShow($UID)
function displayPictur($UID, $height="30")
{
if( $height > 0)
- return( "<img src=\"./inc/ShowUserPicture.php?UID=$UID\" height=\"$height\" alt=\"picture of USER$UID\">");
+ return( "<img src=\"./inc/ShowUserPicture.php?UID=$UID\" height=\"$height\" alt=\"picture of USER$UID\" class=\"photo\">");
else
return( "<img src=\"./inc/ShowUserPicture.php?UID=$UID\" alt=\"picture of USER$UID\">");
}
diff --git a/www-ssl/inc/header.php b/www-ssl/inc/header.php
index 7c5f746c..08e532b7 100755
--- a/www-ssl/inc/header.php
+++ b/www-ssl/inc/header.php
@@ -61,6 +61,7 @@ echo "<TITLE>--- $title $Version ---</TITLE>";
<meta name="robots" content="index">
<meta name="revisit-after" content="1 days">
<meta http-equiv="content-language" content="de">
+<script type="text/javascript" src="./inc/css/grossbild.js"></script>
<link rel=stylesheet type="text/css" href="./inc/css/style<?PHP
if (!IsSet($_SESSION['color']))
echo "1";