From 706c6836e40046ca82efc3355fc018fd37654d88 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 21 Nov 2018 18:44:59 +0100 Subject: luci-base: introduce common JavaScript api Introduce a new script file luci.js which is included by default and intended to be the common location of functions currently scattered in cbi.js and xhr.js. The luci.js file provides a LuCI() class which - among other things - implements helpers to construct URL paths and making HTTP requests. A singleton instance of the class is instantiated as window.L upon load and preset with the necessary environment information. Signed-off-by: Jo-Philipp Wich --- modules/luci-base/luasrc/view/header.htm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'modules/luci-base/luasrc/view') diff --git a/modules/luci-base/luasrc/view/header.htm b/modules/luci-base/luasrc/view/header.htm index f6e20c9a40..2813c4d943 100644 --- a/modules/luci-base/luasrc/view/header.htm +++ b/modules/luci-base/luasrc/view/header.htm @@ -10,3 +10,14 @@ luci.dispatcher.context.template_header_sent = true end %> + + + -- cgit v1.2.3