I use a site in a folder and with no clean urls, ie: http://example.com/site?q=...

Urls for Urgent and All links in the todo list block are clean urls so they don't work in a scenario like mine. I've changed urls to /site?q=to_do/json/immediate/1 with firebug and they work well. I was unable to find the code that generate them in the module... well grep said me it is at scripts/to_do_block.js ... I'll look into it but I advise javascript is still obscure to me :)

CommentFileSizeAuthor
#1 to_do_dirty_urls.patch3.21 KBjonhattan

Comments

jonhattan’s picture

StatusFileSize
new3.21 KB

I've seen jstools exposes clean_urls to javascript and provides a function called Drupal.url to generate correct urls for any scenario.

Attached is a patch with a fix for this issue. What it does is:

* introduce in to_do.info a dependency for jstools
* call to jstools_add_js instead of drupal_add_js in to_do.module (note: the other call with an array raised a warning and I decided to keep it with drupal_add_js)
* all urls generation in to_do_block.js are now done through Drupal.url

jonhattan’s picture

Status: Active » Needs review

issue status changed

jaypan’s picture

Jonhattan - thank you for the patch. However I would prefer not to have this module have another dependency another module (I like to keep the dependencies to a minimum), so I just went in and fixed the code so that it deals with clean URLs.

This will be out in my next release (due today or tomorrow).

jaypan’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.