This patch makes the jQuery selectors for adding the Show more links to blocks dynamic and ustilizes Drupal.settings and apachesolr_get_js to inject the #id selectors of blocks that may need to have the links. The selectors are more precise than class based selectors, so the jQuery should be faster, too, but I didn't benchmark.

Comments

robertdouglass’s picture

StatusFileSize
new2.72 KB

Added some code comments to keep the codebase from becoming too hard to follow.

robertdouglass’s picture

Status: Active » Fixed

Committed to DRUPAL-6--2

claudiu.cristea’s picture

Backporting?

robertdouglass’s picture

Version: 6.x-2.x-dev » 6.x-1.x-dev
Status: Fixed » Patch (to be ported)

Claudiu - you can flag issues you think need backporting by changing the status and coordinating with Peter Wolanin.

claudiu.cristea’s picture

Yes. That's why I asked... The part of code, subject of this patch, is present only in 6.x-2.x.

We have to figure out if we will backport the entire functionality there... I didn't had time to investigate.... Peter?

robertdouglass’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Patch (to be ported) » Needs review
StatusFileSize
new1.01 KB

Here's a band-aid followup. The CCK facet mapping is such a PITA... that needs to be solved. This patch fixes the problem locally.

robertdouglass’s picture

Version: 6.x-2.x-dev » 6.x-1.x-dev
Status: Needs review » Patch (to be ported)
robertdouglass’s picture

(committed #6 to 6.2)

pwolanin’s picture

Which part needs to be ported to 6.x-1.x?

robertdouglass’s picture

Peter, #0, #1, and #6 all got applied.

robertdouglass’s picture

Sorry. Only #1 and #6 got applied.

david lesieur’s picture

Marked #609040: "Show more" link not shown on facet blocks provided by other modules as duplicate. Both solutions seem to use the same approach.

claudiu.cristea’s picture

This patch is not applicable to 6.x-1.x-dev nor to 5.x-2.x-dev because is referring to a function - apachesolr_js() - missed in those branches.

Options:

  • Wontfix in 6.x.-1.x-dev, 5.x-2.x-dev
  • Port all the Drupal.settings/apachesolr_js() stuff

Peter?

pwolanin’s picture

Making this functionality more generic is nice to have, but I don't see it as critical. If someone wants to roll the patch, fine - otherwise I think it's not something to focus on now.

jpmckinney’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Patch (to be ported) » Fixed

Not backporting JS. Marking fixed for 6-2.

Status: Fixed » Closed (fixed)

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