Welcome to the nuBuilder Forums!

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

Error msg too far to the right

Questions related to using nuBuilder Forte.
Martin
Posts: 30
Joined: Fri Nov 09, 2018 5:42 pm

Error msg too far to the right

Unread post by Martin »

Hi,

The messagebox is displayed too far to the right, outside the visible area. Only if you scroll to the right, you will see the error message.
You do not have the required permissions to view the files attached to this post.
Martin
Posts: 30
Joined: Fri Nov 09, 2018 5:42 pm

Re: Error msg too far to the right

Unread post by Martin »

Is anyone experiencing the same issue or is my installation corrupt?
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: Error msg too far to the right

Unread post by Janusz »

Hi,
If you refer to the nuMessage you can change default location for example in the following way:
in ./nuform.js
find the line and disable it:

Code: Select all

//$('body', par).append("<div id='nuMessageDiv' class='nuMessage' style='overflow:hidden;width:" + widest + "px;left:" + l + "px' ></div>")
and add/replace with:

Code: Select all

$('body', par).append("<div id='nuMessageDiv' class='nuMessage' style='position:fixed; overflow:hidden;width:" + widest + "px;top:55px; left:10px' ></div>")
If you like nuBuilder, please leave a review on SourceForge
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Error msg too far to the right

Unread post by kev1n »

Hi guys,

You could try my fix. It centers the message over the current window/iFrame/popup. It also takes into account the current horizontal scrolling position to ensure visibility.

https://github.com/smalos/nuBuilder4-Bu ... osition.md
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Error msg too far to the right

Unread post by admin »

Janusz,

I have added your changes to Github.

Thanks

(Please test it.)


Steven
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Error msg too far to the right

Unread post by kev1n »

Hi Steven

The Patch doesn't work well for me in all situations. E.g. if the scrollbar position > 0 .

Apart from that, I find a centered message box more aesthetic (IMHO) and it's standard to do so.

BTW, Janusz confirmed that my Patch works well for him too.
numessage.png
You do not have the required permissions to view the files attached to this post.
Last edited by kev1n on Tue Aug 11, 2020 7:59 am, edited 1 time in total.
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: Error msg too far to the right

Unread post by Janusz »

Hi Steven,

To confirm - the implemented patch works well - it position the message on the left - so it's always visible.

And to confirm as well that I tested with Kevin his proposal - which works fine - and centers the message in the middle of the active window/iframe - if the message is wider than the window and goes to much on left (so it would be partially not readable) then it's placed on the left as in my proposal.
If you like nuBuilder, please leave a review on SourceForge
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Error msg too far to the right

Unread post by admin »

Thanks to both of you.

Steven
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Error msg too far to the right

Unread post by kev1n »

Steven,

In other words, the message is too far to the left now. Can you use my code or is there an issue with it? Please let me know. Thanks.
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Error msg too far to the right

Unread post by admin »

kev1n,

I've added your bit too now, thanks.

Steven
Post Reply