Moving everything over to the left border
-
- Profound User
- Posts: 56
- Joined: Tue Jan 20, 2015 4:28 pm
- First Name: Raymond
- Last Name: Marsh
- Company Name: Cracker Barrel Old Country Sto
- Phone: 615-235-4215
- Address 1: PO Box 787
- City: Lebanon
- State / Province: Tennessee
- Zip / Postal Code: 37088
- Country: United States
- Contact:
Moving everything over to the left border
Actually I believe I do need to move everything over to the left.
This is how the profound screen looks when framed in the company intranet page. The left hand border that lines things up nicely is -160
Note: I did have it rolled up a bit so the top is cut off. That lines up fine on the initial load.
This is how the profound screen looks when framed in the company intranet page. The left hand border that lines things up nicely is -160
Note: I did have it rolled up a bit so the top is cut off. That lines up fine on the initial load.
-
- 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: Moving everything over to the left border
Hi Ray,
In the hybrid skin's custom.js file, you'll find a function named hybridSkin.resizeArea which is calculating the position of this based on the window's width.
You'd need to adjust those calculations based on your new setup.
In the hybrid skin's custom.js file, you'll find a function named hybridSkin.resizeArea which is calculating the position of this based on the window's width.
Code: Select all
hybridSkin.resizeArea = function() {
if (pui.genie.middleDiv != null) {
var div5250 = getObj("5250");
if (div5250 != null) {
var windowWidth = pui.getWindowSize().width;
if (pui.genie.displaySize == 132) {
pui.genie.middleDiv.style.height = "640px";
div5250.style.position = "absolute";
var position = (windowWidth - 950) / 2;
if (position < 180) position = 180;
div5250.style.left = position + "px";
}
else {
pui.genie.middleDiv.style.height = "560px";
div5250.style.position = "absolute";
var position = (windowWidth - 620) / 2;
if (position < 180) position = 180;
div5250.style.left = position + "px";
}
}
}
}
-
- 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: Moving everything over to the left border
This resizeArea function isn't my code, so I don't know 100% how it works, but from looking at the code, it looks like it's trying to center the screen within your browser window. So it gets the width of the window (windowWidth variable) and subtracts the size of the 5250 screen (which is hardcoded here at 950 in 132 column mode vs 620 in 80 column mode) and divides the result by 2 to center it.
It then checks to see if the position it calculated is <180. This is presumably to make space for the link panel on the left, it wants to save 180 pixels for that panel -- so if it's less than 180, it makes it 180, so there's still space.
So I'm thinking in your case, you want it to be centered but not reserve space on the left.. So you would eliminate both lines that do this:
Just comment those out and it should no longer reserve space for the panel on the left. Let me know if that works for you.
It then checks to see if the position it calculated is <180. This is presumably to make space for the link panel on the left, it wants to save 180 pixels for that panel -- so if it's less than 180, it makes it 180, so there's still space.
So I'm thinking in your case, you want it to be centered but not reserve space on the left.. So you would eliminate both lines that do this:
Code: Select all
if (position < 180) position = 180;
-
- Profound User
- Posts: 56
- Joined: Tue Jan 20, 2015 4:28 pm
- First Name: Raymond
- Last Name: Marsh
- Company Name: Cracker Barrel Old Country Sto
- Phone: 615-235-4215
- Address 1: PO Box 787
- City: Lebanon
- State / Province: Tennessee
- Zip / Postal Code: 37088
- Country: United States
- Contact:
Re: Moving everything over to the left border
Thank you Scott. I will give that a try and let you know you how it works.
-
- Profound User
- Posts: 56
- Joined: Tue Jan 20, 2015 4:28 pm
- First Name: Raymond
- Last Name: Marsh
- Company Name: Cracker Barrel Old Country Sto
- Phone: 615-235-4215
- Address 1: PO Box 787
- City: Lebanon
- State / Province: Tennessee
- Zip / Postal Code: 37088
- Country: United States
- Contact:
Re: Moving everything over to the left border
That did not work, Scott. Didn't seem to affect anything.
-
- 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: Moving everything over to the left border
Hi Ray,
I think, in order to help you further, I'm going to need a copy of your code so I can try it out myself, debug it, etc.
Can you go into your IFS and find the /www/PROFOUNDUI/htdocs/profoundui/userdata/genie skins/YOUR-SKIN folder? (replace 'YOUR-SKIN' with the name of your Genie skin.) Zip up this folder and send it to me. (You can e-mail it to support@profoundlogic.com if it's too hard to upload here.)
I'll also need a JSON dump of the screen where you're trying to make this work. You can get that by pressing Ctrl-F9, the browser will ask you to download a file named 'json.txt', this is the JSON dump that I need.
Once I have both the zipped skin and json.txt file I can set it up on my server and try it out, then I can debug it and (hopefully) advise you further.
Thanks!
I think, in order to help you further, I'm going to need a copy of your code so I can try it out myself, debug it, etc.
Can you go into your IFS and find the /www/PROFOUNDUI/htdocs/profoundui/userdata/genie skins/YOUR-SKIN folder? (replace 'YOUR-SKIN' with the name of your Genie skin.) Zip up this folder and send it to me. (You can e-mail it to support@profoundlogic.com if it's too hard to upload here.)
I'll also need a JSON dump of the screen where you're trying to make this work. You can get that by pressing Ctrl-F9, the browser will ask you to download a file named 'json.txt', this is the JSON dump that I need.
Once I have both the zipped skin and json.txt file I can set it up on my server and try it out, then I can debug it and (hopefully) advise you further.
Thanks!
-
- Profound User
- Posts: 56
- Joined: Tue Jan 20, 2015 4:28 pm
- First Name: Raymond
- Last Name: Marsh
- Company Name: Cracker Barrel Old Country Sto
- Phone: 615-235-4215
- Address 1: PO Box 787
- City: Lebanon
- State / Province: Tennessee
- Zip / Postal Code: 37088
- Country: United States
- Contact:
Re: Moving everything over to the left border
Scott, I emailed the files to you.
-
- 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: Moving everything over to the left border
I'm looking at this, and it no longer seems to be reserving space for the panel on the left.
However, it is set up to center the screen across the browser window. Is that what you're looking to change? You want it on the left instead?
If so, try this:
1) In custom.js,find the afterLoad() function and comment-out the calls to hybridSkin.resizeArea().
Right now it looks like this:
Change it to:
2) Save your changes to custom.js
3) In start.html, find the middleDiv and remove the 'centered' class.
Right now it's this:
Change it to this:
4) Save your changes to start.html
5) In a Genie session, click the 'Refresh' button on the design toolbar to force the browser to re-load the custom.js and start.html files.
That should stop it from centering the 5250 screen across the browser window if that's what you need.
However, it is set up to center the screen across the browser window. Is that what you're looking to change? You want it on the left instead?
If so, try this:
1) In custom.js,find the afterLoad() function and comment-out the calls to hybridSkin.resizeArea().
Right now it looks like this:
Code: Select all
hybridSkin.resizeArea();
window.onresize = function() {
hybridSkin.resizeArea();
}
Code: Select all
// hybridSkin.resizeArea();
// window.onresize = function() {
// hybridSkin.resizeArea();
// }
3) In start.html, find the middleDiv and remove the 'centered' class.
Right now it's this:
Code: Select all
<div id="middle" class="middleDiv centered">
Code: Select all
<div id="middle" class="middleDiv">
5) In a Genie session, click the 'Refresh' button on the design toolbar to force the browser to re-load the custom.js and start.html files.
That should stop it from centering the 5250 screen across the browser window if that's what you need.
-
- Profound User
- Posts: 56
- Joined: Tue Jan 20, 2015 4:28 pm
- First Name: Raymond
- Last Name: Marsh
- Company Name: Cracker Barrel Old Country Sto
- Phone: 615-235-4215
- Address 1: PO Box 787
- City: Lebanon
- State / Province: Tennessee
- Zip / Postal Code: 37088
- Country: United States
- Contact:
Re: Moving everything over to the left border
That did it. Thanks again Scott.
Who is online
Users browsing this forum: No registered users and 2 guests