Accordion expand/collapse option
Submitted by Wullie on Wed, 01/11/2017 - 12:04
Forums:
Would it be possible to includeon the Accordion resource the option to have the panels expanded or collapsed, or even just a single option to have the first panel expanded?
Summary:
Auto-expand accordion panel
Content types:
Issue Status:
icc
Thu, 01/12/2017 - 11:53
Permalink
This sounds reasonable and
This sounds reasonable and would probably be easy to achieve. Thank you for your suggestion.
nmillin
Fri, 02/03/2017 - 17:07
Permalink
first stab
Hi,
I took a stab at doing this. I've attached a patch that does the following:
I made sure the defaults stay as it currently is so nothing breaks (all collapsed and only 1 panel open at a time).
Please let me know what you think. Thanks.
-Nate
PS - I'm new to H5P's code, so please be gentle :)
nmillin
Fri, 02/03/2017 - 17:11
Permalink
PPS - I changed the if (self.
PPS - I changed the
code because I had trouble understanding it.
was easier for me to understand and step through. There may be reasons why changing this is bad. Thanks.
tim
Sun, 02/05/2017 - 16:58
Permalink
Nice work nmillin, would you
Nice work nmillin, would you be able to create a pull request for this on the accordion repository:
https://github.com/h5p/h5p-accordion
If you need any assistance, I can guide you through the process
nmillin
Mon, 02/06/2017 - 18:54
Permalink
Sorry. I replied to the wrong
Sorry. I replied to the wrong thread. https://github.com/h5p/h5p-accordion/pull/7
tomaj
Tue, 02/07/2017 - 08:59
Permalink
Created review task
Hi nmillin,
I created a Jira task, to reivew your pull request. You can follow it here.
- Tom
nmillin
Mon, 02/06/2017 - 18:53
Permalink
Sure Tim. https://github.com
Sure Tim. https://github.com/h5p/h5p-accordion/pull/7
Let me know if I didn't do a proper pull request. Usually I'm submitting Drupal patches which is a different process. Thanks.
tomaj
Tue, 02/07/2017 - 09:22
Permalink
Awesome!
See my answer above! Always awesome to see pull requests from the community! +1
- Tom