Page 1 of 1
nuMessage left position (2)
Posted: Sun May 13, 2018 7:48 am
by toms
Hi,
Referring to
https://forums.nubuilder.cloud/viewtopic.php?f=19&t=9501
With the latest commit, the change has been reverted
screen_widths.png
Re: nuMessage left position (2)
Posted: Sun May 13, 2018 6:22 pm
by admin
toms,
Yes, I found some problems with it.
Steven
Re: nuMessage left position (2)
Posted: Sun May 13, 2018 6:35 pm
by toms
What kind of problems? Maybe I can help you fix it.
Re: nuMessage left position (2)
Posted: Mon May 14, 2018 12:15 am
by admin
toms,
If a user tries to open a Form that contains another Form - that they don't have access to.
The warning can be off the left side of the screen...
noaccess.png
Steven
Re: nuMessage left position (2)
Posted: Mon May 14, 2018 6:33 am
by toms
I see two possibilities:
1. Center over the parent window:
Code: Select all
l = ( $(window.parent.document).width() - widest) / 2;
This will also work if there is no parent window. If a window does not have a parent, its parent property is a reference to itself.
Maybe add this fix as well: if l < 0, set l = 0
Code: Select all
l = Math.min(0, ( $(window.parent.document).width() - widest) / 2);
2. Center over the top window
Code: Select all
l = ( $(window.top.document).width() - widest) / 2;
This property is especially useful when you are dealing with a window that is in a subframe of a parent or parents, and you want to get to the top-level frameset.
I think 2) is the better option since we can have nested forms (form opens iframe, then again iframe etc.)
Re: nuMessage left position (2)
Posted: Tue May 15, 2018 12:03 am
by admin
toms,
OK, that's now on Github - thanks.
Steven
Re: nuMessage left position (2)
Posted: Tue May 15, 2018 6:39 am
by toms
Thanks Steven!
Re: nuMessage left position (2)
Posted: Tue May 15, 2018 11:34 pm
by admin
.