Currently the module implements a select list which only allows you to select a single class. We should allow users to select multiple classes via a checkbox list or multi select list.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | classy_paragraphs-select_multiple_classes-2424795-7.patch | 11.49 KB | dabbor |
| #5 | classy_paragraphs-select_multiple_classes-2424795-5.patch | 1.81 KB | dabbor |
Comments
Comment #1
dabbor commentedAttaching patch that allowes multiple CSS classes to be applied entities by modified the logic to add all classes to the paragraph item.
The field cardinality must be set unlimited in order to make the multiple classes to work (to get multi select list widget).
Comment #2
dabbor commentedComment #4
dabbor commentedFixed patch to have relative diff paths.
Comment #5
dabbor commentedFixed patch comment number :D
Comment #6
ivan zugec commentedLeave this return in.
Change to "Get class names from paragraph item."
- Currently the only widget available on the CP field is "Select list", we should also allow the checklist widget.
- It'll be good to write a test for the multi classes.
Comment #7
dabbor commentedAttaching modified patch.
Changes:
Wrote a test for the multi classes (modified classy_paragraphs_test feature too) + refactored classy_paragraphs.test a little bit.
Comment #8
dabbor commentedComment #9
ivan zugec commentedGood work.
Comment #10
ivan zugec commentedComment #12
ivan zugec commentedCode committed.
Thanks.
Comment #14
groovedork commentedI haven't played with this hands-on yet, so take this with a lot fo salt, but I am wondering: is heaping classes on top of each other a good idea from a usability standpoint? Front-end developers understand how different CSS stylings can work together, but a layman probably doesn't. Adding just a single 'visual accent' to a paragraph might be easier to conceptualize.