diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-02-27 07:34:28 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-02-27 07:34:28 +0000 |
commit | c9df0701735739979fc674bb8f08f76c591cf8e0 (patch) | |
tree | 9c64157039d8ac271de4ecdcd46b466a85f760ec /sca-cpp/trunk/modules/edit/htdocs/graph/graph.js | |
parent | 60646adbdaea14ad20182cfa9e2a4b71573201f4 (diff) |
Fixes to make the edit module work with HTTPS.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1074997 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | sca-cpp/trunk/modules/edit/htdocs/graph/graph.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js b/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js index 5e1de60c65..fdf7dde3a1 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js +++ b/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js @@ -1838,10 +1838,12 @@ graph.edit = function(appname, compos, nodes, onchange, g) { * Return the link to a component value. */ graph.compvaluelink = function(appname, cname) { - var scheme = 'http'; - var domain = "sca-store.com"; - var port = '8090'; - var link = scheme + '://' + appname + '.' + domain + ':' + port + '/components/' + cname; + var protocol = window.location.protocol; + var host = window.location.hostname; + var port = ':' + window.location.port; + if (port == ':80' || port == ':443') + port = ''; + var link = protocol + '//' + appname + '.' + host + port + '/components/' + cname; return '<a href="' + link + '">' + link + '</a>'; }; |