http://www.average.org/mkgallery/
TODO:
+- implement header and footer insertion
- make index.html depend of .title and directory timestamps
- rebuild htmls in .html when directory timestamp chnges (images added)
- make links in the rss file relative
return {
onClick: $empty,
zIndex: 9,
- buttonClass: 'controlButton',
+ buttonClass: 'controlButton'
}
},
this.container = new Element('div').addClass(name).
setProperties({
id: name,
- name: name,
+ name: name
}).setStyles({
- zIndex: this.options.zIndex,
+ zIndex: this.options.zIndex
}).addEvent('click', function(){
this.options.onClick()
}.bind(this)).injectInside(this.parent);
sub.addClass(this.options.buttonClass).setProperties({
id: el,
name: el,
- title: el,
+ title: el
}).addEvent('click', function(){
this[el]();
}.bind(this)).injectInside(this.container);
},this);
this.posbox = new Element('span').
addClass('controlPosition').setProperties({
- id: 'controlPosition',
+ id: 'controlPosition'
}).injectInside(this.commbox);
this.refbox = new Element('a', {
href: 'javascript: void(1);',
- html: 'title',
+ html: 'title'
}).addClass('controlRef').setProperties({
- id: 'controlRef',
+ id: 'controlRef'
}).injectInside(this.commbox);
},
this.stopbox.setStyle('display', 'none');
this.playbox.setStyle('display', 'block');
}
- },
+ }
});
Controls.implement(new Options);
rimgs[rel] = i;
vimgs[i] = [rel, el.title, []];
el.getElements('a').each(function(ael,j){
- dim = /(\d+)[^\d](\d+)/.exec(ael.text);
+ dim = /(\d+)[^\d](\d+)/.exec(ael.rel);
w = dim[1];
h = dim[2];
vimgs[i][2][j]=[w,h,ael.href];
openFromLink: false,
movieWidth: 640,
movieHeight: 480,
- descClassName: 'infoBoxDesc',
+ descClassName: 'infoBoxDesc'
};
ibox = new multiBox('infoBox', iboxparams);
var winparms = {
- tohide: 'indexContainer',
+ tohide: 'indexContainer'
};
var showwin = new showWindow('slideshowContainer',winparms);
var showparms = {
cbStart: function(){ showwin.show(); },
- cbExit: function(){ showwin.hide(); },
+ cbExit: function(){ showwin.hide(); }
};
var show = new Show(vimgs,showwin,ctl,showparms);
cbExit: function(){ alert('show exit undefined'); },
percentage: 98,
delay: 5000,
- fxduration: 200,
+ fxduration: 200
}
},
this.cache = {
prev: {},
curr: {},
- next: {},
+ next: {}
};
/*
* thescripts.com/forum/thread170365.html
zIndex: 4,
display: 'none',
width: this.coords.width,
- height: this.coords.height,
+ height: this.coords.height
});
this.container.grab(this.loadingdiv);
var newcache = {
prev: (id > 0)?this.prepare(id-1):{},
curr: this.prepare(id),
- next: (id < (this.vimgs.length-1))?this.prepare(id+1):{},
+ next: (id < (this.vimgs.length-1))?this.prepare(id+1):{}
};
delete this.cache;
this.cache = newcache;
id: id,
vi: vi,
ready: false,
- url: this.vimgs[id][2][vi][2],
+ url: this.vimgs[id][2][vi][2]
};
cachel.img = this.bgload(cachel);
}
return new Asset.image(this.vimgs[cachel.id][2][cachel.vi][2],{
id: this.vimgs[cachel.id][0],
title: this.vimgs[cachel.id][1],
- onload: this.loadcomplete.bind(this,[cachel]),
+ onload: this.loadcomplete.bind(this,[cachel])
});
},
setStyles(this.calcsize(cachel)).
setStyles({
zIndex: 3,
- opacity: 0,
+ opacity: 0
});
this.ondisplay.replaces(this.prevdisplay).
setProperty('alt', 'Previous Image').
effect: function(){
this.fx = new Fx.Tween(this.ondisplay, {
- duration: this.options.fxduration,
+ duration: this.options.fxduration
});
this.fx.addEvent('complete',this.displaycomplete.bind(this));
this.fx.start('opacity', 0, 1);
},
calcsize: function(cachel){
+ if (! cachel.id) {
+ return {
+ position: 'absolute',
+ top: 0+'px',
+ left: 0+'px',
+ width: this.coords.width,
+ height: this.coords.height
+ };
+ }
var factor = 1;
var candidate;
candidate = this.target.width /
top: t+'px',
left: l+'px',
width: w,
- height: h,
+ height: h
};
},
this.loadingdiv.setStyles({
display: 'block',
width: this.coords.width,
- height: this.coords.height,
+ height: this.coords.height
});
},
width: Math.round(this.coords.width *
this.options.percentage / 100),
height: Math.round(this.coords.height *
- this.options.percentage / 100),
+ this.options.percentage / 100)
};
/* alert('coords: '+this.coords.width+'x'+this.coords.height+
', target: '+this.target.width+'x'+this.target.height); */
- },
+ }
});
+
Show.implement(new Options);
Show.implement(new Events);
zIndex: 2,
container: document.body,
tohide: '',
- onClick: $empty,
+ onClick: $empty
}
},
this.container = new Element('div').addClass(name).
setProperties({
id: name,
- name: name,
+ name: name
}).setStyles({
position: 'absolute',
left: '0px',
return {
width: this.w,
height: this.h,
- top: this.s,
+ top: this.s
};
},
'display'
);
this.options.tohide.setStyles({
- display: 'none',
+ display: 'none'
});
}
this.bodystyles = document.body.getStyles(
document.body.setStyles({
overflow: 'hidden',
'overflow-x': 'hidden',
- 'overflow-y': 'hidden',
+ 'overflow-y': 'hidden'
});
this.position();
this.container.setStyle('display', 'block');
grab: function(obj){
return this.container.grab(obj);
- },
-})
+ }
+});
+
showWindow.implement(new Options);
my $h=$self->{$sz}->{'dim'}->[1];
print $IND " ",a({-href=>$src,
-class=>"conceal",
+ -rel=>$w."x".$h,
-title=>"Reduced to ".$w."x".$h},
$w."x".$h)," \n";
}
print $IND " ",a({-href=>$name,
+ -rel=>$w."x".$h,
-title=>'Original'},$w."x".$h),
"\n",end_div,"\n",
end_td,end_Tr,end_table,"\n";