Module: check_mk
Branch: master
Commit: e26c836337ded8c71b7b5f5da14094f829025632
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e26c836337ded8…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sat Feb 16 19:24:09 2013 +0100
FIX: list of strings (e.g. host list in rule editor) didn't work anymore
---
ChangeLog | 1 +
web/htdocs/js/checkmk.js | 7 +++----
web/htdocs/wato.py | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e2377f3..78c2152 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,7 @@
Multisite:
* FIX: Removed uuid module dependency to be compatible to python < 2.5
* FIX: remove Javascript debug popup from multi-string input fields
+ * FIX: list of strings (e.g. host list in rule editor) didn't work anymore
1.2.2b2:
Checks & Agents:
diff --git a/web/htdocs/js/checkmk.js b/web/htdocs/js/checkmk.js
index cf9fa15..510b2a0 100644
--- a/web/htdocs/js/checkmk.js
+++ b/web/htdocs/js/checkmk.js
@@ -1503,9 +1503,8 @@ function valuespec_toggle_dropdownn(oDropdown, divid) {
/* This function is called after the table with of input elements
has been rendered. It attaches the onFocus-function to the last
- of the input elements. The reason is, that ListOfString does not render
- the input fields itself. This does so other ValueSpec element
- where we have no access to */
+ of the input elements. That function will append another
+ input field as soon as the user focusses the last field. */
function list_of_strings_init(divid) {
var oContainer = document.getElementById(divid);
var numChilds = oContainer.childNodes.length;
@@ -1551,7 +1550,7 @@ function list_of_strings_extend(oInput, j) {
var oNewDiv = document.createElement("DIV");
oNewDiv.innerHTML = oDiv.innerHTML.replace('"' + oldName +
'"', '"' + newName + '"');
// IE7 does not have quotes in innerHTML, trying to workaround this here.
- oNewDiv.innerHTML = oDiv.innerHTML.replace('=' + oldName + ' ',
'=' + newName + ' ');
+ oNewDiv.innerHTML = oNewDiv.innerHTML.replace('=' + oldName + ' ',
'=' + newName + ' ');
oContainer.appendChild(oNewDiv);
/* Move focus function from old last to new last input field */
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 6c19801..eb18733 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -10159,7 +10159,7 @@ def render_conditions(ruleset, tagspecs, host_list, item_list,
varname, folder):
if host_list != ALL_HOSTS:
condition = None
if host_list == []:
- condition = _("This rule does <b>never</b> apply!")
+ condition = _("This rule does <b>never</b> apply due to an
empty list of explicit hosts!")
elif host_list[-1] != ALL_HOSTS[0]:
tt_list = []
for h in host_list: