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:
360e976
)
luci-base: luci.js: add L.dom.isEmpty() helper
author
Jo-Philipp Wich
<jo@mein.io>
Wed, 31 Jul 2019 05:55:15 +0000
(07:55 +0200)
committer
Jo-Philipp Wich
<jo@mein.io>
Thu, 1 Aug 2019 14:47:19 +0000
(16:47 +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 259679f137ee452a3f6ce8ddf123004cc974b008..66f32d72237d68abec63e76a692efafae31b63c1 100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/luci.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/luci.js
@@
-1188,6
+1188,14
@@
return null;
return inst[method].apply(inst, inst.varargs(arguments, 2));
+ },
+
+ isEmpty: function(node) {
+ for (var child = node.firstElementChild; child != null; child = child.nextElementSibling)
+ if (!child.classList.contains('hidden'))
+ return false;
+
+ return true;
}
}),