From a2d805d6f4d781a62cac16055a529e0958034ba9 Mon Sep 17 00:00:00 2001 From: "Eric A. Miller" Date: Wed, 20 Aug 2014 22:21:38 -0400 Subject: [PATCH] Add span tags to node properties to facilitate javascript show/hide functionality --- Netdisco/share/views/ajax/device/ports.tt | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Netdisco/share/views/ajax/device/ports.tt b/Netdisco/share/views/ajax/device/ports.tt index 2b744afa..4c5cd117 100644 --- a/Netdisco/share/views/ajax/device/ports.tt +++ b/Netdisco/share/views/ajax/device/ports.tt @@ -504,10 +504,10 @@ $(document).ready(function() { + he.encode(fmac) + ''; [% IF params.n_vendor %] if (row.nodes[index].abbrev) { - cell_str += ' (' + cell_str += ' (' + '' - + he.encode(row.nodes[index].abbrev || '') + ')'; + + he.encode(row.nodes[index].abbrev || '') + ')'; } [% END %] if (row.nodes[index].vlans.length > 0) { @@ -521,17 +521,18 @@ $(document).ready(function() { arr = jQuery.map( arr, function( a ) { return '' + he.encode(a) + ''; }); - cell_str += ' (SSID: ' + arr.join(" ") + ')'; + cell_str += ' (SSID: ' + arr.join(" ") + ')'; } [% END %] [% IF params.n_age %] - cell_str += ' ('; + cell_str += ' ('; var now = moment(); var t_last = moment(row.nodes[index].time_last); - cell_str += t_last.from(now) + ')'; + cell_str += t_last.from(now) + ')'; [% END %] [% IF params.n_ip %] - if (row.nodes[index].ip && row.nodes[index].ip.length > 0) { + if (row.nodes[index].ip && row.nodes[index].ip.length > 0) { + cell_str += ''; for (idx = 0; idx < row.nodes[index].ip.length; ++idx) { if (row.nodes[index].ip_active[idx] === 0) { [% IF params.n_archived %] @@ -553,11 +554,13 @@ $(document).ready(function() { cell_str += he.encode(row.nodes[index].ip[idx]) + ''; } } + cell_str += ''; } [% END %] [% IF params.n_netbios %] if (row.nodes[index].nbname) { - cell_str += '
     \\\\' + + '
     \\\\
' + nb_dom + '\\' @@ -568,7 +571,7 @@ $(document).ready(function() { cell_str += nb_user + '@' + '' - + he.encode(row.nodes[index].nb_ip) + ''; + + he.encode(row.nodes[index].nb_ip) + ''; } [% END %] }