project/luci.git
5 years agoluci-theme-openwrt: dropdown style tweaks
Jo-Philipp Wich [Mon, 5 Nov 2018 17:38:25 +0000 (18:38 +0100)]
luci-theme-openwrt: dropdown style tweaks

- Remove 2em min height, this looks out of place with the OpenWrt theme
- Only colorize invalid dropdown when not open
- Drop use of image background for invalid fields while we're at it

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoluci-theme-bootstrap: add invalid style for dropdowns
Jo-Philipp Wich [Mon, 5 Nov 2018 17:11:36 +0000 (18:11 +0100)]
luci-theme-bootstrap: add invalid style for dropdowns

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoluci-theme-{freifunk-generic,material,openwrt}: z-index fixes
Jo-Philipp Wich [Mon, 5 Nov 2018 17:10:26 +0000 (18:10 +0100)]
luci-theme-{freifunk-generic,material,openwrt}: z-index fixes

Ensure that open dropdowns cover active tooltips.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoluci-theme-bootstrap: z-index fixes
Jo-Philipp Wich [Mon, 5 Nov 2018 17:07:42 +0000 (18:07 +0100)]
luci-theme-bootstrap: z-index fixes

Lower z-index of header bar to allow tooltips and dropdowns to overlap it,
also increase the z-index of open dropdowns to ensure that they cover
active tooltip bubbles.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoluci-base: cbi.js: set .value property of cbi dropdown elements
Jo-Philipp Wich [Mon, 5 Nov 2018 15:52:05 +0000 (16:52 +0100)]
luci-base: cbi.js: set .value property of cbi dropdown elements

In order to make cbi dropdowns usable for validation and other code
expecting native form elements, set the .value DOM property on the
dropdown parent element whenever the selection is changed.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoluci-base: cbi.js: properly handle cbi tooltips on nested elements
Jo-Philipp Wich [Mon, 5 Nov 2018 15:48:10 +0000 (16:48 +0100)]
luci-base: cbi.js: properly handle cbi tooltips on nested elements

Rework the tooltip event delegation logic to prevent hiding the tooltop
when the cursor is moved to a children of the tooltip container element.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoluci-base: cbi.js: avoid using .form property directly
Jo-Philipp Wich [Mon, 5 Nov 2018 15:44:20 +0000 (16:44 +0100)]
luci-base: cbi.js: avoid using .form property directly

In order to prepare support for calling cbi validation on non-native form
widgets, remove direct usages of the node.form property and lookup the
containing form using findParent() instead.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoluci-base: cbi.js: fix passing multiple dropdown values in change event
Jo-Philipp Wich [Mon, 5 Nov 2018 15:41:25 +0000 (16:41 +0100)]
luci-base: cbi.js: fix passing multiple dropdown values in change event

Due to a misspelled property name, only the first value was passed in
the event details.

Fixes: c2b570998 ("luci-base: cbi.js: rework dropdown implementation")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoluci-base: rework dynamic list template
Jo-Philipp Wich [Mon, 5 Nov 2018 15:35:36 +0000 (16:35 +0100)]
luci-base: rework dynamic list template

Commit 7c7821833 ("luci-base, themes: rework dynlist and dropdown widgets")
changed the way we initialize dynamic lists on client side, avoiding the
need for pre-rendering the items on the server side.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoluci-base: add ARIA label to reveal/hide password button
Jo-Philipp Wich [Mon, 5 Nov 2018 15:34:10 +0000 (16:34 +0100)]
luci-base: add ARIA label to reveal/hide password button

Fixes #2070.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoluci-base: update german translation
Jo-Philipp Wich [Mon, 5 Nov 2018 12:01:50 +0000 (13:01 +0100)]
luci-base: update german translation

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoMerge pull request #2281 from TDT-AG/pr/20181114-luci-app-mwan3
Hannu Nyman [Wed, 14 Nov 2018 14:36:08 +0000 (16:36 +0200)]
Merge pull request #2281 from TDT-AG/pr/20181114-luci-app-mwan3

luci-app-mwan3: add/remove options

5 years agoMerge pull request #2277 from sotux/master
Hannu Nyman [Wed, 14 Nov 2018 14:32:07 +0000 (16:32 +0200)]
Merge pull request #2277 from sotux/master

i18n: luci-base: update Simplified Chinese translation

5 years agoMerge pull request #2284 from dibdot/travelmate
Dirk Brenken [Wed, 14 Nov 2018 10:49:05 +0000 (11:49 +0100)]
Merge pull request #2284 from dibdot/travelmate

luci-app-travelmate: consolidate css

5 years agoMerge pull request #2283 from dibdot/adblock
Dirk Brenken [Wed, 14 Nov 2018 10:48:45 +0000 (11:48 +0100)]
Merge pull request #2283 from dibdot/adblock

luci-app-adblock: consolidate css

5 years agoMerge pull request #2280 from dibdot/banip
Dirk Brenken [Wed, 14 Nov 2018 10:48:14 +0000 (11:48 +0100)]
Merge pull request #2280 from dibdot/banip

luci-app-banip: fix remaining css issues

5 years agoluci-app-banip: fix remaining css issues 2280/head
Dirk Brenken [Wed, 14 Nov 2018 08:01:00 +0000 (09:01 +0100)]
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>
5 years agoluci-app-travelmate: consolidate css 2284/head
Dirk Brenken [Wed, 14 Nov 2018 10:43:39 +0000 (11:43 +0100)]
luci-app-travelmate: consolidate css

* fix IE Edge rendering issues
* merge external styles in central css

Signed-off-by: Dirk Brenken <dev@brenken.org>
5 years agoluci-app-adblock: consolidate css 2283/head
Dirk Brenken [Wed, 14 Nov 2018 09:45:18 +0000 (10:45 +0100)]
luci-app-adblock: consolidate css

* fix IE Edge rendering issues
* merge external styles in central css

Signed-off-by: Dirk Brenken <dev@brenken.org>
5 years agoluci-app-mwan3: remove deprecated local_source option 2281/head
Florian Eckert [Thu, 8 Nov 2018 08:52:54 +0000 (09:52 +0100)]
luci-app-mwan3: remove deprecated local_source option

Remove deprecated local_source option which is not supported/needed anymore.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
5 years agoluci-app-mwan3: add rt_table_lookup option
Florian Eckert [Tue, 16 Oct 2018 10:43:18 +0000 (12:43 +0200)]
luci-app-mwan3: add rt_table_lookup option

Make list option rt_table_lookup configurable in luci.
With this option we could define additional routing tables which get
scanned by mwan3 and then get added to the connected ipset.
The entries will be treated as connected network and will not get
mangeld by mwan3.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
5 years agoluci-app-mwan3: add rtmon interval option
Florian Eckert [Tue, 16 Oct 2018 07:45:41 +0000 (09:45 +0200)]
luci-app-mwan3: add rtmon interval option

Add the configuration option rtmon to luci.
With this parameter we could adjust how often the routing table get
synced between main routing table and the interface routing table.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
5 years agoluci-app-mwan3: rename variable in globalsconfig.lua
Florian Eckert [Tue, 16 Oct 2018 07:34:28 +0000 (09:34 +0200)]
luci-app-mwan3: rename variable in globalsconfig.lua

Name variables as the options name in uci.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
5 years agoluci-app-mwan3: declare variables in globalsconfig.lua local
Florian Eckert [Tue, 16 Oct 2018 07:31:52 +0000 (09:31 +0200)]
luci-app-mwan3: declare variables in globalsconfig.lua local

It is best practice to declar module variables local.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
5 years agoMerge pull request #2279 from yglb/master
Jo-Philipp Wich [Wed, 14 Nov 2018 06:28:25 +0000 (07:28 +0100)]
Merge pull request #2279 from yglb/master

luci-theme-rosy: Remove redundant statements and fixed typo

5 years agoluci-theme-rosy: fixed typo 2279/head
Yanlan Shen [Wed, 14 Nov 2018 03:50:49 +0000 (11:50 +0800)]
luci-theme-rosy: fixed typo

Signed-off-by: Yanlan Shen <yanlan.shen.@rosinson.com>
5 years agoluci-theme-rosy: Remove redundant statements
Yanlan Shen [Wed, 14 Nov 2018 03:49:33 +0000 (11:49 +0800)]
luci-theme-rosy: Remove redundant statements

Signed-off-by: Yanlan Shen <yanlan.shen.@rosinson.com>
5 years agoi18n: luci-base: update Simplified Chinese translation 2277/head
Zheng Qian [Wed, 14 Nov 2018 02:21:59 +0000 (10:21 +0800)]
i18n: luci-base: update Simplified Chinese translation

Signed-off-by: Zheng Qian <sotux82@gmail.com>
5 years agoMerge pull request #2245 from Ansuel/fstab
Jo-Philipp Wich [Mon, 12 Nov 2018 18:34:24 +0000 (19:34 +0100)]
Merge pull request #2245 from Ansuel/fstab

luci-mod-system: add support for additional filesystem

5 years agoluci-mod-system: add support for additional filesystem 2245/head
Ansuel Smith [Wed, 24 Oct 2018 17:19:58 +0000 (19:19 +0200)]
luci-mod-system: add support for additional filesystem

The filesystem option doesn't include additional filesystem included with /etc/filesystems, this is usefull if someone have ntfs-3g installed and wants to force use the external utility to mount partition instead of the default present in the kernel (if it's supported)

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
5 years agoMerge pull request #2275 from musashino205/l10n/tmate-upd-ja
Hannu Nyman [Mon, 12 Nov 2018 17:21:57 +0000 (19:21 +0200)]
Merge pull request #2275 from musashino205/l10n/tmate-upd-ja

luci-app-travelmate: update Japanese translation

5 years agoluci-app-travelmate: update Japanese translation 2275/head
INAGAKI Hiroshi [Mon, 12 Nov 2018 17:16:50 +0000 (02:16 +0900)]
luci-app-travelmate: update Japanese translation

Updated Japanese translations.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 years agoluci-mod-admin-full: dnsmasq clarify non-wildcard mode
Kevin Darbyshire-Bryant [Wed, 17 May 2017 13:29:43 +0000 (14:29 +0100)]
luci-mod-admin-full: dnsmasq clarify non-wildcard mode

'non-wildcard' interfaces enables dnsmasq's '--bind-dynamic' mode.
This binds dynamically to interfaces rather than wildcard addresses
*and* keeps track of interface comings/goings via a unique Linux api.

Quoting dnsmasq's author "bind-dynamic (bind individual addresses,
keep up with changes in interface config) ... On linux, there's actually
no sane reason not to use --bind-dynamic, and it's only not the default
for historical reasons."

listen/exclude interfaces may be used independently of bind dynamic mode
so removed the bogus dependency of 'nonwildcard' enabling access to
'listen/exclude' interfaces - they may be used in any mode..  In fact
the dnsmasq init script takes notice of include/exclude interfaces
irrespective of the 'nonwildcard' parameter.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years agoMerge pull request #2274 from TDT-AG/pr/20181112-luic-mod-system
Jo-Philipp Wich [Mon, 12 Nov 2018 14:38:27 +0000 (15:38 +0100)]
Merge pull request #2274 from TDT-AG/pr/20181112-luic-mod-system

luci-mod-system: add user defined interface to netdev trigger

5 years agoluci-mod-system: add user defined interface to netdev trigger 2274/head
Florian Eckert [Fri, 9 Nov 2018 10:03:36 +0000 (11:03 +0100)]
luci-mod-system: add user defined interface to netdev trigger

Give the user the possibility to define and interface for the netdev
trigger which is not available at the moment. This is usefull if a
interface is not presented on configuration time.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
5 years agoMerge pull request #2272 from dibdot/banip
Dirk Brenken [Mon, 12 Nov 2018 11:16:31 +0000 (12:16 +0100)]
Merge pull request #2272 from dibdot/banip

luci-app-banip: fix JS errors in chromium

5 years agoluci-app-banip: fix JS errors in chromium 2272/head
Dirk Brenken [Mon, 12 Nov 2018 11:14:52 +0000 (12:14 +0100)]
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>
5 years agoMerge pull request #2262 from yglb/master
Jo-Philipp Wich [Mon, 12 Nov 2018 06:52:50 +0000 (07:52 +0100)]
Merge pull request #2262 from yglb/master

luci-theme-rosy

5 years agoMerge pull request #2268 from hnyman/rrd
Jo-Philipp Wich [Sun, 11 Nov 2018 17:41:57 +0000 (18:41 +0100)]
Merge pull request #2268 from hnyman/rrd

luci-app-statistics: remove old deprecated rrdtool po files

5 years agoluci-app-statistics: remove old deprecated rrdtool po files 2268/head
Hannu Nyman [Sun, 11 Nov 2018 16:10:46 +0000 (18:10 +0200)]
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>
5 years agoMerge pull request #2264 from dibdot/banip
Dirk Brenken [Sun, 11 Nov 2018 13:59:39 +0000 (14:59 +0100)]
Merge pull request #2264 from dibdot/banip

luci-app-banip: new package

5 years agoMerge pull request #2267 from musashino205/l10n/base-upd-ja_2
Hannu Nyman [Sun, 11 Nov 2018 07:17:38 +0000 (09:17 +0200)]
Merge pull request #2267 from musashino205/l10n/base-upd-ja_2

luci-base: fix issues and update Japanese translation

5 years agoluci-base: update Japanese translation 2267/head
INAGAKI Hiroshi [Sun, 11 Nov 2018 06:47:49 +0000 (15:47 +0900)]
luci-base: update Japanese translation

Updated Japanese translations.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 years agoluci-base: sync translations
INAGAKI Hiroshi [Sun, 11 Nov 2018 06:35:47 +0000 (15:35 +0900)]
luci-base: sync translations

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 years agoluci-base: fix translation issues
INAGAKI Hiroshi [Sun, 11 Nov 2018 06:24:18 +0000 (15:24 +0900)]
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>
5 years agoi18n: cleanup old strings
Hannu Nyman [Sat, 10 Nov 2018 19:26:41 +0000 (21:26 +0200)]
i18n: cleanup old strings

also sync translations

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
5 years agoluci-app-travelmate: further translation fixup
Hannu Nyman [Sat, 10 Nov 2018 19:25:54 +0000 (21:25 +0200)]
luci-app-travelmate: further translation fixup

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
5 years agoMerge pull request #2265 from danrl/dm
Hannu Nyman [Sat, 10 Nov 2018 13:07:09 +0000 (15:07 +0200)]
Merge pull request #2265 from danrl/dm

luci-*-wireguard: Remove inactive maintainer

5 years agoluci-*-wireguard: Remove inactive maintainer 2265/head
Dan Lüdtke [Sat, 10 Nov 2018 12:54:59 +0000 (13:54 +0100)]
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>

5 years agoluci-app-banip: new package 2264/head
Dirk Brenken [Sat, 10 Nov 2018 10:19:50 +0000 (11:19 +0100)]
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>
5 years agoluci-theme-rosy: Bug fix for network-interfaces 2262/head
Yanlan Shen [Fri, 9 Nov 2018 06:57:02 +0000 (14:57 +0800)]
luci-theme-rosy: Bug fix for network-interfaces

Signed-off-by: Yanlan Shen <yanlan.shen.@rosinson.com>
5 years agoluci-theme-rosy: Fix resolution-related styles
Yanlan Shen [Tue, 6 Nov 2018 02:00:40 +0000 (10:00 +0800)]
luci-theme-rosy: Fix resolution-related styles

Signed-off-by: Yanlan Shen <yanlan.shen.@rosinson.com>
5 years agoluci-theme-rosy: Modify the layout of the header and footer
Yanlan Shen [Tue, 6 Nov 2018 01:59:35 +0000 (09:59 +0800)]
luci-theme-rosy: Modify the layout of the header and footer

Signed-off-by: Yanlan Shen <yanlan.shen.@rosinson.com>
5 years agoluci-theme-rosy: Add a background picture
Yanlan Shen [Tue, 6 Nov 2018 01:58:16 +0000 (09:58 +0800)]
luci-theme-rosy: Add a background picture

Signed-off-by: Yanlan Shen <yanlan.shen.@rosinson.com>
5 years agoi18n: sync translations, add location annotatations 2256/head
Hannu Nyman [Wed, 7 Nov 2018 16:10:59 +0000 (18:10 +0200)]
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>
5 years agoluci-app-nft-qos: remove extra .po files
Hannu Nyman [Wed, 7 Nov 2018 16:05:26 +0000 (18:05 +0200)]
luci-app-nft-qos: remove extra .po files

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
5 years agoMerge pull request #1855 from rosysong/nqos
Hannu Nyman [Wed, 7 Nov 2018 14:54:07 +0000 (16:54 +0200)]
Merge pull request #1855 from rosysong/nqos

luci-app-nft-qos: add new application

5 years agoluci-app-nft-qos: add new application 1855/head
Rosy Song [Fri, 3 Aug 2018 04:16:39 +0000 (12:16 +0800)]
luci-app-nft-qos: add new application

This application is for nft-qos package.

Signed-off-by: Rosy Song <rosysong@rosinson.com>
5 years agoluci-mod-network: move AHCP protocol model to AHCP application
Jo-Philipp Wich [Mon, 5 Nov 2018 10:16:54 +0000 (11:16 +0100)]
luci-mod-network: move AHCP protocol model to AHCP application

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoluci-base: validate DHCP clientid as hexstring
Jo-Philipp Wich [Mon, 5 Nov 2018 10:19:17 +0000 (11:19 +0100)]
luci-base: validate DHCP clientid as hexstring

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoluci-base: cbi.js: add client-side hexstring datatype validator
Jo-Philipp Wich [Mon, 5 Nov 2018 10:13:39 +0000 (11:13 +0100)]
luci-base: cbi.js: add client-side hexstring datatype validator

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoluci-base: cbi.js: add heuristics to attribute handling in E()
Jo-Philipp Wich [Mon, 5 Nov 2018 10:11:46 +0000 (11:11 +0100)]
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>
5 years agoluci-theme-material: add invalid input class
Jo-Philipp Wich [Sun, 21 Oct 2018 09:47:29 +0000 (11:47 +0200)]
luci-theme-material: add invalid input class

Fixes #1070.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoluci-base, themes: rework dynlist and dropdown widgets
Jo-Philipp Wich [Sat, 20 Oct 2018 15:56:02 +0000 (17:56 +0200)]
luci-base, themes: rework dynlist and dropdown widgets

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoluci-theme-bootstrap: add flash animation
Jo-Philipp Wich [Sat, 20 Oct 2018 14:30:24 +0000 (16:30 +0200)]
luci-theme-bootstrap: add flash animation

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoluci-base: cbi.js: rework dropdown implementation
Jo-Philipp Wich [Sat, 20 Oct 2018 08:06:57 +0000 (10:06 +0200)]
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>
5 years agoluci-base: cbi.js: utilize node.closest() if available
Jo-Philipp Wich [Sat, 20 Oct 2018 07:55:59 +0000 (09:55 +0200)]
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>
5 years agoluci-base: cbi.js: drop cbi_bind()
Jo-Philipp Wich [Fri, 19 Oct 2018 17:16:00 +0000 (19:16 +0200)]
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>
5 years agoluci-base: cbi.js: rework client side input validation
Jo-Philipp Wich [Fri, 19 Oct 2018 06:39:23 +0000 (08:39 +0200)]
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>
5 years agoluci-base: cbi.js: fix corner case in IPv6() address parser
Jo-Philipp Wich [Fri, 19 Oct 2018 06:21:51 +0000 (08:21 +0200)]
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>
5 years agoluci-base, themes: add tooltip helpers & styles
Jo-Philipp Wich [Thu, 18 Oct 2018 14:14:35 +0000 (16:14 +0200)]
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>
5 years agoluci-base: cbi.js: switch to client side translation
Jo-Philipp Wich [Thu, 18 Oct 2018 12:03:52 +0000 (14:03 +0200)]
luci-base: cbi.js: switch to client side translation

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agothemes: load client side translations
Jo-Philipp Wich [Thu, 18 Oct 2018 11:58:10 +0000 (13:58 +0200)]
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>
5 years agoluci-base: cbi.js: add client side translation infrastructure
Jo-Philipp Wich [Thu, 18 Oct 2018 11:48:05 +0000 (13:48 +0200)]
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>
5 years agoluci-base: expose system translations to JavaScript
Jo-Philipp Wich [Thu, 18 Oct 2018 11:44:39 +0000 (13:44 +0200)]
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>
5 years agoluci-base: remove unused i18n functions
Jo-Philipp Wich [Thu, 18 Oct 2018 11:32:52 +0000 (13:32 +0200)]
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>
5 years agoluci-base: remove references to luci.i18n.loadc()
Jo-Philipp Wich [Thu, 18 Oct 2018 09:02:28 +0000 (11:02 +0200)]
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>
5 years agoluci-app-mjpg-streamer: remove reference to luci.i18n.loadc()
Jo-Philipp Wich [Thu, 18 Oct 2018 09:00:25 +0000 (11:00 +0200)]
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>
5 years agoluci-base: introduce luci.i18n.dump()
Jo-Philipp Wich [Thu, 18 Oct 2018 08:54:12 +0000 (10:54 +0200)]
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>
5 years agoluci-base: fix luci.i18n.setlanguage()
Jo-Philipp Wich [Thu, 18 Oct 2018 07:52:07 +0000 (09:52 +0200)]
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>
5 years agoluci-base: template: add translation iterator function
Jo-Philipp Wich [Wed, 17 Oct 2018 10:57:34 +0000 (12:57 +0200)]
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>
5 years agobuild: i18n-scan.pl: *.js support, location annotations
Jo-Philipp Wich [Wed, 17 Oct 2018 10:47:20 +0000 (12:47 +0200)]
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>
5 years agoi18n: sync translations
Hannu Nyman [Sun, 4 Nov 2018 16:05:01 +0000 (18:05 +0200)]
i18n: sync translations

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
5 years agoMerge pull request #2246 from rosysong/rosy
Jo-Philipp Wich [Fri, 2 Nov 2018 13:06:03 +0000 (14:06 +0100)]
Merge pull request #2246 from rosysong/rosy

theme: add initial commit for rosy theme

5 years agoMerge pull request #2193 from rosysong/freespace
Jo-Philipp Wich [Fri, 2 Nov 2018 13:04:31 +0000 (14:04 +0100)]
Merge pull request #2193 from rosysong/freespace

luci-mod-system: add id for software/freespace div

5 years agocommunity-profiles: create profile for Fürstenwalde
Martin Hübner [Tue, 23 Oct 2018 16:43:58 +0000 (18:43 +0200)]
community-profiles: create profile for Fürstenwalde

New profile for Fürstenwalde. At the moment we use parts of the Berlin-
infrastructure. Thus I have not changed the ip-address-related things.

