Sunday, April 19, 2020

OHS logo

I'm having fun with the new http server. Since it serves static pages quite well I have created new logo for OHS and even derived favicon out of it. It will part of login screen, and 404 page. There is still plenty of storage on MCU flash (my STM32F407 has 1MB).

I have also polished a bit of JavaScript and it will hopefully bring a bit of comfort to user interface. Namely there is enhanced enable and disable script, that can toggle various buttons, selects and such html elements on and off. Second is a simple password verification script that can verify password text in two password inputs, before it is sent to httpd.

The scripts work with element ID, and since all OHS http elements are rendered with ID, all you need to do is add:
onclick="en()" and
to the master element. This master that triggers other elements property enabled or disabled by defining array of affected ids, such as:
var x=document.querySelectorAll(\"#xx\");
var y=document.querySelectorAll(\"#a1,#a0\");
Where x is array of disabled when true, and y is array of disabled when false.