Modify ↓
Opened 5 months ago
Closed 5 months ago
#13760 closed defect (fixed)
threaded_comments.js should be added using add_script rather than directly from ticket.html
Reported by: | Jun Omae | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 1.6.1 |
Component: | ticket system | Version: | 1.6 |
Severity: | minor | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
Use |
||
API Changes: | |||
Internal Changes: |
Description
The threaded_comments.js is added directly from ticket.html. I think it should be added using add_script rather than. Currently only this script is added from templates.
$ git grep -n htdocs_location mirror/1.6-stable -- '*.html' mirror/1.6-stable:trac/templates/about.html:28: <img src="${chrome.htdocs_location}trac_banner.png" mirror/1.6-stable:trac/templates/about.html:56: <img src="${chrome.htdocs_location}python.png" mirror/1.6-stable:trac/templates/theme.html:147: ><img src="${chrome.htdocs_location}trac_logo_mini.png" height="30" mirror/1.6-stable:trac/ticket/templates/ticket.html:33: <script src="${chrome.htdocs_location}js/threaded_comments.js"></script> $ git grep -n '<script\s*src=' mirror/1.6-stable -- '*.html' mirror/1.6-stable:trac/ticket/templates/ticket.html:33: <script src="${chrome.htdocs_location}js/threaded_comments.js"></script>
-
trac/ticket/templates/ticket.html
diff --git a/trac/ticket/templates/ticket.html b/trac/ticket/templates/ticket.html index db9d278d3..781bf775a 100644
a b 29 29 30 30 ${ super() } 31 31 32 # if ticket.exists:33 <script src="${chrome.htdocs_location}js/threaded_comments.js"></script>34 # endif35 32 <script> 36 33 jQuery(function($) { 37 34 $("div.description").find("h1,h2,h3,h4,h5,h6") -
trac/ticket/web_ui.py
diff --git a/trac/ticket/web_ui.py b/trac/ticket/web_ui.py index 79e152c87..fa32d643c 100644
a b class TicketModule(Component): 757 757 'changes': data['changes'], 758 758 }) 759 759 add_stylesheet(req, 'common/css/ticket.css') 760 add_script(req, 'common/js/threaded_comments.js') 760 761 chrome = Chrome(self.env) 761 762 chrome.add_wiki_toolbars(req) 762 763 if not data['disable_submit']:
Attachments (0)
Change History (1)
comment:1 by , 5 months ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Fixed in [17834] and merged in [17835].