Skip to content

Table-Images for “child-link” buttons

By default, the so called "child link" buttons appear at the top right of detail views, if configured. The new replaceIcon function changes the look of that toolbar.

Using the new replaceIcon function you can replace the default glyphicon by the matching table-image automatically with one line of code. Additionally the buttons will be moved left which leads to an identical order according to your model.

Javascript Code

1
2
3
4
5
// file: hooks/TABLENAME-dv.js
AppGiniHelper.Defaults.dv_childrenLinks_replaceIcons = true; // enables this feature

var dv = AppGiniHelper.DV;
dv.getChildrenLinks().replaceIcons();

Tip

If you, like me, want to have identical design in all detail views, instead of applying the changes per detail view, you can also change it in global hooks/header-extras.php for all detail views at once.

1
2
3
4
5
6
<!-- file: hooks/header-extras.php -->
<script>

AppGiniHelper.Defaults.dv_childrenLinks_replaceIcons = true; // enables this feature
AppGiniHelper.DV.getChildrenLinks().replaceIcons();
</script>

Note

Please note If you place Javascript code in a PHP file (like hooks/ header-extras.php) you will have to wrap your javascript code in <script>...</script> tags.

See also: