Page 1 of 1

Keep table groups expanded

Posted: 2020-02-25 07:14
by rlandto
What do I need to change to get all table groups expanded at startup?
I would like to keep empty table groups hidden.

I guess the answer might be in home.php, but I am not expert enough to get it.

Re: Keep table groups expanded

Posted: 2020-02-25 19:03
by pbottcher
Hi,

you can try adding to the hooks/header-extras.php:

Code: Select all

<?php $is_homepage = (basename($_SERVER['PHP_SELF']) === 'index.php' && !isset($_REQUEST['signIn'])); if ($is_homepage) { ?>
    <script>
        $j(function() {
             $j('.collapse').addClass('in');$j('.collapser').children('.glyphicon').toggleClass('glyphicon-chevron-right glyphicon-chevron-down');
        })
    </script>
<?php } ?>

Re: Keep table groups expanded

Posted: 2020-02-25 21:43
by rlandto
Hi pböttcher

Thx a lot for your reply.
It kinda works, but inverts the scene.
So the main table group is now colappsed, while the other ones are expanded.

Do you have a final hint how to expand all, but the empty ones?

Re: Keep table groups expanded

Posted: 2020-02-25 22:14
by pbottcher
Hi,

true, sorry, overlooked that.

Try not adding to the header, but the footer-extras.php the corrected version:

Code: Select all

<?php $is_homepage = (basename($_SERVER['PHP_SELF']) === 'index.php' && !isset($_REQUEST['signIn'])); if ($is_homepage) { ?>
    <script>
        $j(function() {
             $j('.collapse').not('.in,.navbar-collapse').addClass('in');$j('.collapser').not(':first').children('.glyphicon').toggleClass('glyphicon-chevron-right glyphicon-chevron-down');
        })
    </script>
<?php } ?>

Re: Keep table groups expanded

Posted: 2020-02-26 07:20
by rlandto
Awsome.
Works like a charme.
Thank you so much.