Module: check_mk
Branch: master
Commit: a2ab5f17d400191c6a9a253d089c0775579b2feb
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a2ab5f17d40019…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Oct 27 16:55:00 2015 +0100
Simplified iconbutton hover effect even more
---
web/htdocs/htmllib.py | 6 +-----
web/htdocs/js/checkmk.js | 7 -------
web/htdocs/pages.css | 2 +-
web/htdocs/sidebar.py | 6 +++---
4 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 0f2138a..6bf70db 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -425,9 +425,7 @@ class html:
return '<a %s%s%s%s%sonfocus="if (this.blur) this.blur();"
href="%s">' \
'<img align=absmiddle class=iconbutton title="%s"
' \
- 'src="images/button_%s.png" ' \
- 'onmouseover=\"hilite_icon(this, 1)\" ' \
- 'onmouseout=\"hilite_icon(this, 0)\">' \
+ 'src="images/button_%s.png">' \
'</a>' % (id, onclick, style, target, cssclass, url,
self.attrencode(help), icon)
@@ -1590,8 +1588,6 @@ class html:
self.write('<img align=absmiddle class=iconbutton '
'src="images/button_magic_move.png" '
'title="%s" '
- 'onmouseover="hilite_icon(this, 1)" '
- 'onmouseout="hilite_icon(this, 0)" '
'onclick="start_magic_move(\'%s\')" >' %
(
(helptext, ajax_url)))
diff --git a/web/htdocs/js/checkmk.js b/web/htdocs/js/checkmk.js
index b7273b3..342b182 100644
--- a/web/htdocs/js/checkmk.js
+++ b/web/htdocs/js/checkmk.js
@@ -90,13 +90,6 @@ function change_class(o, a, b) {
add_class(o, b);
}
-function hilite_icon(elem, onoff) {
- if (onoff == 0)
- remove_class(elem, "active");
- else
- add_class(elem, "active");
-}
-
function pageHeight() {
var h;
diff --git a/web/htdocs/pages.css b/web/htdocs/pages.css
index a889fd4..6740d7c 100644
--- a/web/htdocs/pages.css
+++ b/web/htdocs/pages.css
@@ -450,7 +450,7 @@ img.iconbutton {
padding: 0px 2px;
}
-img.iconbutton.active {
+img.iconbutton:hover {
opacity: 0.5;
filter: alpha(opacity=50); /* For IE8 and earlier */
}
diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py
index 034cb61..cc72fc0 100644
--- a/web/htdocs/sidebar.py
+++ b/web/htdocs/sidebar.py
@@ -112,9 +112,9 @@ def iconbutton(what, url, target="side",
handler="", name="", css_class = ""):
href = "%scheck_mk/%s" % (defaults.url_prefix, url)
tg = "target=%s" % target
css_class = css_class and " " + css_class or ""
- html.write("<a href=\"%s\" %s %s><img
class=\"iconbutton%s\" onmouseover=\"hilite_icon(this, 1)\" "
- "onmouseout=\"hilite_icon(this, 0)\" align=absmiddle
src=\"%scheck_mk/images/button_%s.png\"></a>\n " %
- (href, onclick, tg, css_class, defaults.url_prefix, what))
+ html.write("<a href=\"%s\" %s %s><img
class=\"iconbutton%s\" "
+ "align=absmiddle
src=\"%scheck_mk/images/button_%s.png\"></a>\n " %
+ (href, onclick, tg, css_class, defaults.url_prefix, what))
def nagioscgilink(text, target):
html.write("<li class=sidebar><a target=\"main\" class=link
href=\"%snagios/cgi-bin/%s\">%s</a></li>" % \