#2932 closed enhancement (fixed)
Accordion event for start of animation
Reported by: | nostrademons | Owned by: | paul |
---|---|---|---|
Priority: | major | Milestone: | 1.6rc2 |
Component: | ui.accordion | Version: | 1.5b4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Could we get an event that's fired at the start of the accordion animation, instead of being fired as the animation completes like the existing accordionchange?
A couple use cases:
1.) Dynamically creating the contents of the accordion pane on-demand, in response to accordionchange events. Using the existing accordionchange event, this results in the animation being fired, then the contents being filled in after it completes. With a start event, the contents would be filled in first and then animated.
2.) Ensuring that an area of the screen is visible & properly setup whenever the appropriate accordion tab is open. For example, I have an event handler - triggered by something other than the accordion - that tries to activate a certain pane inside the accordion and then references components that are built only in response to that accordion pane being activated. Since accordionchange fires after the animation, it won't have executed when the call to accordion('activate') completes, and so the widgets I'm referencing in the event handler don't yet exist.
I've attached a patch that adds an 'accordionchangestart' event which fires before the animation (or before the 'accordionchange' event in the case of a non-animated accordion), which is adequate for my purposes and shouldn't disturb anything else.
Change History (7)
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
Milestone: | 1.5 → 1.5.2 |
---|
comment:3 Changed 15 years ago by
Milestone: | 1.5.2 → 1.6b |
---|
comment:4 Changed 14 years ago by
Milestone: | 1.6b → 1.6 |
---|---|
Owner: | changed from joern.zaefferer to paul |
Status: | new → assigned |
comment:5 follow-up: 6 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Implemented in r692.
comment:6 Changed 14 years ago by
comment:7 Changed 14 years ago by
Milestone: | 1.6 → 1.6rc2 |
---|
Attachment didn't work, I got a "Permission denied: '/opt/trac/attachments/ticket'" Trac error when adding it. The change was one line added to the beginning of toggle(), after the var declarations but before the options.running assignment: