projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ce7daa
)
luci-base: ui.js: add LuCI.ui.menu.flushCache() function
author
Jo-Philipp Wich
<jo@mein.io>
Thu, 16 Apr 2020 13:13:26 +0000
(15:13 +0200)
committer
Jo-Philipp Wich
<jo@mein.io>
Thu, 7 May 2020 17:40:50 +0000
(19:40 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit
90a51ab3b9afca0144a93eb967fcd72a230732f0
)
modules/luci-base/htdocs/luci-static/resources/ui.js
patch
|
blob
|
history
diff --git
a/modules/luci-base/htdocs/luci-static/resources/ui.js
b/modules/luci-base/htdocs/luci-static/resources/ui.js
index 67d3497d038dbc68020cbdf10795a2fc86ee9879..06520f7f8ccd3caef4d88b35c677e66200be6bd8 100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/ui.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/ui.js
@@
-2996,6
+2996,14
@@
var UIMenu = baseclass.singleton(/** @lends LuCI.ui.menu.prototype */ {
return Promise.resolve(this.menu);
},
+ /**
+ * Flush the internal menu cache to force loading a new structure on the
+ * next page load.
+ */
+ flushCache: function() {
+ session.setLocalData('menu', null);
+ },
+
/**
* @param {LuCI.ui.menu.MenuNode} [node]
* The menu node to retrieve the children for. Defaults to the menu's