Ticket #7559 (closed defect: fixed)
expand_dir.js is buggy on table layouts
| Reported by: | palgarvio | Owned by: | cboos |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.11.2 |
| Component: | version control/browser | Version: | 0.12dev |
| Severity: | normal | Keywords: | |
| Cc: |
Description
When creating a custom template to trac I found out that expand_dir.js show's buggy behaviour on table layouts.
When looking for parents, the script should only use the first one found, not all parents().
Here's a patch:
-
trac/htdocs/js/expand_dir.js
40 40 41 41 // handler for click event on the expander icons 42 42 window.toggleDir = function(expander, qargs) { 43 var tr = expander.parents("tr ");43 var tr = expander.parents("tr:first"); 44 44 var folderid = tr.get(0).id; 45 45 46 46 if ( tr.filter(".expanded").length ) { // then *fold*
Yes, I know table layouts should be avoided, but that's not the issue here, the issue is making the script work better/as expected.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.


