Reviewed & tested by the community
Project:
jQuery expander
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Mar 2016 at 21:08 UTC
Updated:
11 Aug 2019 at 20:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
karens commentedI wanted to try this out for a Drupal 8 site, so I did a D8 port of this module. I've attached it if anyone else wants to try it out or the maintainer wants to use it. It's identical to the D7 version except I added a couple more setting from the library to allow you to control the classes on the Expand and Collapse links.
Comment #3
karens commentedMarking this "Needs review"
Comment #4
karens commentedI moved the code to Github so it can be updated if necessary until some action is taken here. There is no intention to maintain it there, just to make the code available until this module is ported. See https://github.com/karens/jquery_expander.
Comment #5
karens commentedWith the additional settings, it is possible to style the expand/collapse links as buttons, add icons, etc. For instance, using Bootstrap, you can use the following settings for fancy buttons:
Comment #6
jeffschulerThis is working great KarenS. Thanks!
It'd be great to have the library installation done with composer, but it works fine manually. RTBC; let's get this up.
Comment #7
mattjones86I'm seeing lots of warnings in my logs because this theme hook is not defined in the module file:
https://github.com/karens/jquery_expander/blob/master/src/Plugin/Field/F...
Is it supposed to be? Or is it supposed to be using a different theme hook?
Comment #8
jeffschuler@mattjones86: You can remove that line:
'#theme' => 'jquery_expander',as the render array is just using#markup.Comment #9
jeffschulerMoving back to RTBC, in case a maintainer has an eye on this queue.
Looks like these are other module options: