numerus/web/template
jordi fita mas 1c9fe14ab9 Improve multiselect’s usability with keyboard handling
Had to replace the tags <ul> with a div with an input, so that the
browser can focus the keywoard there.  For now i do not have a
focus-within CSS rule because we do no yet have a style for focus
highlight.

I have replaced the template for-loop to fill the options with the
JavaScript equivalent for two reasons.  The first is that GoLand is very
stupid and can not handle that templating code inside the JavaScript
function and complains of non-existing problemes all the time.

The second is that, taking advantage of the input, i now have filtering
of options and have to remove accents from the label and convert it to
lowercase into a separate property just for that.  I could do that with
a Go function, but it is something that i also have to do for the
input’s value when it changes, therefore i am forced to use JavaScript
and, if i am already using it for one string, it makes no sense to have
duplicate functionality in Go code.

The control still has missing aria attributes, and the list of options
is not yet navigable with the keyboard.
2023-03-16 12:52:44 +01:00
..
contacts Add products section 2023-02-04 11:32:39 +01:00
invoices Add the edit form for invoices 2023-03-13 15:00:35 +01:00
products Move the multiselect “component” to the select-field template 2023-03-15 11:44:18 +01:00
app.gohtml Move the multiselect “component” to the select-field template 2023-03-15 11:44:18 +01:00
dashboard.gohtml Move page titles to their respective templates 2023-01-31 13:07:17 +01:00
form.gohtml Improve multiselect’s usability with keyboard handling 2023-03-16 12:52:44 +01:00
login.gohtml Use a “proper” struct for the login form 2023-02-01 11:02:32 +01:00
profile.gohtml Add breadcrumbs 2023-02-03 13:58:10 +01:00
tax-details.gohtml Add the payment method relation and corresponding form 2023-03-03 16:49:06 +01:00
web.gohtml Add custom function to get the current locale from templates 2023-01-31 15:45:51 +01:00