diff --git a/src/widgets/ip/HdomainIpCombo.php b/src/widgets/ip/HdomainIpCombo.php index 67f0084d..d345c818 100644 --- a/src/widgets/ip/HdomainIpCombo.php +++ b/src/widgets/ip/HdomainIpCombo.php @@ -58,7 +58,8 @@ function (data) { used_ips[ip] = true if (v.links) { $.each(v.links, function(k,link) { - row.text = link.service + ': ' + ip; + row.text = ip; + row.service = link.service; }); } else { row.text = ip; @@ -69,8 +70,20 @@ function (data) { return {results: ret}; } - ") + "), ], + 'formatResult' => new JsExpression(" + function(row) { + if (!row.service) return row.text; + return row.service + ': ' + row.text; + } + "), + 'formatSelection' => new JsExpression(" + function(row) { + if (!row.service) return row.text; + return row.service + ': ' + row.text; + } + ") ] ], $options)); }