Commit graph

10210 commits

Author SHA1 Message Date
Dirk Brenken
176a767279 luci-app-banip: fix remaining css issues
* fix IE Edge rendering issues
* merge remaining external styles in central css

Signed-off-by: Dirk Brenken <dev@brenken.org>
2018-11-14 11:44:48 +01:00
Dirk Brenken
9f2c2e7218 luci-app-banip: fix JS errors in chromium
* fix JS errors in chromium on ipset- & ripe-view page

Signed-off-by: Dirk Brenken <dev@brenken.org>
2018-11-12 12:14:52 +01:00
Jo-Philipp Wich
dc2877d39f
Merge pull request #2262 from yglb/master
luci-theme-rosy
2018-11-12 07:52:50 +01:00
Jo-Philipp Wich
302ea071f9
Merge pull request #2268 from hnyman/rrd
luci-app-statistics: remove old deprecated rrdtool po files
2018-11-11 18:41:57 +01:00
Hannu Nyman
36b1c60efc luci-app-statistics: remove old deprecated rrdtool po files
Remove old rrdtool.po* files that have been deprecated already
in 2011-2015.

Also remove reference to them from i18n-sync.pl

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-11-11 18:10:46 +02:00
Dirk Brenken
ad4c7b0153
Merge pull request #2264 from dibdot/banip
luci-app-banip: new package
2018-11-11 14:59:39 +01:00
Hannu Nyman
be47cb741f
Merge pull request #2267 from musashino205/l10n/base-upd-ja_2
luci-base: fix issues and update Japanese translation
2018-11-11 09:17:38 +02:00
INAGAKI Hiroshi
db6e5bc8d4 luci-base: update Japanese translation
Updated Japanese translations.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-11-11 15:47:49 +09:00
INAGAKI Hiroshi
183faf70a0 luci-base: sync translations
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-11-11 15:35:47 +09:00
INAGAKI Hiroshi
c3225c7012 luci-base: fix translation issues
Fixed several issues for translation.

- add translation markup to "Expecting "
- add missing ")" into "valid time (HH:MM:SS"

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-11-11 15:24:18 +09:00
Hannu Nyman
89e26911f1 i18n: cleanup old strings
also sync translations

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-11-10 21:26:41 +02:00
Hannu Nyman
04454aa7e3 luci-app-travelmate: further translation fixup
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-11-10 21:25:54 +02:00
Hannu Nyman
88632b37a1
Merge pull request #2265 from danrl/dm
luci-*-wireguard: Remove inactive maintainer
2018-11-10 15:07:09 +02:00
Dan Lüdtke
63b86dbbbf luci-*-wireguard: Remove inactive maintainer
I tried to find a successor in the last months, but that failed.

Signed-off by Dan Luedtke <mail@danrl.com>
2018-11-10 13:54:59 +01:00
Dirk Brenken
e50021f77f luci-app-banip: new package
for details & LuCI screenshots see base package desprition/PR:
https://github.com/openwrt/packages/pull/7373

Signed-off-by: Dirk Brenken <dev@brenken.org>
2018-11-10 11:19:50 +01:00
Yanlan Shen
6caf05eee2 luci-theme-rosy: Bug fix for network-interfaces
Signed-off-by: Yanlan Shen <yanlan.shen.@rosinson.com>
2018-11-09 15:06:52 +08:00
Yanlan Shen
a4e4f935e0 luci-theme-rosy: Fix resolution-related styles
Signed-off-by: Yanlan Shen <yanlan.shen.@rosinson.com>
2018-11-09 15:06:45 +08:00
Yanlan Shen
641681fa32 luci-theme-rosy: Modify the layout of the header and footer
Signed-off-by: Yanlan Shen <yanlan.shen.@rosinson.com>
2018-11-09 15:06:38 +08:00
Yanlan Shen
f67cd74f01 luci-theme-rosy: Add a background picture
Signed-off-by: Yanlan Shen <yanlan.shen.@rosinson.com>
2018-11-09 15:06:30 +08:00
Hannu Nyman
40de466475 i18n: sync translations, add location annotatations
Thanks to a recent commit, the translation files will now
have info about locations where the string is used. That
can help is deciding the correct translation, as all contexts
are more easily found.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-11-07 18:10:59 +02:00
Hannu Nyman
5849b20eab luci-app-nft-qos: remove extra .po files
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-11-07 18:05:26 +02:00
Hannu Nyman
14ad794925
Merge pull request #1855 from rosysong/nqos
luci-app-nft-qos: add new application
2018-11-07 16:54:07 +02:00
Rosy Song
6b8235721a luci-app-nft-qos: add new application
This application is for nft-qos package.

Signed-off-by: Rosy Song <rosysong@rosinson.com>
2018-11-06 15:38:12 +08:00
Jo-Philipp Wich
a6d96e0716 luci-mod-network: move AHCP protocol model to AHCP application
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:19:52 +01:00
Jo-Philipp Wich
58fc702805 luci-base: validate DHCP clientid as hexstring
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:19:52 +01:00
Jo-Philipp Wich
9dda4c651c luci-base: cbi.js: add client-side hexstring datatype validator
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:13:39 +01:00
Jo-Philipp Wich
f4c39dd6ff luci-base: cbi.js: add heuristics to attribute handling in E()
If a given attribute value is a function, register it as event listener,
if it is an object, filter it through JSON.stringify(), else set it
as-is.

