From 326b6876a92ea6034d7b8e6e4920b2d11b1a8981 Mon Sep 17 00:00:00 2001 From: PiBa-NL Date: Sun, 1 Nov 2015 19:12:35 +0100 Subject: haproxy-devel, cleaner layout for new table detail records created by javascript --- config/haproxy-devel/pkg/haproxy_htmllist.inc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'config/haproxy-devel') diff --git a/config/haproxy-devel/pkg/haproxy_htmllist.inc b/config/haproxy-devel/pkg/haproxy_htmllist.inc index 4e8ce428..7eaad023 100644 --- a/config/haproxy-devel/pkg/haproxy_htmllist.inc +++ b/config/haproxy-devel/pkg/haproxy_htmllist.inc @@ -63,7 +63,7 @@ class HaproxyHtmlList phparray_to_javascriptarray($table_def, "tabledefinition_".$this->tablename,Array('/*','/*/*')); phparray_to_javascriptarray($this->fields, "fields_".$this->tablename,Array('/*','/*/name','/*/type','/*/text','/*/size','/*/items','/*/items/*','/*/items/*/*','/*/items/*/*/name')); if (count($this->fields_details) != 0) { - phparray_to_javascriptarray($this->fields_details,"fields_details_".$this->tablename,Array('/*','/*/name','/*/columnheader','/*/type','/*/text','/*/size','/*/items','/*/items/*','/*/items/*/*','/*/items/*/*/name','/*/items/*/*/name')); + phparray_to_javascriptarray($this->fields_details,"fields_details_".$this->tablename,Array('/*','/*/name','/*/columnheader','/*/description','/*/type','/*/text','/*/size','/*/items','/*/items/*','/*/items/*/*','/*/items/*/*/name','/*/items/*/*/name')); } } @@ -476,13 +476,19 @@ function haproxy_htmllist_js(){ tr.appendChild(td); td = d.createElement("td"); table = d.createElement("table"); + table.setAttribute("cellspacing","0"); for (var i in items) { field = items[i]; fieldhtml = createFieldHtml(tableId, field, totalrows); subtr = d.createElement("tr"); subtr.setAttribute("id","tr_edititemdetails_" + totalrows + "_" + field['name']); subtd = d.createElement("td"); - subtd.innerHTML = field['columnheader'] + ": " + fieldhtml; + subtd.setAttribute("class","vncell"); + subtd.innerHTML = field['columnheader'] + ": "; + subtr.appendChild(subtd); + subtd = d.createElement("td"); + subtd.setAttribute("class","vncell"); + subtd.innerHTML = field['description'] + "
" + fieldhtml; subtr.appendChild(subtd); table.appendChild(subtr); } -- cgit v1.2.3