The "toolbar_buttons" option of the Title Preset allows to specify which toolbar buttons are available on the template, that uses that Title Preset. By having all toolbar buttons declared upfront it becomes possible to individually hide toolbar button by specifying their names in the $remove_buttons
array in the matching interface preset file.
For example the "users_list" title preset looks like this:
users_config.php
array( 'prefixes' => array('u_List'), 'format' => "!la_title_Users!", 'toolbar_buttons' => array('new_item', 'edit', 'delete', 'setprimary', 'approve', 'decline', 'frontend_mail', 'e-mail', 'export', 'view', 'dbl-click'), ),
and the corresponding code fragment from interface preset looks like this:
users_u.php
$remove_buttons = array( // list of users; section: Users Management -> Users 'users_list' => array(/*'new_item', 'edit', 'delete', 'approve', 'decline',*/ 'frontend_mail', /*'e-mail',*/ 'export', /*'view', 'dbl-click'*/), );
When title preset is missing "toolbar_buttons" array, then no matter what you specify in interface preset toolbar buttons won't be hidden.
Solution
- for each interface preset (there are 54 of them):
- open associated unit config file
- for title preset ensure, that "toolbar_buttons" array is present and it's contents matches actual toolbar buttons on template, where it's used
- if title preset is used on a grid, then also add 'dbl-click' to the "toolbar_buttons" array to allow double click action in that grid