Matthias Schiffer
2681622018
gluon-web: build with -fvisibility=hidden
2018-02-23 01:05:27 +01:00
Matthias Schiffer
43e70f351f
gluon-web: handle translation and escaping in generated Lua code
...
By emitting Lua code to call translate() and pcdata(), we are more
flexible than when doing this internally in the parser. The performance
penalty should be negligible.
2018-02-23 00:57:03 +01:00
Matthias Schiffer
933cc3d7d9
gluon-web: use ' instead of " for strings in generated Lua code
...
We need a bit less escaping this way.
2018-02-23 00:34:06 +01:00
Matthias Schiffer
3e292ba06f
gluon-web: close FDs after mmap()
2018-02-23 00:03:57 +01:00
Matthias Schiffer
99b4d2eaf0
gluon-web: clean up LMO code
2018-02-22 22:47:27 +01:00
Matthias Schiffer
3203970969
gluon-web: clean up parser
2018-02-22 21:13:24 +01:00
Matthias Schiffer
5a20f9794c
gluon-web: clean up buffer handling
2018-02-22 21:13:24 +01:00
Matthias Schiffer
624d969c52
gluon-web: compile with -std=c99 -Wall -Wextra
...
Also fix all warnings.
2018-02-22 21:13:23 +01:00
Matthias Schiffer
56a10e03b3
gluon-web: update copyright
2018-02-22 21:13:23 +01:00
Matthias Schiffer
7e5f0fe1d5
gluon-web: clean up opening files
...
Open with O_CLOEXEC, use fstat() instead of stat().
2018-02-22 21:13:23 +01:00
Matthias Schiffer
94f22e50e6
gluon-web: clean up malloc() calls
2018-02-22 21:13:23 +01:00
Matthias Schiffer
f957593f26
gluon-web: template_lmo: clean up sfh_hash()
2018-02-22 21:13:23 +01:00
Matthias Schiffer
9e8a6ec2b5
gluon-web: remove lmo_canon_hash()
...
Our strings can be looked up verbatim.
2018-02-22 13:58:20 +01:00
Matthias Schiffer
b5817f5523
gluon-web: replace custom strfind() function with memmem()
2018-02-22 13:37:57 +01:00
Matthias Schiffer
0ff4761a57
gluon-web: remove unnecessary template_lualib.h
2018-02-22 13:34:32 +01:00
Matthias Schiffer
623faf794a
gluon-web: fix access to undefined in checkvalue()
...
Fixes: cfe1bba8
"gluon-web: fix radio button view of ListValues"
2018-02-04 18:57:27 +01:00
Matthias Schiffer
9ece0daa76
gluon-web: ListValue: convert keys to strings before adding to key list
...
Fixes validation of ListValues.
Fixes: ec532b95
"gluon-web: extend ListValue with optional and unset
values"
2018-02-04 18:57:27 +01:00
Matthias Schiffer
ec532b95cf
gluon-web: extend ListValue with optional and unset values
...
If a value is unset or optional, an empty choice is added to the selection.
This empty choice will be marked as invalid if the value is not optional.
This is properly supported for the 'select' widget only for now, and not
for 'radio'.
2018-01-31 17:08:21 +01:00
Matthias Schiffer
cfe1bba8ae
gluon-web: fix radio button view of ListValues
...
Pretty much everything about this was broken:
* Fix dependency tracking
* Fix vertical orientation
* Fix paddings
* Add theming
2018-01-31 15:47:45 +01:00
Matthias Schiffer
dbfd22d651
gluon-web: simplify DynamicList data attributes, respect size option
2018-01-30 23:55:08 +01:00
Matthias Schiffer
6cf88c3b03
Replace luci-lib-jsonc with our own lua-jsonc
2018-01-18 16:28:59 +01:00
Matthias Schiffer
12103d9638
gluon-web: remove useless serialize_json alias
2018-01-18 07:49:00 +01:00
Matthias Schiffer
da19961188
gluon-web: javascript: don't use global RegExp.$x matches, fix "this" for parameterized validators
...
Doing so caused broken validations, as different validators were affecting
each other.
2017-03-10 22:25:00 +01:00
Matthias Schiffer
1d7b4482b7
gluon-web: add renderer._translate()
...
_translate() will return nil when no match is found.
2017-02-22 19:28:22 +01:00
Matthias Schiffer
e4b74be506
gluon-web: add package
...
The gluon-web package is basically a stripped-down and refactored version
of the LuCI base.
2017-02-22 01:30:58 +01:00