width setting on the 5250 div

Use this board to ask questions or have discussions with other Genie users.
Post Reply
esdaled
Profound User
Posts: 72
Joined: Fri May 08, 2009 2:43 pm
First Name: David
Last Name: Esdale
Company Name: Guardian General Insurance
City: Port of Spain
State / Province: Outside Canada/USA
Country: Trinidad and Tobago
Location: Trinidad
Contact:

width setting on the 5250 div

Post by esdaled »

We have a ProfoundUI display file which is being shown as part of a Genie macro.

The display has a horizontal scroll bar shown at the bottom of the page because the width setting on the 5250 div is being set to 17138px as show below.

Code: Select all

<div class="insideDiv" style="position: relative; width: 17138px;" id="5250" tabindex="0">
When other ProfoundUI display files are shown the width is set to 942px.

What controls the width in the 5250 div?
User avatar
Brian
Profound Logic Staff Member
Posts: 286
Joined: Thu Apr 14, 2011 10:23 am
First Name: Brian
Last Name: May
Company Name: Profound Logic Software
Contact:

Re: width setting on the 5250 div

Post by Brian »

That honestly depends on the skin being used. Are you using a custom skin or one that was shipped with the product?
esdaled
Profound User
Posts: 72
Joined: Fri May 08, 2009 2:43 pm
First Name: David
Last Name: Esdale
Company Name: Guardian General Insurance
City: Port of Spain
State / Province: Outside Canada/USA
Country: Trinidad and Tobago
Location: Trinidad
Contact:

Re: width setting on the 5250 div

Post by esdaled »

We are using a custom skin which was based on the blue skin.

I have attached our start.html page
Attachments
start.zip
(1.03 KiB) Downloaded 185 times
User avatar
Brian
Profound Logic Staff Member
Posts: 286
Joined: Thu Apr 14, 2011 10:23 am
First Name: Brian
Last Name: May
Company Name: Profound Logic Software
Contact:

Re: width setting on the 5250 div

Post by Brian »

In the original "Blue" skin, there was a section of JavaScript code in custom.js that controls this. The original code was as follows:

Code: Select all

// Customize 132x27 mode
  if (pui.genie.displaySize==132 && !pui.genie.config.useAjax) {
    pui.genie.middleDiv.style.height = "640px";
    getObj("5250").style.position = "absolute";
    var position = (screen.width - 1060) / 2;
    if (position < 0) position = 0;
    getObj("5250").style.left = position + "px";
  }
  else {
    if (pui.genie.middleDiv != null) {
      pui.genie.middleDiv.style.height = "";
      pui.genie.middleDiv.style.width = "";
      getObj("5250").style.position = "relative";
      getObj("5250").style.left = "";
      getObj("5250").style.width = "";
    }
  }
It is likely that some of your customizations have thrown this calculation off somehow. I would recommend finding this code and debugging the JavaScript to diagnose the issue.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: width setting on the 5250 div

Post by Scott Klement »

I don't see where this code is setting the width of the 5250 div? I see it checking 'screen.width' and setting the height and left positions, but not the width. Am I missing something?
User avatar
Brian
Profound Logic Staff Member
Posts: 286
Joined: Thu Apr 14, 2011 10:23 am
First Name: Brian
Last Name: May
Company Name: Profound Logic Software
Contact:

Re: width setting on the 5250 div

Post by Brian »

Ah, you are correct. I misread it. It is setting the left positioning, not the width. Sorry for the misinformation. That's what I get for trying to answer a question while on the phone.

It is likely being set in the JS somewhere.
esdaled
Profound User
Posts: 72
Joined: Fri May 08, 2009 2:43 pm
First Name: David
Last Name: Esdale
Company Name: Guardian General Insurance
City: Port of Spain
State / Province: Outside Canada/USA
Country: Trinidad and Tobago
Location: Trinidad
Contact:

Re: width setting on the 5250 div

Post by esdaled »

I may be wrong but I don't see anything in our js.

On thing that I have noticed is that our start page wraps the 5250 inside a "middle" div. However, the id of the middle div is being changed to the record format name of the last genie screen displayed (Although if the last genie screen displayed was WRKSPLF it is set to "{Unnamed-Screen}").

I do see some obfuscated code in genie.js which does a getElementByID("middle"), This may be related as this div also has the width set to 17138px.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: width setting on the 5250 div

Post by Scott Klement »

genie.js does the following:

if the pui.genie["setContainerWidth"] variable is true (true is the default) then it will:

a) When rendering a Rich Display, set the width to that of the rightmost edge of the rightmost DOM element. The logic to set the width when rendering a Rich Display can be read in the open source version of Profound UI by reading the "pui.getDimensions" routine in runtime/dspf/render.js, online here:
https://github.com/ProfoundLogic/profou ... /render.js

b) When rendering a 5250 display, set the width to the pui.genie["containerWidth"] configh variable. This is "" (empty) by default, but can be overridden in a customer's script.
esdaled
Profound User
Posts: 72
Joined: Fri May 08, 2009 2:43 pm
First Name: David
Last Name: Esdale
Company Name: Guardian General Insurance
City: Port of Spain
State / Province: Outside Canada/USA
Country: Trinidad and Tobago
Location: Trinidad
Contact:

Re: width setting on the 5250 div

Post by esdaled »

I have found the problem. The ProfoundUI rich display file is language enabled and one of the labels was padded on the right with spaces in the puitransp file. Removing the trailing spaces in the translation file solved the problem. The width of the display is now 942px as expected.

We have built our own interface for maintaining the puitransp file and this label may have been created when we were developing the interface and not trimming the entered values.

Thanks,

Dave
User avatar
Brian
Profound Logic Staff Member
Posts: 286
Joined: Thu Apr 14, 2011 10:23 am
First Name: Brian
Last Name: May
Company Name: Profound Logic Software
Contact:

Re: width setting on the 5250 div

Post by Brian »

Glad you found it. That is not somewhere I would have thought to check. I will add it to my list of gotchas.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest