Support Article
Custom CSS is not picked when invoked by openUrlInWindow
Summary
When the user is launching a pop-up from the UI screen, custom CSS is not applied. Launch custom portal >> Enter workobject in the home page’s search box and click search or press enter >> This opens the popup window without proper display of custom skin(This is non-working scenario). The screen distorted completely as CSS is not loading.
Refer the below screenshot for the non-working scenario:
When the same popup is launched from the Navigation menu, custom CSS is properly applied. Launch a menu from custom portal(This is working scenario which opens in a popup) >> Enter the work objectID and click search >> Popup window is displayed with custom CSS and work object.
Refer the below screenshot for the working scenario:
Error Messages
Not Applicable
Steps to Reproduce
Add an icon in one Section and launch the pop up through script by invoking openUrlInWindow.
Script snippet is as below:
<script>
function loadQV(CNO,CClass,ClassKey,QuickViewFlag,CSearch)
{ alert("loadQV called");
var winName = 'DashBoard';
var oSafeURL = new SafeURL();
oSafeURL.put('pyActivity','Embed-PortalLayout.RedirectAndRun');
oSafeURL.put('ThreadName','OpenPortalThreadTest');
oSafeURL.put('Location','pyActivity=Data-Portal.ShowSelectedPortal&portal=' + 'pyCaseManager'+ '&Name=pyCaseManager' + '&SkinPreviewName=' + 'developer' + '&bPurgeTargetThread= ' + 'true');
var uri = oSafeURL.toURL();
var Loc = uri.substr(uri.indexOf("?")+1);
openUrlInWindow(uri,winName);
}
Root Cause
From the custom function, the activity invoked is custom Harness. This activity has a step to show another custom harness. External CSS files are referred here.
Resolution
Check/enabled the option ‘Generate Harness specific CSS’ and found the use case was working.
Published December 2, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.