Problem/Motivation
Given that Tablefield supports integration with Filmanet Group's Tablesaw through the Responsive Tables Filter module, it would be nice to provide extra configuration options, like selecting the Tablesaw mode, to site builders and content managers using tablefield.
Proposed resolution
The attached patch is a starting point that adds Tablesaw's Stack, Column Toggle, and Swipe modes to the global default tablefield settings.
Remaining tasks
- Determine where this should be controlled in field settings or on each tablefield
- Provide ability to override default based on decision above
- Add tests
User interface changes
In my opinion, this should be controlled on each tablefield. We should provide another group (underneath the 'Change Columns...' and 'Import CSV...' options) that allows a content manager to select the type of Tablesaw mode via radios or a dropdown.
API changes
Data model changes
A field might need to be added to the database, depending on implementation.
| Comment | File | Size | Author |
|---|---|---|---|
| tablefield--configurable-tablesaw-mode.patch | 3.76 KB | rwanth |
Comments
Comment #2
lolandese commentedThanks for this.
As an initial patch has been posted, there is something to review.
Comment #3
lolandese commentedApplies cleanly:
Some Codesniffer issues:
On an existing site with the Tablefield module already enabled we get for example:
<table id="tablefield-node-28-field_table-0" class="tablefield tablesaw tablesaw-" data-striping="1">Ideally, this is a setting to put under "Manage display" settings with optionally allowing to override it per individual table (permission-based).