It would be useful to add a new drop-down called "Style" to the eb image field collection.
The field called "Style" (field_eb_image_style) should use the List (text) field. The drop-down should be populated via the allowed values settings. For example (default value):
array('allowed_values' => array(
'tile' => 'Tile',
'repeat' => 'Repeat',
));
If repeat has been selected, then the class .eb-image-repeat should be added to the paragraph entity using JS. Site builders should be allowed to add extra items to field_eb_image_style. The selected style should be added to entity as a class: ".eb-image-[SELECTED_STYLE]"
Comments
Comment #1
dabbor commentedComment #2
dabbor commentedHere's a patch with implementation.
Comment #3
dabbor commentedComment #4
ivan zugec commentedWe shouldn't hard code the settings. Pass it via a variable.
We should sanitise the value.
Rename the functions to:
Comment #5
dabbor commentedProviding new patch.
Changes:
Comment #6
dabbor commentedComment #8
ivan zugec commentedThanks. It's been committed.