Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Closed Issue: Slideshow not display controls for 1 slide [12316]

$
0
0
After utilizing the slideshow with a database-fed webservice, I really wanted it to not display the next/prev/play controls if only one item was returned.
I've 'fixed' my code to do so, in line 772 of SlideShowBehavior.js (method _initSlides):

<existing code line=770>
this._slides = sender;
if (this._slides) {
</existing code>
<new code line=772>
if (this._slides.length < 2) {
//No images to display, hide buttons
document.getElementById(this._playButtonID).style.visibility = 'hidden';
document.getElementById(this._nextButtonID).style.visibility = 'hidden';
document.getElementById(this._previousButtonID).style.visibility = 'hidden';
}
</new code>
<existing code>
this._images = new Array();
</existing code>

I'm sure you would want to parameterize this better for a release, but here is the concept, which I think would make a great addition to the toolkit.
Comments: This is a good suggestion. We will take it into account while working on the toolkit. Thank you!

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>