#7673 closed defect (fixed)
Fix JavaScript code
Reported by: | Eygene Ryabinkin | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | TracKeywordsPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description
IE goes angry on the following code
link = document.getElementById('add_' + currentTags[i]);
because 'link' should be made local variable: IE pollutes the namespace with variables named after all DOM nodes, so it nags the users about the object ('link') that isn't support the particular method ('=', I think).
The patch is available at http://codelabs.ru/patches/trac-keywords/fix-javascript-make-local-variable.diff
It was tested on our Trac 0.12 and IE 6.x/8.x: the original JS problem is gone.
Attachments (0)
Change History (14)
comment:1 Changed 14 years ago by
comment:4 Changed 14 years ago by
Owner: | changed from thomasvs to Ryan J Ollos |
---|
It's high on my todo list ;) I can apply the patch right now if you can checkout the latest version afterwards just to confirm that I don't make a silly mistake. Just don't 15 min to setup a trac environment and test right now.
comment:5 Changed 14 years ago by
Owner: | changed from Ryan J Ollos to anonymous |
---|---|
Status: | new → assigned |
There seems to be another problem. The following file doesn't exist in the repository: 0.11/trackeywords/templates/keywords.html
In fact, I think there may have been an error in [6528] because the log message doesn't match the changes that were made (he may have mixed up the 0.l0 and 0.11 branches).
comment:6 Changed 14 years ago by
Ah, I am terribly sorry, I completely forgot about this bug: #6104. It should be fixed prior to this bug: I am using the patched version inside FreeBSD port, so I missed that point.
And it looks like not only trackeywords/templates/keywords.html, but trackeywords/web_ui.py was misplaced too: they both should live under 0.11, not under 0.10.
comment:7 Changed 14 years ago by
Owner: | changed from anonymous to Ryan J Ollos |
---|---|
Status: | assigned → new |
comment:8 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:9 follow-up: 11 Changed 14 years ago by
Okay, should be fixed now. Would you be willing to test out the 0.11 version? Also, if it does work on 0.12, we should add a 0.12 tag to the project's wiki page: TracKeywordsPlugin.
comment:10 Changed 14 years ago by
A few other things:
- It appears that the modification to ticket.cs listed under TracKeywordsPlugin#Example should only be necessary in Trac 0.10, so I added (0.10 only). Please confirm if possible.
- It would be nice to have a screen capture on the project's wiki page, showing the plugin in action.
- (already mentioned) add 0.12 tag if it works with 0.12.
comment:11 Changed 14 years ago by
Replying to rjollos:
Okay, should be fixed now. Would you be willing to test out the 0.11 version?
Yes.
Also, if it does work on 0.12, we should add a 0.12 tag to the project's wiki page: TracKeywordsPlugin.
I'll also test the 0.12. In fact, our production systems are running 0.12, so I will need to up 0.11 somehow.
comment:12 Changed 14 years ago by
Works for me at 0.12. And I hadn't made any modifications for ticket.cs neither for 0.11, nor for 0.12.
Looks like a straighforward fix. I'd be happy to apply this to the repository 0.11 branch given permission of the author, or if no response from plugin author within 2 weeks (per t-h.o policies) (... and feel free to remind me in 2 weeks if I forget).