Module: check_mk
Branch: master
Commit: 2fadf55f746ac4fd03473d723d26e79fe6c5368b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2fadf55f746ac4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jan 30 07:30:12 2017 +0100
Fixed accidently scrolled ListChoice() in many WATO dialogs
Change-Id: I835a6619e458816712de0f96518f3dff5b44aa05
---
web/htdocs/check_mk.css | 7 +++++++
web/htdocs/valuespec.py | 30 +++++++++++-------------------
2 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/web/htdocs/check_mk.css b/web/htdocs/check_mk.css
index 7a8cbbc..d2f59c4 100644
--- a/web/htdocs/check_mk.css
+++ b/web/htdocs/check_mk.css
@@ -613,6 +613,13 @@ table.listchoice td input[type=checkbox] {
height: 12px;
}
+div.floatfilter.double > div.content > table.listchoice {
+ display: block;
+ height: 80px;
+ overflow: hidden;
+ overflow-y:scroll;
+}
+
div.popup_container {
position: relative;
}
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index efe48bf..3b770d3 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -2006,25 +2006,17 @@ class ListChoice(ValueSpec):
if self._toggle_all:
html.a(_("Check / Uncheck all"),
href="javascript:vs_list_choice_toggle_all('%s')" % varprefix)
- if self._columns > 1:
- html.open_table(id_="%s_tbl" % varprefix,
class_=["listchoice"])
- for nr, (key, title) in enumerate(elements):
- if nr % self._columns == 0:
- if nr > 0:
- html.close_tr()
- html.open_tr()
- html.open_td()
- html.checkbox("%s_%d" % (varprefix, nr), key in value, label =
title)
- html.close_td()
- html.close_tr()
- html.close_table()
- else:
- html.open_div(style="height:80px;overflow:hidden;
overflow-y:scroll;")
- for nr, (key, title) in enumerate(elements):
- html.open_div()
- html.checkbox("%s_%d" % (varprefix, nr), key in value, label =
title)
- html.close_div()
- html.close_div()
+ html.open_table(id_="%s_tbl" % varprefix,
class_=["listchoice"])
+ for nr, (key, title) in enumerate(elements):
+ if nr % self._columns == 0:
+ if nr > 0:
+ html.close_tr()
+ html.open_tr()
+ html.open_td()
+ html.checkbox("%s_%d" % (varprefix, nr), key in value, label =
title)
+ html.close_td()
+ html.close_tr()
+ html.close_table()
def render_input(self, varprefix, value):