This topic is locked

Initially Collapse Resource Group on the Resource Calendar template

6/9/2021 1:43:43 PM
ASPRunner.NET General questions
R
rlmartinez author

Is there a way to set the Resource Calendar to initially collapse resource groups? I have close to 20 resource groups and several resources within each group, so this makes the user scroll in order to view all resources. It would be helpful if the resource groups could be set to initially collapse when accessing the Resource Calendar page.

Here is the resource calendar expanded by default.
img alt

Here is what I am looking for.

img alt

I'd appreciate any help with this.

Robert

admin 6/9/2021

We do not have this kind of functionality built-in but you can add the following code to Javascript OnLoad event of the page in question and it will do the job for you:

$("a[id^=grminus]").click();

R
rlmartinez author 6/9/2021

I tried adding the code to the Javascript OnLoad event for the Resource Calendar list page but it failed to change the setting. Here is where I place the code.

img alt

admin 6/9/2021

Try moving that line of code to lines 14 or 16.

R
rl74martinez 7/16/2021

I moved to line 14, did a rebuild and it failed to show as collapsed. I got the same result when I moved the code to line 16, too.