summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-07-23 15:06:26 +0200
committerJo-Philipp Wich <jo@mein.io>2018-07-23 15:06:26 +0200
commit590d1cc74fe98c2659f250ecdff8801bd9d8fc0d (patch)
treebe077d2de8c588a598a3e82e4ff20c56521e4337 /modules
parent875b561875cb4eca4c913c69ce2dfd21265b6ac6 (diff)
luci-base: cbi.js: fade to-be-deleted section when hovering delete button
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/cbi.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js
index 9d79b81c1..fcfc50694 100644
--- 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();
}