Module: check_mk
Branch: master
Commit: 62776558120853471436e45050c648b44d4c215e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=62776558120853…
Author: Roland Halbig <rh(a)mathias-kettner.de>
Date: Thu Feb 23 10:10:17 2017 +0100
Fixed html refactoring bug causing problems with javascript
Change-Id: I6f3f00f529be8190f237527336de6ab2ae748b9e
---
web/htdocs/htmllib.py | 2 +-
web/htdocs/js/checkmk.js | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 82c7417..ad66baf 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -609,7 +609,7 @@ class HTMLGenerator(Escaper, OutputFunnel):
def write_html(self, content):
""" Write HTML code directly, without escaping.
"""
- self.write(content + "\n")
+ self.write(content)
def comment(self, comment_text):
diff --git a/web/htdocs/js/checkmk.js b/web/htdocs/js/checkmk.js
index c6b6215..86e716a 100644
--- a/web/htdocs/js/checkmk.js
+++ b/web/htdocs/js/checkmk.js
@@ -1922,8 +1922,8 @@ function valuespec_toggle_dropdownn(oDropdown, divid) {
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;
- var oLastChild = oContainer.childNodes[numChilds-1];
+ var oDivChildren = oContainer.getElementsByTagName("div")
+ var oLastChild = oDivChildren[oDivChildren.length-1];
list_of_strings_add_focus(oLastChild);
}