Hi!
In 2.0, the "addLoadEvent" method of the JS has been renamed to "serendipity.addLoadEvent". This imposes a problem for some plugins, which utilize this function:
- spamblockbayes
- freetag
- autosave
- adminnotes
I would opt to put this central addLoadEvent outside the serendipity main object, to ensure operation of the mentioned plugins. I don't think moving the function is worth the additional version switch inside the plugins and making the plugins throw JS error messages and not work if not upgraded.
Opinions?
[2.0] AddLoadEvent
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
[2.0] AddLoadEvent
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: [2.0] AddLoadEvent
I'd be fine with that, but I assume onli is going to have a more informed opinion.
YL
YL
Re: [2.0] AddLoadEvent
Ok, but I think we should regard it as a legacy call and let new code use $(document).ready instead - the function is not necessary anymore, is it? Maybe we should remove serendipity.addLoadEvent, if we keep addLoadEvent for bc.
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: [2.0] AddLoadEvent
I agree, we should use $(document) on new plugins and core code. I also prefer the global function then.onli wrote:Ok, but I think we should regard it as a legacy call and let new code use $(document).ready instead - the function is not necessary anymore, is it? Maybe we should remove serendipity.addLoadEvent, if we keep addLoadEvent for bc.
I just committed it.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/