I want to change the default 'working...' message presented in an ajax link
while it is waiting for the callback to return. I couldn't find anything
about this in the web2py manual, but looking in web2py.js it looks like the
message can be overridden by setting the data-disable-with value on the
link, e.g.:
myargs = {'data-disable-with': IMG(_src='coolspinner.gif')}
A('mylink', _href=URL('some', 'view'), **myargs)
(I believe the indirect insertion of the data-disable-with property is
necessary because of the hyphens in the property name.)
But how would I change the default for all of my ajax links? Obviously I
can just change line 474 of web2py.js, but that's a bit fragile because
when I update my app with new versions of that file there's the risk of
regression. So is there any way of setting this default value, say in
db.py, for the whole app? If not, is this something we could add to the
api? I suspect it's something that many will want to tweak to fit their own
themes.
On a similar note, is there a way to set a custom default value for the
'content' property of the LOAD helper? (Again, I'd like to set the new
default in one place for the whole app.) I suppose I could subclass the
LOAD helper, but that seems a bit heavy-handed.
Thanks,
Ian
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.