Stump the Panel » End Users and Information Workers

Collapse all in Document library view

(3 posts)
  1. We have a document library with a view using a grouped by.

    We would like to make it possible to collapse all expanded records with one click.

    Does anyone have an idea if this is possible and how we can achieve this.

    Regards,
    Erwin

    Posted 4 weeks ago #
  2. I fix everything with jQuery these days because, well, I can :)

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    function closeGroups() {
    	$("img[src='/_layouts/images/minus.gif']").parent().click();
    }
    </script>
    <a href="#" onClick="this.href='javascript:closeGroups()'">Close All Groups</a>
    Posted 4 weeks ago #
  3. Thanks, works like a charm.

    Regards,
    Erwin

    Posted 4 weeks ago #

RSS feed for this topic

Reply

You must log in to post.