Just mentionning that the DEV version doesn't set the active states of the tabs, like BETA 1 does (activeSlide)
Maybe this is normal, but I would have feel bad not mentioning it :)

Comments

Crell’s picture

OK, that's just disturbing. I was just talking to someone about this bug *as you were filing this issue*. Are you psychic or something?

As near as I can figure, it's an issue with jquery.cycle itself. See the demo page here:

http://malsup.com/jquery/cycle/pager2.html

The activeSlide adding logic is very inconsistent. Arguably it's a bug in jquery.cycle, but I don't know how to fix it.

I'm looking into a views_cycle-based workaround as we speak, courtesy of mbutcher.

Anonymous’s picture

Don't look back, I'm right behind you

Crell’s picture

Status: Active » Fixed

Hm, someone else who is Stalking Crell.

Thanks to mbutcher's help (he wrote his own fix for this just recently), I've added some code to the JS file that manually goes through and adds activeSlide to the appropriate LI. It fires in an after callback, so there is a small delay while the animation finishes. I don't now that we can do anything about that.

I'm open to debate if we should use a more Drupal-format CSS name instead of the jQuery Cycle one, since that one isn't actually working here. It's still a dev release so we can change such things. :-)

Status: Fixed » Closed (fixed)

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

finex’s picture

Status: Closed (fixed) » Active

Hi, I'm trying this great module and I've seen that this bug is not completely fixed in the current -dev version.

The "activeState" class is not set when the page is initially loaded, it is set only when the first transition is triggered. "activeState" should be set as default for the first thumbnail when the page is loaded either.

What do you think?

Crell’s picture

Hm, yeah, it probably should be. I'm not sure why jquery cycle is not doing that. Can you file a patch to address that?

finex’s picture

I've looked into the cycle source code and I've found this:

// invoked after transition
$.fn.cycle.updateActivePagerLink = function(pager, currSlide) {
	$(pager).each(function() {
		$(this).find('a').removeClass('activeSlide').filter('a:eq('+currSlide+')').addClass('activeSlide');
	});
};

The comment says that the "activeSlide" is invoked after transition, so it is clear that the first time (when it is initialized) the "activeSlide" is not set. Maybe I should inform the javascript author... What do you say?

Crell’s picture

Feedback from the jQuery cycle author on how best to handle this bug would be highly awesome. :-) Whether it's a bug in jquery.cycle or views_cycle, it would still be great to get his input. Thanks!

finex’s picture

P.S: I've looked the demos on http://www.malsup.com/jquery/cycle/ and the activeSlide is correctly set to the first element of the pager even when the page is loaded so I imagine this is a bug on the module, not in the library itself. I don't know if I'll have time to understand how the module is working in order to prepare a patch :-(

Crell’s picture

Status: Active » Fixed

I was able to track down a fix from the nice people in #jQuery on freenode. The solution was to use Cycle's updateActivePagerLink callback to handle the activeSlide stuff. That fix has been committed to dev, so we should be good to go now.

Crell’s picture

Hm, which is just what FiNeX said in #7. Sorry, I blanked on this issue when trying to track it down earlier today. :-(

Status: Fixed » Closed (fixed)

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

valariems’s picture

So has anyone had success with this using the .dev version? Should it be as simple as upgrading to the .dev version, and giving a style to a:activeSlide?

I haven't had any luck so far. One thing I was doing - maybe it's affecting it, maybe not, is styling the block with Skinr. I'll try styling the block without using Skinr and see if it works, but any feedback on this would be helpful.

Thanks....

valariems’s picture

Re: #13, I think I found the solution to my CSS problems today.

The CSS that should be targeted to change the active state on the tabs is:

.views-cycle-pager li (for off state)
.views-cycle-pager li.activeSlide (for on/active state)