projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7bab876
)
luci-base: luci.js: support custom filter function in dom.isEmpty()
author
Jo-Philipp Wich
<jo@mein.io>
Tue, 20 Aug 2019 11:31:07 +0000
(13:31 +0200)
committer
Jo-Philipp Wich
<jo@mein.io>
Tue, 10 Sep 2019 13:28:16 +0000
(15:28 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/luci.js
patch
|
blob
|
history
diff --git
a/modules/luci-base/htdocs/luci-static/resources/luci.js
b/modules/luci-base/htdocs/luci-static/resources/luci.js
index d72764b11449be885466bba6a438406ef3881932..582e3730094c70fcd2d8fe23f153de135c295b6c 100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/luci.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/luci.js
@@
-1230,9
+1230,9
@@
return inst[method].apply(inst, inst.varargs(arguments, 2));
},
- isEmpty: function(node) {
+ isEmpty: function(node
, ignoreFn
) {
for (var child = node.firstElementChild; child != null; child = child.nextElementSibling)
- if (!child.classList.contains('hidden'))
+ if (!child.classList.contains('hidden')
&& (!ignoreFn || !ignoreFn(child))
)
return false;
return true;