show different view for tag- & search-results in photo index view
[phpfspot.git] / bubble.js
index 600407bd5af36bc464664d4cb3c539cc6f0376b6..1d715b10cd3147733b12c6e2ae654c4558ce47c4 100644 (file)
--- a/bubble.js
+++ b/bubble.js
@@ -39,9 +39,11 @@ function bindBubbles(e){
       if(window.addEventListener){\r
          lbActions[i].addEventListener("mouseover",attachBubble,false);\r
          lbActions[i].addEventListener("mouseout",detachBubble,false);\r
+         lbActions[i].addEventListener("click",detachBubble,false);\r
       }else{\r
          lbActions[i].attachEvent("onmouseover",attachBubble);\r
          lbActions[i].attachEvent("onmouseout",detachBubble);\r
+         lbActions[i].attachEvent("onclick",detachBubble);\r
       }\r
    }\r
 }\r
@@ -67,26 +69,26 @@ function attachBubble(_b){
 \r
    // should the bubble be displayed above or below the object\r
    if(cur_height >= get_page_height()) {\r
-      var _f=findPos(_c)[1]-283;\r
-      var _mT=16;\r
-      var _mL=12;\r
+      var _f=findPos(_c)[1]-363;\r
+      var _mL=2;\r
+      var _mT=39;\r
       bubbleImage = bubbleImageUp;\r
    }\r
    else {\r
       var _f=findPos(_c)[1]+17;\r
-      var _mT=27;\r
-      var _mL=12;\r
+      var _mL=2;\r
+      var _mT=34;\r
       bubbleImage = bubbleImageDown;\r
    }\r
 \r
    if (BrowserDetect.browser == 'Explorer') {\r
-      _10.style.width="240px";\r
+      _10.style.width="275px";\r
       _10.style.position="absolute";\r
       _10.style.top=_f;\r
       _10.style.zIndex=99999;\r
       _10.style.left=_e;\r
       _10.style.textAlign="left";\r
-      _10.style.height="190px";\r
+      _10.style.height="275px";\r
       _10.style.paddingTop="0";\r
       _10.style.paddingLeft="0";\r
       _10.style.paddingBottom="0";\r
@@ -97,17 +99,24 @@ function attachBubble(_b){
       _10.style.marginRight="0";\r
       _10.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + bubbleImage + "',sizingMethod='image')";\r
    } else {\r
-      _10.setAttribute("style","text-align: center; z-index: 99999; position: absolute; top: "+_f+"px ; left: "+_e+"px ; background: url("+ bubbleImage +") no-repeat; width: 240px; height: 190px; padding: 0; margin: 0;");\r
+      _10.setAttribute("style","text-align: center; z-index: 99999; position: absolute; top: "+_f+"px ; left: "+_e+"px ; background: url("+ bubbleImage +") no-repeat; width: 275px; height: 275px; padding: 0; margin: 0;");\r
    }\r
 \r
    if (BrowserDetect.browser == 'Safari' || BrowserDetect.browser == 'Konqueror' ) {\r
 \r
       var _height = _f;\r
     \r
-      _10.setAttribute("style","text-align: center; z-index: 99999; position: absolute; top: "+ _height +"px ; left: "+_e+"px ; background: url("+ bubbleImage +") no-repeat; width: 240px; height: 190px; padding: 0; margin: 0;");\r
+      _10.setAttribute("style","text-align: center; z-index: 99999; position: absolute; top: "+ _height +"px ; left: "+_e+"px ; background: url("+ bubbleImage +") no-repeat; width: 275px; height: 275px; padding: 0; margin: 0;");\r
     \r
    }\r
 \r
+   if(cur_height >= get_page_height()) \r
+      showBubbleDetails(_10, _c.id, 'up');\r
+   else\r
+      showBubbleDetails(_10, _c.id, 'down');\r
+\r
+   return;\r
+\r
    var img=document.createElement("img");\r
    _10.appendChild(img);\r
 \r
@@ -141,12 +150,6 @@ function detachBubble(_12){
    }\r
 }\r
 \r
-/*if(window.addEventListener){\r
-   addEventListener("load",bindBubbles,false);\r
-}else{\r
-   attachEvent("onload",bindBubbles);\r
-}*/\r
-\r
 function findPos(obj){\r
    var _14=curtop=0;\r
    if(obj.offsetParent){\r