Edgewall Software
Modify

Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#7559 closed defect (fixed)

expand_dir.js is buggy on table layouts

Reported by: Pedro Algarvio, aka, s0undt3ch Owned by: Christian Boos
Priority: normal Milestone: 0.11.6
Component: version control/browser Version: 0.12dev
Severity: normal Keywords:
Cc: Martin.vGagern@… Branch:
Release Notes:
API Changes:
Internal Changes:

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 (0)

Change History (6)

comment:1 by Christian Boos, 16 years ago

Owner: set to Christian Boos

Requested again in #7634

comment:2 by Christian Boos, 16 years ago

Resolution: fixed
Status: newclosed

Suggested fix applied in r7543.

comment:3 by Martin.vGagern@…, 15 years ago

Cc: Martin.vGagern@… added

How about the expander.parents("td") in the fetch part of the function? I guess that this should receive the same treatment.

Are there any plans to merge this fix into 0.11-stable?

comment:4 by Christian Boos, 15 years ago

Resolution: fixed
Status: closedreopened

The milestone says 0.11.2, but apparently this was only committed on trunk.

comment:5 by Christian Boos, 15 years ago

Milestone: 0.11.20.11.6
Resolution: fixed
Status: reopenedclosed

Fixed by r8728 and r8729 on 0.11.6dev.

The second was propagated on trunk part of r8730.

comment:6 by Martin.vGagern@…, 15 years ago

Thanks a lot!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.