Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

nuMessage left position (2)

Questions related to using nuBuilder Forte.
Locked
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

nuMessage left position (2)

Unread post 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
You do not have the required permissions to view the files attached to this post.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: nuMessage left position (2)

Unread post by admin »

toms,

Yes, I found some problems with it.

Steven
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: nuMessage left position (2)

Unread post by toms »

What kind of problems? Maybe I can help you fix it.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: nuMessage left position (2)

Unread post 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
You do not have the required permissions to view the files attached to this post.
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: nuMessage left position (2)

Unread post 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.)
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: nuMessage left position (2)

Unread post by admin »

toms,

OK, that's now on Github - thanks.

Steven
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: nuMessage left position (2)

Unread post by toms »

Thanks Steven!
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: nuMessage left position (2)

Unread post by admin »

.
Locked