Via system configuration it is possible to customize the default configuration of these 2 tabluar views (for other tabular views this could also be enabled with some development).It is possible to adjust the column width, the column order and if a column is hidden or visible by default
Also each custom change made by the users, will be saved as user specific configuration and used each time the user uses translate5.
Setting the visibility
To define, if a column should be hidden, use the hidden attribute as shown in the example above. If you want to show it instead by default, set hidden to false.
Setting width
To set the width, use the width attribute as shown in the example above. Please note, that some columns have a defined minimum width. Where this is the case, a width that is set in the config and that is smaller than the minimum width set in the application itself will be ignored.
Setting the order
For defining the order of the columns, all columns that exist in the table must be listed in the configuration. If you do not list all columns in your configuration, only the visibility of the listed columns and their width will be adjusted but the order of your configuration will be irrelevant.
How to build a configuration the easy way (Task overview example)
- Open the tabular view in question in translate5
- Adjust its configuration in a way that it suits your needs
- Open the console in Firefox or Chrome by pressing F12
- Grid configuration
Get configuration string for multiple grids by executing the following function (the output of this function will be ready to use grid configuration string):- Editor.app.getGridState();
(be careful: if the result gives back configurations other than #adminUserGrid and #adminTaskGrid, you have to delete them from the result before applying it to the database, because so far only these 2 grids are supported for DB configuration)
- For the task management table: Ext.ComponentQuery.query('#adminTaskGrid')[0].getState()
- Editor.app.getGridState();
- Copy the result and reformat it in a way that it fits the code example shown below
- Open the database table Zf_configuration for editing and search for the row where name = "runtimeOptions.frontend.defaultState.adminTaskGrid".
- Set the value of this row to a JSON object analogous to the example shown below
- The same procedure can be done for the User overview table.
- Make your table adjustment and get the table state configuration using: Ext.ComponentQuery.query('#adminUserGrid')[0].getState()
- The received value should be inserted in runtimeOptions.frontend.defaultState. adminUserGrid Zf_configuration.
Code Block |
---|
// On this example, changes will be applied over 'adminTaskGrid' and 'adminUserGrid' // the value should be applied for Zf_configuration with name "runtimeOptions.frontend.defaultState.adminTaskGrid" //example: column configuration with column order and hidden columns included //NOTE: don't add the comments in your column configuration { "#adminUserGridcolumns":[ { "columnsid": [{ "workflowStepName" }, { "id": "targetLanguage"taskName" }, { "widthid": 100"taskGridActionColumn", "hidden":false, "flex":null }, { "id":"customerId", "hidden":true }, { "id":"taskNr", "sourceLanguage", "hidden":true }, { "widthid": 100 "state" }, { "id":"userState" }, { "id":"userAssocDeadline" }, { "id":"wordCount", "roleshidden":true }, { "id":"segmentFinishCount" }, { "id":"segmentCount" }, { "id":"fileCount" "gender" }, { "id":"relaisLang", "hidden":true }, { { "id": "surNamereferenceFiles", "hidden":true }, { { "id": "emailterminologie", "hidden":true }, { "id":"sourceLang" }, { "id":"userCount", "login"hidden":true }, { "id":"taskassocColumn" }, { "id":"targetLang" }, { "id": "firstNameedit100PercentMatch", "hidden":true }, { { "id": "userGridActionColumnemptyTargets", }] "hidden":true }, //example: column configuration without column order included //NOTE: don't add the comments in your column configuration { "id":"lockLocked", "hidden":true }, { "#adminTaskGridid":"pmName" }, { "columnsid": [{"orderdate" }, { "id":"id", "taskName"hidden":true }, { "id":"taskGuid", "hidden": true }, }, { { "id":"workflow", "taskGuid" "hidden":true }, { "hiddenid":"enableSourceEditing", true }] "hidden":true } ] } |