Edgewall Software

Ticket #7559 (closed defect: fixed)

Opened 5 months ago

Last modified 4 months ago

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

     
    4040 
    4141  // handler for click event on the expander icons 
    4242  window.toggleDir = function(expander, qargs) { 
    43     var tr = expander.parents("tr"); 
     43    var tr = expander.parents("tr:first"); 
    4444    var folderid = tr.get(0).id; 
    4545 
    4646    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

Changed 4 months ago by cboos

  • owner set to cboos

Requested again in #7634...

Changed 4 months ago by cboos

  • status changed from new to closed
  • resolution set to fixed

Suggested fix applied in r7543.

Add/Change #7559 (expand_dir.js is buggy on table layouts)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cboos. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.