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:
3f1d687
)
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, 16 Apr 2020 13:13:26 +0000
(15:13 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
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 57f8e2bff4f2625e25edef37729de0fcb6bace15..6d77f37824e064bd15b46c8d08e256da777cfcaa 100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/ui.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/ui.js
@@
-2989,6
+2989,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