[dokuwiki] Re: jQuery rewrite

  • From: rezlemic@xxxxxxxxxxx
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 30 Mar 2011 23:33:49 +0200

Hi,

I just have a question about my rewrite. As you have written, the
current JS API should not be changed. But for example the original
media.js was written so that it was possible to call functions i.e.:
"media_manager.togglekeepopen()" external. After rewrite of this file
(I haven't rewritten this file, I have only solved conflicts by
merging) it is not possible to do that. The functions (like
togglekeepopen(),...) are "private" in anonymous function now. Should
I correct it too?

Hm, that's a good question. I would say it's unlikely there are plugins
that use that functionality, but perhaps Hakan (who has a copy of all
plugins) could tell us more about that? Apart from that it's nice to
have ways for plugins to interact with the JavaScript code, but on the
other hand I'm not sure we really need that many possibilities in the
plugin manager. What do you (Michal and also all the other people on the
list) think?

Having objects with named functions is a nice feature as it allows
plugins to overwrite or extend JavaScript functionality. At least for
the media manager I did that before. Have a look at the gallery and
imageshack plugins to see what I mean.

I don't mind if the function names or structure changes, but it
shouldn't be all one anonymous block IMHO.

Andi

Thanks for your replies!
OK, I understand you. I have continued in the rewrite (without changing API) in the meantime. I have also added back a file "drag.js" (for plugin's compatibility reason) that Pierre Spring removed. I think there are quite a lot of JS files rewritten now, I am continuously testing it and it seems to be OK now. I know that the problems can appear after importing plugins. I have just tried to import a imageshack plugin and it works. Do you have all plugins somewhere, please? I would like to test them with rewritten scripts.

Thanks in advance.

Michal


--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: