]> www.average.org Git - mkgallery.git/blobdiff - include/gallery.js
mame concealable elements on info page. hide them when loaded to info frame.
[mkgallery.git] / include / gallery.js
index 1d7f5b7c0249b5980f84a7502217638f1757e473..a45f1d10a3c3aacdf88f09135eb01df7fc699adc 100644 (file)
@@ -2,45 +2,21 @@
         This is a part of mkgallery.pl suite
         http://www.average.org/mkgallery/
 
-       Uses mootools (1.1) http://www.mootools.net/
+       Uses mootools (1.2) http://www.mootools.net/
        Uses slideshow http://www.phatfusion.net/slideshow/
 */
 
-function showIbox(iboxid) {
- var ibox = document.getElementById(iboxid);
- var bwidth = 400;
- var bheight = 300;
-
- var wwidth = window.getWidth();
- var wheight = window.getHeight();
-
- ibox.style.top = window.getScrollTop() + ((wheight - bheight) / 2) + 'px';
- ibox.style.left = ((wwidth - bwidth) / 2) + "px";
- ibox.style.width = bwidth + "px";
- ibox.style.height = bheight + "px";
- // alert('wwidth='+wwidth+'; bwidth='+bwidth+'; wheight='+wheight+'; bheight='+bheight);
- ibox.zIndex = '0';
- ibox.style.display = 'block';
- return false;
-}
-function HideIbox(iboxid) {
- var ibox = document.getElementById(iboxid);
- ibox.zIndex = '1000';
- ibox.style.display = 'none';
- return false;
-}
-
 /*
        Slideshow
 */
 
-var ShowWindow = new Class({
+var showWindow = new Class({
 
        getOptions: function(){
                return {
                        zIndex: 2,
                        container: document.body,
-                       onClick: Class.empty
+                       onClick: $empty,
                };
        },
 
@@ -93,7 +69,7 @@ var ShowWindow = new Class({
                this.div.setStyles({display: 'none'});
        }
 });
-ShowWindow.implement(new Options);
+showWindow.implement(new Options);
 
 /* Make overlay window and start slideshow */
 function run_slideshow(startid) {
@@ -129,8 +105,9 @@ var vimgs=[]
 */
 /* Initialize everything, to be called on domready */
 function init_gallery() {
- $$('.'+'varimages').each(function(el){
-  vimgs[el.id]=[]
+ $$('div.varimages').each(function(el){
+  var id=el.id
+  vimgs[id]=[]
   el.getElements('a').each(function(ael,i){
    dim = /(\d+)[^\d](\d+)/.exec(ael.text)
    w = dim[1]
@@ -149,8 +126,22 @@ function init_gallery() {
  alert(msg)
    /* end debugging output */
 
+ var ovlparams = {}
+ ovl = new overlay(ovlparams)
+
+ var iboxparams = {
+  overlay: ovl,
+  showNumbers: false,
+  showControls: true,
+  openFromLink: false,
+  movieWidth: 640,
+  movieHeight: 480,
+  descClassName: 'infoBoxDesc',
+ }
+ ibox = new multiBox('infoBox', iboxparams)
+
  var winparms = {}
- showwin = new ShowWindow('slideshowWindow',winparms)
+ showwin = new showWindow('slideshowWindow',winparms)
 
  var showparms = {
   wait: 3000,
@@ -160,7 +151,7 @@ function init_gallery() {
   thumbnails: true,
   onClick: function(i){alert(i)}
  }
- show = new SlideShow('slideshowContainer','slideshowThumbnail',showparms)
+ show = new slideShow('slideshowContainer','slideshowThumbnail',showparms)
 
  parsedurl = parseUrl(document.URL)
  // alert('Anchor: '+parsedurl['anchor']+'\nURL: '+document.URL)