You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/02/13 23:59:38 UTC

[20/35] git commit: refs/heads/master - UI Detail view: support external links

UI Detail view: support external links

If externalLink is specified in detail view field attributes, then
render its value as <a> hyperlink.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/b18bca65
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/b18bca65
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/b18bca65

Branch: refs/heads/master
Commit: b18bca651ffed5141c388f13d341c6917bed90f6
Parents: 806105f
Author: Brian Federle <br...@citrix.com>
Authored: Tue Jan 29 14:32:51 2013 -0800
Committer: Brian Federle <br...@citrix.com>
Committed: Tue Jan 29 14:32:51 2013 -0800

----------------------------------------------------------------------
 ui/scripts/ui/widgets/detailView.js |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b18bca65/ui/scripts/ui/widgets/detailView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/detailView.js b/ui/scripts/ui/widgets/detailView.js
index 4b4fbd5..0b74d90 100644
--- a/ui/scripts/ui/widgets/detailView.js
+++ b/ui/scripts/ui/widgets/detailView.js
@@ -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);