legacy
root 5 years ago
parent d87e6ef903
commit d035627d04

@ -21,6 +21,8 @@
<title style="text-transform: capitalize">{{product.replace('-',' ')}}</title> <title style="text-transform: capitalize">{{product.replace('-',' ')}}</title>
<script> <script>
sessionStorage.context = "{{context|safe}}" sessionStorage.context = "{{context|safe}}"
var url = {{ session['cloud-view'] |tojson}}
var signup_form = function(index,caller){ var signup_form = function(index,caller){
@ -50,10 +52,12 @@
var http = HttpClient.instance() var http = HttpClient.instance()
http.get('{{context}}/card.html') http.get('{{context}}/card.html')
} }
console.log("{{ session['cloud-view']}}")
/* /*
* Binding buttons to oauth 2.0 interface * Binding buttons to oauth 2.0 interface
*/ */
var bind = function(data){ var bind = function(data){
var buttons = $('.signup-button') var buttons = $('.signup-button')
jx.utils.patterns.visitor(buttons,function(button){ jx.utils.patterns.visitor(buttons,function(button){
$(button).attr('data',data) $(button).attr('data',data)
@ -63,8 +67,10 @@
var protocol = window.location.href.match(/^(https|http)/)[0] var protocol = window.location.href.match(/^(https|http)/)[0]
var host = window.location.href.match(/^.+\/\/([a-z,-,.]+)\/.+$/)[1] var host = window.location.href.match(/^.+\/\/([a-z,-,.]+)\/.+$/)[1]
var key = ([protocol,'://',host,'/cloud-view/oauth']).join('') var key = ([protocol,'://',host,'/cloud-view/oauth']).join('')
//jx.cloudview.init(host,protocol)
jx.cloudview.init(host,protocol) jx.cloudview.init("{{session['cloud-view']|safe}}")
jx.cloudview.oauth.init(id,key,function(p){ jx.cloudview.oauth.init(id,key,function(p){
// //
// @TODO: // @TODO:

Loading…
Cancel
Save