luci-base: cbi.js: utilize node.closest() if available
authorJo-Philipp Wich <jo@mein.io>
Sat, 20 Oct 2018 07:55:59 +0000 (09:55 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 5 Nov 2018 10:01:45 +0000 (11:01 +0100)
commit6b8fc99fd5897d9a0d959d567a02113ef5b2a328
treecfbdc38785f241d6ffc70d10414250e672054db6
parent911d540cbbcd7218cc6768aa177766cab0835fce
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>
modules/luci-base/htdocs/luci-static/resources/cbi.js