Skip to content

Commit

Permalink
HdomainIpCombo - changed formatResult
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverFire committed Oct 17, 2015
1 parent 557aa48 commit 8265b2b
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/widgets/ip/HdomainIpCombo.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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));
}
Expand Down

0 comments on commit 8265b2b

Please sign in to comment.