Difference between revisions of "Show Count on All Usergroups"

From UnionCloud Support
Jump to: navigation, search
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:
  
 
You need to do this from the console page on the developers toolkit (Press F12 in chrome, other browser are available).
 
You need to do this from the console page on the developers toolkit (Press F12 in chrome, other browser are available).
<code>
+
<syntaxhighlight lang="javascript" line='line'>
<nowiki>
+
$('.show-member-count').click();
$('.show-member-count').click();
+
</syntaxhighlight>
</nowiki>
+
 
</code>
 
  
 
Or you can type paste the content below into the url of the page.
 
Or you can type paste the content below into the url of the page.
  
<code>
+
<syntaxhighlight lang="javascript" line='line'>
<nowiki>
 
 
javascript:$('.show-member-count').click();
 
javascript:$('.show-member-count').click();
</nowiki>
+
</syntaxhighlight>
</code>
 
  
 
Courtesy of Liam McDaid - York University Students' Union
 
Courtesy of Liam McDaid - York University Students' Union

Latest revision as of 15:00, 29 March 2017

JavaScript snippet to Show Count of Usergroups on Dashboard Pages

If you are looking at one of the Admin Dashboard pages that shows a list of many different UserGroups, you will notice that they all have a [Show Count] link, to view the number of members in that group.
UnionCloud is setup this way to save resources, and increase page load speed. It might only seem like a small thing performing those calculations, but imagine loads of union staff all on their own dashboards, performing these calculations all the time, every time they refreshed the page.

As it happens, there is a JavaScript snippet you can use to show the count on any page you are currently on;

You need to do this from the console page on the developers toolkit (Press F12 in chrome, other browser are available).

1 $('.show-member-count').click();


Or you can type paste the content below into the url of the page.

1 	javascript:$('.show-member-count').click();

Courtesy of Liam McDaid - York University Students' Union