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:
6cf7d11
)
luci-base: cbi.js: fade to-be-deleted section when hovering delete button
author
Jo-Philipp Wich
<jo@mein.io>
Mon, 23 Jul 2018 13:06:26 +0000
(15:06 +0200)
committer
Jo-Philipp Wich
<jo@mein.io>
Thu, 26 Jul 2018 18:31:05 +0000
(20:31 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit
590d1cc74fe98c2659f250ecdff8801bd9d8fc0d
)
modules/luci-base/htdocs/luci-static/resources/cbi.js
patch
|
blob
|
history
diff --git
a/modules/luci-base/htdocs/luci-static/resources/cbi.js
b/modules/luci-base/htdocs/luci-static/resources/cbi.js
index 9d79b81c19b4184014d202a9cedd41bfeb6501a6..fcfc5069426685da91362906040a31533765f8e7 100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/cbi.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/cbi.js
@@
-627,6
+627,18
@@
function cbi_init() {
s.parentNode.classList.add('cbi-tooltip-container');
});
+ document.querySelectorAll('.cbi-section-remove > input[name^="cbi.rts"]').forEach(function(i) {
+ var handler = function(ev) {
+ var bits = this.name.split(/\./),
+ section = document.getElementById('cbi-' + bits[2] + '-' + bits[3]);
+
+ section.style.opacity = (ev.type === 'mouseover') ? 0.5 : '';
+ };
+
+ i.addEventListener('mouseover', handler);
+ i.addEventListener('mouseout', handler);
+ });
+
cbi_d_update();
}