Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

How to hide a section

Highlighted
VarunS
Super Collector

How to hide a section

Can we hide a section on request type at any particular status using rules or status dependencies or any other way.
5 REPLIES
Alexander (Sua)
Regular Collector

Re: How to hide a section

There are no documented ways to do it
We thought about it also, but postponed for a while

I see just one way - to develop own jsp to generate html page
Cindy Ramberg
Regular Collector

Re: How to hide a section

Hi,

We have recently opened an HP case about hiding a section. I'll let you know if an Enhancement Request is logged.

cindy
Alexander (Sua)
Regular Collector

Re: How to hide a section

Cindy, could you give case number in order to subscribe for changing its status?

Re: How to hide a section

We are using UI Rules to accomplish.

Following is what was added to our RequestRulesUserLibrary.js file.

function expandCollapseSection(sectionName) {
if (isSectionExpanded(sectionName)) {
collapseSection(sectionName);
} else {
expandSection(sectionName);
}
}

function collapseSection(sectionName) {
if (!isSectionExpanded(sectionName)) {
return;
}
}

function expandSection(sectionName) {
if (isSectionExpanded(sectionName)) {
return;
}
}

function isSectionExpanded(sectionName) {
result = false;
var imageElement = document.getElementById('IMAGE_' + sectionName);
if (imageElement != null) {
result = (imageElement.src== collapseImg.src);
}
return result;
}

To use the above UI Rule, you just need to know which section you want to expand or collapse, and enter its value.

Below is an example where we are expanding one section and collapsing three others:

expandSection('EC_SUBSECTION_EC_REQUEST_DETAILS_4'); collapseSection('EC_SUBSECTION_EC_REQUEST_DETAILS_3'); collapseSection('EC_SUBSECTION_EC_REQUEST_DETAILS_2'); collapseSection('EC_SUBSECTION_EC_REQUEST_DETAILS_1');
Alexander (Sua)
Regular Collector

Re: How to hide a section

This is good idea, but it allows just collapse sections not to hide it/them from the page
//Add this to "OnDomLoad" event