From: Andreas Unterkircher Date: Thu, 7 Jun 2007 08:48:43 +0000 (+0000) Subject: nice bubble preview in photo index view X-Git-Tag: phpfspot-1.2~302 X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=commitdiff_plain;h=fb15deeef32d80ef922a578d742ff49633d5f94e;hp=7c498e18d97daa7ae42e355adf24b8c77cacad33 nice bubble preview in photo index view git-svn-id: file:///var/lib/svn/phpfspot/trunk@33 fa6a889d-dae6-447d-9e79-4ba9a3039384 --- diff --git a/bubble.js b/bubble.js new file mode 100644 index 0000000..39ae03e --- /dev/null +++ b/bubble.js @@ -0,0 +1,261 @@ +/* + WebSnapr - Preview Bubble Javascript + Written by Juan Xavier Larrea + http://www.websnapr.com - xavier@websnapr.com + +*/ + +// Point this variable to the correct location of the bg.png file +var bubbleImagePath = 'resources/bubble_bg.png'; + +if(typeof Array.prototype.push!="function"){ + Array.prototype.push=ArrayPush; + + function ArrayPush(_1){ + this[this.length]=_1; + } +} + +function WSR_getElementsByClassName(_2,_3,_4){ + + var _5=(_3=="*"&&_2.all)?_2.all:_2.getElementsByTagName(_3); + var _6=new Array(); + _4=_4.replace(/\-/g,"\\-"); + var _7=new RegExp("(^|\\s)"+_4+"(\\s|$)"); + var _8; + for(var i=0;i<_5.length;i++){ + _8=_5[i]; + if(_7.test(_8.className)){ + _6.push(_8); + } + } + return (_6); +} + +function bindBubbles(e){ + lbActions=WSR_getElementsByClassName(document,"a","bubble"); + for(i=0;i + diff --git a/templates/photo_index.tpl b/templates/photo_index.tpl index 3172547..1647f5a 100644 --- a/templates/photo_index.tpl +++ b/templates/photo_index.tpl @@ -21,7 +21,7 @@ {if $images[row][col] }
@@ -38,4 +38,9 @@ +