dev/core#1547 Add DT_RowClass CSS classes to nested group markup #16359
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
The Group search form template does not use jquery.datatables for loading child rows. That might be ok, since it's working without it, but there are CSS classes in each
response.data.DT_RowClass
and maybe other properties that are not being injected into the template.This makes it difficult to distinguish nested groups from their parents and subsequent non-nested groups, since the CSS class
crm-group-child
(which actually has CSS for visual nesting) is being added to theDT_RowClass
attribute in PHP code, but that is not added to the actual markup.Before
Nested groups are not indented in the group list.
After
CSS for nesting child groups is now applied (since the CSS class is there) and nested groups are indented in the group list.
Technical Details
This adds all CSS classes in
DT_RowClass
to the actual markup, so that the classcrm-group-child
, which is added to that property inCRM_Contact_BAO_Group::getGroupList()
gets actually printed to the markup.Comments
Using jquery.datatables for loading child groups would be the better solution, as already noted in the
TODO
in the code.