UI Detail view: support external links

If externalLink is specified in detail view field attributes, then
render its value as <a> hyperlink.
This commit is contained in:
Brian Federle 2013-01-29 14:32:51 -08:00
parent 806105f9a1
commit b18bca651f
1 changed files with 10 additions and 1 deletions

View File

@ -823,7 +823,16 @@
*/
$name.html(_l(value.label));
$value.html(_s(content));
if (!value.isExternalLink) {
$value.html(_s(content));
} else {
$value.html('').append(
$('<a>').attr({
href: _s(content)
}).html(_s(content))
);
}
// Set up validation metadata
$value.data('validation-rules', value.validation);