Error msg too far to the right

Questions related to using nuBuilder Forte.

Error msg too far to the right

Postby Martin » Mon May 18, 2020 3:55 am

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.
Attachments
err-msg.png
err-msg.png (11.95 KiB) Viewed 711 times
Martin
 
Posts: 30
Joined: Sat Nov 10, 2018 2:12 am

Re: Error msg too far to the right

Postby Martin » Sat May 23, 2020 2:37 am

Is anyone experiencing the same issue or is my installation corrupt?
Martin
 
Posts: 30
Joined: Sat Nov 10, 2018 2:12 am

Re: Error msg too far to the right

Postby Janusz » Sat May 23, 2020 5:43 am

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>")
Janusz
 
Posts: 334
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: Error msg too far to the right

Postby kev1n » Wed Aug 05, 2020 4:37 pm

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
kev1n
 
Posts: 978
Joined: Mon Oct 15, 2018 2:13 am

Re: Error msg too far to the right

Postby admin » Tue Aug 11, 2020 12:37 pm

Janusz,

I have added your changes to Github.

Thanks

(Please test it.)


Steven
admin
Site Admin
 
Posts: 3350
Joined: Mon Jun 15, 2009 9:53 am

Re: Error msg too far to the right

Postby kev1n » Tue Aug 11, 2020 2:12 pm

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
numessage.png (31.09 KiB) Viewed 338 times
Last edited by kev1n on Tue Aug 11, 2020 3:29 pm, edited 1 time in total.
kev1n
 
Posts: 978
Joined: Mon Oct 15, 2018 2:13 am

Re: Error msg too far to the right

Postby Janusz » Tue Aug 11, 2020 2:56 pm

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.
Janusz
 
Posts: 334
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: Error msg too far to the right

Postby admin » Thu Aug 13, 2020 8:58 am

Thanks to both of you.

Steven
admin
Site Admin
 
Posts: 3350
Joined: Mon Jun 15, 2009 9:53 am

Re: Error msg too far to the right

Postby kev1n » Thu Aug 13, 2020 12:05 pm

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.
kev1n
 
Posts: 978
Joined: Mon Oct 15, 2018 2:13 am

Re: Error msg too far to the right

Postby admin » Thu Aug 13, 2020 4:01 pm

kev1n,

I've added your bit too now, thanks.

Steven
admin
Site Admin
 
Posts: 3350
Joined: Mon Jun 15, 2009 9:53 am

Next

Return to General



cron