Not sure if this is a bug or feature request but it would be nice if there was an option to disable the auto cycling feature if views only returns one item in the list. I modified the javascript to check to see if $('.accordion-content').length = 1 to accomplish this for now, which I'm sure isn't the best way to handle this.

CommentFileSizeAuthor
#2 views_accordion-852300.patch1.21 KBmanuel garcia

Comments

manuel garcia’s picture

Title: Disable auto cycle if only one element is returned from views » Auto cycle should not run if only one element is returned from views
Version: 6.x-1.3 » 6.x-1.x-dev
Category: feature » bug
manuel garcia’s picture

StatusFileSize
new1.21 KB

Very true, thanks for the report roginald.

I've managed to make the decision prior to loading the JS, it should be better for performance of the site than using js to check for this.

I've committed a fix for this http://drupal.org/cvs?commit=453596

If you are in a hurry, find the patch attached, let me know if you run into trouble because of the change, though I have tested it and it looked ok.

manuel garcia’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.