Right now all links that start with '/' are handled by RefreshLess. While this usually probably fine some modules may want exclude certain links from this behavior.
I am creating a new module Config QuickEdit. That will load certain configuration forms on the front. It depends on Refreshless to reload the page after configuration has been saved(thanks for that!). But I want the links to load the configuration to be exclude from Refreshless because I doing my own ajax.
Here is a patch that simply excludes links that have the class "refreshless-exclude" by changing the relativeLinksSelector variable.
BTW here is screen capture of the configuration changing and then being reloaded by Refreshless. This has the patch applied.
Thanks for this great module!
Comment | File | Size | Author |
---|---|---|---|
#5 | refreshless-exclude_links-2699497-5.patch | 1.18 KB | Wim Leers |
config_quickedit.gif | 111.12 KB | tedbow |
Comments
Comment #2
Wim LeersGlad to see it being used already :)
+1 for this principle, not sure about the exact naming yet. I'll add this once I've addressed more pressing concerns.
Comment #3
Wim LeersRerolled against HEAD, where another selector was added to support fragment links.
Comment #4
Wim LeersOops, rerolled wrong, lol. Apparently I still don't know the difference between cut and copy :P
Comment #5
Wim LeersWith that done, I started actually looking at the patch.
Two observations:
data-
attribute would be more appropriate:data-refreshless-exclude
.Patch attached. Includes documentation.
Comment #6
Wim LeersRather than waiting for feedback, I'm going to commit this. This module is still in alpha stage anyway, so if it turns out changes are needed, API breaks are not a problem.
Comment #7
Wim LeersComment #9
tedbowThanks for making this change!
Yeah I figured "data-" makes more sense. I guess core just uses classes like "ajax-submit" for legacy reasons
Comment #10
Wim LeersYep, all those are being transitioned to
data-
attributes. Most have already been converted.