Page 1 of 1

Little bug on DDNS Page

PostPosted: Wed Dec 02, 2015 4:26 pm
by Acquarious81
Hi,

If i try to activate or modify ddns property, accept button seem do nothing if in the DDNS Period fields is present only one number like the default value (5), but go ahead if a set >= 10...

Re: Little bug on DDNS Page

PostPosted: Wed Dec 02, 2015 5:15 pm
by Jocko
Hi Acquarious81,

It is pretty the wanted behaviour. indeed if you requests too many times several DDNS providers will ban your IP. Currently by default, period can not be lower than 10 minutes.

But there is a cosmetic bug with the web interface: at least a popup should be displayed for warning. Need to deepen this point.

Re: Little bug on DDNS Page

PostPosted: Wed Dec 02, 2015 5:21 pm
by Jocko
Well, it seems I deleted a js function in version 16.0 (and so with 16.1) required with some menus to get the popup message (all menu with a tabs object) :whistle

Need to restore it :pound

Re: Little bug on DDNS Page

PostPosted: Fri Dec 04, 2015 2:49 pm
by Acquarious81
Jocko wrote:Well, it seems I deleted a js function in version 16.0 (and so with 16.1) required with some menus to get the popup message (all menu with a tabs object) :whistle

Need to restore it :pound


Can you write down here a copy of that function? and tell me the file where i've to put that?... i want to try to resolve this little bug..

Re: Little bug on DDNS Page

PostPosted: Fri Dec 04, 2015 6:33 pm
by Jocko
Hi Acquarious81,

Well it is already done, I go to release a patch.
Can you write down here a copy of that function? and tell me the file where i've to put that?... i want to try to resolve this little bug..
Maybe it will be hard as you need to understand how the framework works at least on the user side (js/html code).

Currently you can find the js files here /usr/htdocs/js.

What it is wrong:
Previously to avoid to load jquery.js file, I extracted the code lines required to build an object "Browser" which gives information about the browser used.
These lines are now in the file objects.js. But I forgot the function callAlert uses another jquery command : $.is(), to check if the HTML element with the bad value is visible.
(callAlert() is set in validFunctions.js).

Indeed if a menu contains a tabs object, this HTML element is hidden if its parent tab is not selected. So callAlert needs to select this tab before showing the alert and gives the focus for this HTML element (and also set a yellow background on it).

As $.is() is no longer available, callAlert() aborts before showing the alert message when it asks if this HTML is hidden. Now callAlert uses directly the properties offsetWidth and offsetHeight to check if the HTML element is hidden