Signed-off-by: Martin Hübner <martin.hubner@web.de>
[reword and rewrap commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoMerge pull request #2250 from booo/remove-olsrd-library-version-numbers
Jo-Philipp Wich [Fri, 2 Nov 2018 12:53:08 +0000 (13:53 +0100)]
Merge pull request #2250 from booo/remove-olsrd-library-version-numbers

get rid of library version numbers in luci olsrd code

5 years agoMerge pull request #2252 from stweil/lgtm
Jo-Philipp Wich [Fri, 2 Nov 2018 12:52:37 +0000 (13:52 +0100)]
Merge pull request #2252 from stweil/lgtm

Add missing variable declarations in JavaScript code

5 years agoMerge pull request #2253 from dibdot/travelmate
Dirk Brenken [Tue, 30 Oct 2018 19:12:13 +0000 (20:12 +0100)]
Merge pull request #2253 from dibdot/travelmate

luci-app-travelmate: sync with travelmate 1.3.0

5 years agotimezone data: update to 2018g
Hannu Nyman [Tue, 30 Oct 2018 17:45:50 +0000 (19:45 +0200)]
timezone data: update to 2018g

Update timezone data to 2018g

http://mm.icann.org/pipermail/tz-announce/2018-October/000052.html

 * Morocco switches to permanent +01 on 2018-10-27.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
5 years agoluci-app-travelmate: sync with travelmate 1.3.0 2253/head
Dirk Brenken [Tue, 30 Oct 2018 14:29:00 +0000 (15:29 +0100)]
luci-app-travelmate: sync with travelmate 1.3.0

* add support for the new 'trm_proactive' option

Signed-off-by: Dirk Brenken <dev@brenken.org>
5 years agotheme: add initial commit for rosy theme 2246/head
Rosy Song [Thu, 25 Oct 2018 03:29:18 +0000 (11:29 +0800)]
theme: add initial commit for rosy theme

Signed-off-by: Rosy Song <rosysong@rosinson.com>
Signed-off-by: Yan Lan Shen <yanlan.shen@rosinson.com>
5 years agoAdd missing variable declarations in JavaScript code 2252/head
Stefan Weil [Sun, 28 Oct 2018 21:38:20 +0000 (22:38 +0100)]
Add missing variable declarations in JavaScript code

This fixes errors reported by LGTM.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
5 years agoget rid of library version numbers in luci olsrd code 2250/head
Philipp Borgers [Thu, 25 Oct 2018 19:54:42 +0000 (21:54 +0200)]
get rid of library version numbers in luci olsrd code

Signed-off-by: Philipp Borgers <borgers@mi.fu-berlin.de>
5 years agoMerge pull request #2248 from tano-systems/fstab-translateble-swap
Hannu Nyman [Thu, 25 Oct 2018 16:51:36 +0000 (19:51 +0300)]
Merge pull request #2248 from tano-systems/fstab-translateble-swap

luci-mod-system: fstab: "SWAP" section title is made translatable

5 years agoluci-mod-system: fstab: "SWAP" section title is made translatable 2248/head
Anton Kikin [Thu, 25 Oct 2018 16:40:23 +0000 (19:40 +0300)]
luci-mod-system: fstab: "SWAP" section title is made translatable

Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
5 years agoMerge pull request #2247 from tano-systems/luci-base-upd-ru-i18n
Hannu Nyman [Thu, 25 Oct 2018 16:35:23 +0000 (19:35 +0300)]
Merge pull request #2247 from tano-systems/luci-base-upd-ru-i18n

luci-base: update and improve Russian translation

5 years agoluci-base: update and improve Russian translation 2247/head
Anton Kikin [Thu, 25 Oct 2018 16:30:54 +0000 (19:30 +0300)]
luci-base: update and improve Russian translation

Add missing translations and update existing not quite correct translations.
Also removed unnecessary dots at the end of some translations.

Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
5 years ago timezone data: update to 2018f
Hannu Nyman [Thu, 25 Oct 2018 15:44:48 +0000 (18:44 +0300)]
 timezone data: update to 2018f

Update timezone data to 2018f

http://mm.icann.org/pipermail/tz-announce/2018-October/000051.html

   Volgograd moves from +03 to +04 on 2018-10-28.
   Fiji ends DST 2019-01-13, not 2019-01-20.
   Most of Chile changes DST dates, effective 2019-04-06.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
5 years agoMerge pull request #2243 from dibdot/ovpn-fix
Dirk Brenken [Tue, 23 Oct 2018 21:18:38 +0000 (23:18 +0200)]
Merge pull request #2243 from dibdot/ovpn-fix

luci-app-openvpn: file name fix