* @class Roo.ux.Slideshow
*/
-Roo.ux.Slideshow = function(cfg ) {
+Roo.ux.Slideshow = function(cfg )
+{
Roo.apply(this, cfg);
if ( this.slides ) {
this.numOfImages = this.slides.length;
}
this.playButton = Roo.get(this.playButton);
this.pauseButton = Roo.get(this.pauseButton);
+ this.counter = Roo.get(this.counter);
if ( this.autostart ) {
this.startSlideShow();
}
}
+
Roo.apply(Roo.ux.Slideshow.prototype, {
wait : 4000
start : 0
duration : 0.5,
autostart : true ,
- slides : false
- counter : 0,
+ slides : false,
+ /**
+ * @config id/dom element counter to show the
+ */
+ counter : false,
caption : '',
+ /**
+ * @config id/dom element for play button
+ */
playButton : false,
+ /**
+ * @config id/dom element of the pause button
+ */
pauseButton : false,
iImageId : 0,
},
updatecounter: function () {
+
var textIn = this.iImageId+1 + ' of ' + this.numOfImages;
$(this.counter) && ( $(this.counter).innerHTML = textIn );
if ( $(this.caption) && ( oNewCaption = $(this.slides[this.iImageId]).down('.image-caption') ) ) {