This helps to reduce some boiler-plate code when building DOM structures.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:11:46 +01:00
Jo-Philipp Wich
9b20f7ac52 luci-theme-material: add invalid input class
Fixes #1070.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:05:12 +01:00
Jo-Philipp Wich
7c78218339 luci-base, themes: rework dynlist and dropdown widgets
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:05:12 +01:00
Jo-Philipp Wich
bd614de514 luci-theme-bootstrap: add flash animation
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:01:45 +01:00
Jo-Philipp Wich
c2b5709988 luci-base: cbi.js: rework dropdown implementation
- Refactor event handler closures into class methods and bind them instead
 - Fix quirk in dropdown placement calculation
 - Different dropdown placement strategy on touch devices
 - Broadcast custom "cbi-dropdown-change" event when value is changed
 - Implement setValues() method to alter dropdown selection
 - Prevent creating empty custom values

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:01:45 +01:00
Jo-Philipp Wich
6b8fc99fd5 luci-base: cbi.js: utilize node.closest() if available
Use node.closest() in findParent() when available since it should be faster
than manaually traversing the ancestor chain.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:01:45 +01:00
Jo-Philipp Wich
911d540cbb luci-base: cbi.js: drop cbi_bind()
Just use node.addEventListener() directly since all reasonably recent
browsers support it nowadays.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:01:45 +01:00
Jo-Philipp Wich
7337872aa1 luci-base: cbi.js: rework client side input validation
- Refactor and fix datatype validation functions
 - Turn the type compilation and validation into a proper class
 - Display tooltip with error hint on invalid inputs

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:01:45 +01:00
Jo-Philipp Wich
51fb04f6e0 luci-base: cbi.js: fix corner case in IPv6() address parser
The implementation allowed a hexadecimal string without any colons.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:01:45 +01:00
Jo-Philipp Wich
7f613be500 luci-base, themes: add tooltip helpers & styles
Add the required JS and CSS infrastructure to support rich hover/focus
tooltips for element.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:01:45 +01:00
Jo-Philipp Wich
31bce2455f luci-base: cbi.js: switch to client side translation
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:01:45 +01:00
Jo-Philipp Wich
21a151ac1a themes: load client side translations
Extend the theme headers to include the translation string scripts,
allowing client side code to translate strings without server side
support.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:01:45 +01:00
Jo-Philipp Wich
ab405edfb6 luci-base: cbi.js: add client side translation infrastructure
Implement the string hash algorithm used by LuCI's translation system in
JavaScript and provide a `_()` translation wrapper function to lookup
messages in the global string table.

Once client side translation loading is activated in a later commit,
JavaScript code can use the same string translation mechanism as server
side Lua code, e.g. `_("Static Routes")` would yield "Statische Routen"
when the German translation is loaded.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:01:45 +01:00
Jo-Philipp Wich
c916b5ed87 luci-base: expose system translations to JavaScript
Add a new /admin/translations/ endpoint which exposes the loaded system
translations as JavaScript file.

Once referenced by <script>, the endpoint will create a `window.TR` object
containing the entire translation string table for use on the client side.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:01:45 +01:00
Jo-Philipp Wich
8ff68c772b luci-base: remove unused i18n functions
Drop load(), loadc(), string() and stringf() from the luci.i18n class since
these functions are either no longer unused or were never used to begin with.

Also slightly rework the module to only use local symbols and unify the
module require style.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:01:45 +01:00
Jo-Philipp Wich
7a98222106 luci-base: remove references to luci.i18n.loadc()
The i18n.loadc() function has been a no-op since almost six years so it
makes no sense to invoke it anymore.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:01:45 +01:00
Jo-Philipp Wich
13e421e093 luci-app-mjpg-streamer: remove reference to luci.i18n.loadc()
The i18n.loadc() function has been a no-op since almost six years.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:01:45 +01:00
Jo-Philipp Wich
a04028037e luci-base: introduce luci.i18n.dump()
Add a new luci.i18n.dump() function which returns all currently loaded
translation strings as Lua table.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:01:45 +01:00
Jo-Philipp Wich
08255e266b luci-base: fix luci.i18n.setlanguage()
Rework the setlanguage() implementation to actually switch catalogues
if another language has been loaded previously and change it to return
the effectively loaded language tag.

Also improve input parameter validation and accept tags in both lower
or upper case.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:01:45 +01:00
Jo-Philipp Wich
62102f4f0e luci-base: template: add translation iterator function
Introduce a new luci.template.parser.get_translations() function which will
iterate all loaded translation entries and pass the to the given callback
function.

This is useful to expose the loaded translations in other formats, e.g. for
wrapping them into JSON feeds.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:01:45 +01:00
Jo-Philipp Wich
4623a58394 build: i18n-scan.pl: *.js support, location annotations
Extend i18n-scan.pl to scan JavaScript files for translation strings as
well and annotate produced *.po template files with source code location
markers.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:01:45 +01:00
Hannu Nyman
982c023deb i18n: sync translations
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-11-04 18:05:01 +02:00
Jo-Philipp Wich
21d7dfeff3
Merge pull request #2246 from rosysong/rosy
theme: add initial commit for rosy theme
2018-11-02 14:06:03 +01:00
Jo-Philipp Wich
807fc816bb
Merge pull request #2193 from rosysong/freespace
luci-mod-system: add id for software/freespace div
2018-11-02 14:04:31 +01:00