Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure which colums should not be sorted #123

Open
coudot opened this issue May 29, 2024 · 1 comment
Open

Configure which colums should not be sorted #123

coudot opened this issue May 29, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@coudot
Copy link
Member

coudot commented May 29, 2024

Following discussion in #122 I propose as first workaround to be able to configure which columns should not be sorted

It implies to add some DOM classes to each columns, and to modify datatables configuration to disable sorting for theses classes.

@coudot coudot added the enhancement New feature or request label May 29, 2024
@coudot coudot added this to the 0.6 milestone May 29, 2024
@coudot
Copy link
Member Author

coudot commented May 29, 2024

Dev notes:

  • templates/listing_table.tpl
<thead>
    <tr>
        <th class="hidden-print nosort">&nbsp;</th>
        {foreach $listing_columns as $item}{$type=$attributes_map.{$item}.type}<th class="type-{$type}">{$msg_label_{$item}}</th>{/foreach}
    </tr>
</thead>
  • templates/footer.tpl
      "aoColumnDefs": [
        { "bSortable": false, "aTargets": ['nosort', 'type-int'] }
      ],

@coudot coudot self-assigned this Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant