}
.controlButton#prev {
- left: 0px;
+ left: 3px;
background: url(left.png) no-repeat;
}
.controlButton#stop {
- left: 25px;
+ left: 28px;
background: url(stop.png) no-repeat;
}
.controlButton#play {
- left: 50px;
+ left: 53px;
background: url(play.png) no-repeat;
}
.controlButton#next {
- left: 75px;
+ left: 78px;
background: url(right.png) no-repeat;
}
.controlButton#exit {
- left: 100px;
+ left: 103px;
background: url(close.png) no-repeat;
}
.controlButton#comm {
- left: 125px;
+ left: 128px;
width: auto;
- color: white;
- margin: .3ex;
+ font-size: 20px;
+ margin-left: .5ex;
+ margin-right: .5ex;
+ padding-left: .5ex;
+ padding-right: .5ex;
+ background-color: rgba(0,0,0,.5);
cursor: default;
}
+.controlButton#comm a {
+ color: white;
+ text-decoration: none;
+}
+
.MultiBoxContainer {
position: absolute;
border: 2px solid #000;
var buttons = ['prev','stop','play','next','exit','comm']
buttons.each(function(el){
var sub = new Element('div')
- if (el == 'comm') {
- this.comm = sub
- sub.set('text', 'this is a comment field')
- /*
- } else {
- sub.set('text', el)
- */
- }
if (this.options[el]) {
sub.addEvent('click', function() {
this.options[el]()
},this)
},
- settext: function(text) {
- this.comm.set(text)
- }
})
showControls.implement(new Options)
/* Make overlay window and start slideshow */
function showImage(id,doplay) {
- var i=rimgs[id][0]
+ var i=rimgs[id]
/* alert('show id='+id+' index='+i+' doplay='+doplay) */
showwin.show()
show.play(i)
el.addEvent('click', showImage.bind(el,[el.get('id'),0]))
})
$$('div.varimages').each(function(el,i){
- rimgs[el.id] = [i, el.title]
+ rimgs[el.id] = i
vimgs[i] = []
el.getElements('a').each(function(ael,j){
dim = /(\d+)[^\d](\d+)/.exec(ael.text)
w = dim[1]
h = dim[2]
- vimgs[i][j]=[w,h,ael.href]
+ vimgs[i][j]=[w,h,ael.href,el.id,el.title]
})
})
/* debugging output
duration: 1000,
loop: false,
thumbnails: false,
- onClick: function(i){alert(i)}
+ onClick: function(i){alert(i)},
+ comment: 'comm',
}
show = new slideShow('slideshowContainer',vimgs,showparms)
thumbnailCls: 'outline',\r
backgroundSlider: false, //change to be an instance.\r
loadingCls: 'loading',\r
- onClick: false\r
+ onClick: false,\r
+ comment: null,\r
};\r
},\r
\r
this.options.onClick(this.imageLoaded);\r
}.bind(this));\r
}\r
- \r
- \r
+ this.comm=this.options.comment;\r
+\r
this.imagesHolder = new Element('div').setStyles({\r
position: 'absolute',\r
overflow: 'hidden',\r
this.imageObj = new Asset.image(img, {onload: this.show.bind(this)});\r
this.imageObj.set('width', width).set('height', height);\r
}\r
- \r
+ this.imageObj.set('id', this.images[this.image][i][3]);\r
+ this.imageObj.set('title', this.images[this.image][i][4]);\r
},\r
\r
restyle: function(imgobj){\r
this.imageLoaded = this.image;\r
this.loading.setStyle('display','none');\r
this.effect();\r
+ this.comm = $(this.comm);\r
+ if (this.comm) {\r
+ var a = this.comm.getElement('a');\r
+ if (a) a.dispose();\r
+ a = new Element('a', {\r
+ href: '#'+this.imageObj.get('id'),\r
+ html: this.imageObj.get('title'),\r
+ }).injectInside(this.comm);\r
+ }\r
},\r
\r
wait: function(){\r
\r
resetAnimation: function(){\r
this.animating = false;\r
+ this.oldImage.setStyles({\r
+ opacity: 0\r
+ });\r
},\r
\r
position: function(){\r
-class=>'showImage',
-id=>$name},
img({-src=>$thumb})),"\n"),"\n",
- start_div({-class=>'varimages',-id=>$name,-name=>$title}),"\n";
+ start_div({-class=>'varimages',-id=>$name,-title=>$title}),"\n";
foreach my $sz(@sizes) {
my $src=$self->{$sz}->{'url'};
my $w=$self->{$sz}->{'dim'}->[0];