Facets configured to use the 'links with checkboxes' display only implement ajax on the link. Clicking the checkbox causes the page to refresh
I can see code relating to this in a patch submitted for another issue http://drupal.org/node/1341704#comment-6173074. It doesn't look like this made it to the dev version. I've implemented a fix locally and can submit a patch if it's not already being worked on.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | search_api_ajax-checkbox_support-1834652-9.patch | 419 bytes | pix_ |
| #2 | 1834652-2.patch | 860 bytes | Anonymous (not verified) |
| #1 | 1834652-1.patch | 1.36 KB | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) commentedCan you review this patch is working?
Comment #2
Anonymous (not verified) commentedRight patch attached.
Comment #3
Anonymous (not verified) commentedCommitted to devx.
http://drupalcode.org/project/search_api_ajax.git/commit/b8b9d27
Comment #5
multpix commentedhi!
latest dev
after clicking on the checkbox, i see #path= in string URL (half a second)
but then still occurs reload page
and without # in URL
Comment #6
multpix commentedthis behavior is different from clicking on the link
how to fix?
many thanks ))
Comment #7
makangus commentedSame problem as @multpix here.
Comment #8
Anonymous (not verified) commentedWhat happens is that Facetapi has its own jQuery trigger already active, and we try to disable it by (see patch #2):
Apparently this unbind does not work? So it triggers both actions, therefore reloads the page. We just need to find out how to correctly unbind the facetapi jquery action.
Comment #9
gigabates commentedAs far as I can see the syntax of unbind method is correct, but it's being called before facet_api has added its click handler and there is nothing to unbind yet. To correct this we would need to adjust the weight when attaching the JavaScript file so its attach method is called after facet_api's.
Comment #10
pix_ commentedHere a patch for the unbinding issue. I've added the Drupal.search_api_ajax.ajax in a behaviour so it's fired not only once, at the page load.
Comment #11
Anonymous (not verified) commentedCommitted unbinding issue to dev-x,
http://drupalcode.org/project/search_api_ajax.git/commit/c6ba4a8