I'm speaking at OpenWorld 2017

Thursday, 1 March 2012

PeopleTools 8.52 popup prompts

A new feature in PeopleTools 8.52 are popup modal prompts.  These are automatically enabled wherever the PeopleCode PROMPT function is used.  You most often see this in Query Manager prompts.

One of the UI bugs we've found is that if the prompt contains a date field then when the user clicks the date picker the popup calendar is obscured.

This is targetted for patch 07 but if you can't wait for this then here's the fix. It is a customisation to a PeopleTools object but that's the nice thing about PeopleTools. When you need a fix and can't wait for the patch then you can generally fix it yourself.

Add this JavaScript code to HTML object PT_CALENDARSCRIPT at the end of function openDate_%FormName. This will adjust the size of the popup window AFTER the user clicks the calendar date picker.  I give all the credit for this code to Steve ....one of the best Javascript developers I know in the PeopleSoft community.

OXF_activeElem = document.activeElement.name;
var id = this.name.split("_")[1];
var OXF_obj = "ptModFrame_" + id;
var OXF_shad_frame = "ptMod_" + id;
var OXF_width = 0;
var OXF_height = 0;
if (typeof id !="undefined")
var OXF_Shad_Width = top.document.getElementById(OXF_shad_frame).scrollWidth;
var OXF_Shad_Height = top.document.getElementById(OXF_shad_frame).scrollHeight;
var OXF_elem = document.getElementsByName(OXF_activeElem)[0];
if(OXF_Shad_Width < (OXF_elem.offsetLeft + OXF_elem.scrollWidth+ document.getElementById("fullCalendar").scrollWidth + 30))
 OXF_width = OXF_elem.offsetLeft + OXF_elem.scrollWidth+ document.getElementById("fullCalendar").scrollWidth + 30;
else {OXF_width = OXF_Shad_Width; }//end if scrollWidth
if(OXF_Shad_Height < (OXF_elem.offsetLeft + OXF_elem.scrollWidth+ document.getElementById("fullCalendar").scrollWidth + 30))
 OXF_height = top.document.getElementById(OXF_obj).scrollHeight + document.getElementById("fullCalendar").scrollHeight ;
else {OXF_height = OXF_Shad_Height;}//end if scrollHeight
if(OXF_width != OXF_width || OXF_height != OXF_Shad_Height)
 MTop().ptDialog.resizeModalDialog(id, false, OXF_width, OXF_height);