First of all, congrats for these great great module!

I had a need to have a View with JCarousel and exposed filters with Ajax.
But, with the "Use Ajax" enabled it was doing "Dynamic content loading" with content that doesn't aplies with the filter, and this behavior is getting the user confused.

So, I made a little patch that makes the "Dynamic content loading" optional, yes!, its optional!
There is a select with Disable/Enable in the style's options.

Cheers!

Comments

quicksketch’s picture

Title: Views with exposed filters and "Use Ajax" enabled is making "Dynamic content loading", but I dont want that !! » Make AJAX loading optional when "Use AJAX" is enabled in the view
sebas5384’s picture

quicksketch thanks for the help with the title! :D

WildKitten’s picture

Thanks for this patch! Just what I needed. Works great! (Just select Disable option :) )

quicksketch’s picture

Status: Needs review » Needs work

I think the idea behind this patch is probably a good one, I realize that Views' AJAX ability is sometimes at odds with jCarousel's approach to AJAX. i.e. #1006830: jCarousel does not work with Exposed Filters or Sorts

However if we're going to make a separate option, there's no need to enable Views' AJAX option. jCarousel doesn't need any of Views' AJAX support to function, so there's no point in requiring that the user enable AJAX at the View level and at the Display style level.

If we move the AJAX option, we also need to think about an upgrade path. Some other notes on the patch:

- The option to enable/disable dynamic content loading should be a checkbox if it's a simple toggle, not a select list.
- The help string "Enable the Dynamic content loading of the nodes" is both inaccurate and unhelpful. It doesn't add any value to the option by describing what "dynamic content loading" actually is. jCarousel can be used with things other than nodes.

quicksketch’s picture

I'm making this a higher personal priority since implementing this would also solve the problems with Views in Drupal 7 as described in #1281336-16: jCarousel AJAX does not work in Drupal 7 when the default display is not a jCarousel.

sebas5384’s picture

@quicksketch, what you mean with that? :P sorry my english is not that good ;)

There are a few projects where i need to have this, and i would love to download the module with the patch already there.

Can we make a list of things that has to be done for this to be commited? what you say?

Cheers!

quicksketch’s picture

Status: Needs work » Fixed
StatusFileSize
new7.29 KB
new7.26 KB

No worries, I spent the evening cleaning up this patch to make it acceptable for the project. This patch is based on the original patch with the following changes:

- jCarousel is no longer dependent on the view-level "Use AJAX" option. This makes the carousel easier to configure and avoids problems that were caused by linking the two (see #1006830: jCarousel does not work with Exposed Filters or Sorts and #1281336: jCarousel AJAX does not work in Drupal 7 when the default display is not a jCarousel).
- By removing the link to "Use AJAX", we also have the ability to set our own unique DOM ID on each carousel. As a side-effect, this fixes #1340300: Number of items in scroll not work when page have two or more views with same display.
- This change is backwards-compatible with existing Views that have the "Use AJAX" option enabled but have not checked the "AJAX load pages" option in the jCarousel configuration. While we *could* write an update hook, there's no way we can modify default views or views that have been exported into features. I think this is a good transitional step for the time being. After updating their views, a user can have the jCarousel-level AJAX setting enabled and the View-level AJAX setting disabled. It's easier to find and enable the setting now also.

I've committed this patch to both 2.x branches, as it's going to help us clean up quite a few other issues.

murz’s picture

jcarousel_views_ajax-d7.patch works well for me! Thank's! Will be good to see it in core.

sebas5384’s picture

Great!! thanks! :)

Status: Fixed » Closed (fixed)

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