Bug in AJAX jsadmin module. (Easy to fix)

lousou76

Very nice thanx!

I guess I forgot to mention how I corercted similar problem in slideshow.js
I added an extra option to the Slideshow object so I give this option when I define the object on my php code.

Cheers
Ls

doc

#2
Hi,

guess the file "dragdrop.js" was meant. Have implemented a different fix than the one proposed to get rid of the hardcoded admin path in JSAdmin module (Changeset 955).

Thanks to lousou76 for reporting.

Regards Christian

lousou76

I found out recently that if you change the default ADMIN_URL path ('/admin') then the AJAX components drag and drop don't work.

Searching out I found the problem relativly easy.
Inside modules/jsadmin/dropdown.js the path '/admin' is hardcoded.

You have to change it manually but if you really need to fix it you should insert javascript code on every page to replace this path with the correct one while loading.

You cannot insert php in those .js files because the parser wont run it (it doesn't have the .php extension).

The other method is including_once the entire file instead of linking it through css.
That way you can have <? echo ADMIN_URL ?> in that place and the parser will replace it correclty.

LS