bug fix with lifecycle

legacy
Steve L. Nyemba 4 years ago
parent b8db0b5caa
commit 11d99ff440

@ -113,7 +113,7 @@
} */ } */
</style> </style>
<script> <script>
sessionStorage.context = "{{context|safe}}" sessionStorage.store_context = "{{context|safe}}"
sessionStorage.pricing = JSON.stringify({{pricing|tojson}}) sessionStorage.pricing = JSON.stringify({{pricing|tojson}})
sessionStorage.customer = JSON.stringify({info:{}}) sessionStorage.customer = JSON.stringify({info:{}})
var cards = { var cards = {
@ -157,7 +157,7 @@
// @TODO: Generalize this to a function call (poor programming) // @TODO: Generalize this to a function call (poor programming)
customer.info[field] = value customer.info[field] = value
sessionStorage.customer = JSON.stringify(customer) sessionStorage.customer = JSON.stringify(customer)
var link = ([sessionStorage.context,'/static/img/cards/',r[0]+'.svg']).join('') var link = ([sessionStorage.store_context,'/static/img/cards/',r[0]+'.svg']).join('')
jx.dom.set.attribute('pay-icon','src',link) jx.dom.set.attribute('pay-icon','src',link)
return 1 return 1
}else{ }else{
@ -181,7 +181,7 @@
} }
checkout.dialog = function(title,message,type){ checkout.dialog = function(title,message,type){
ICONS = {'WARN':'fas fa-exclamation-triangle','CHECK':'fas fa-check fa-3x','PROGRESS':'fas fa-cog fa-spin'} ICONS = {'WARN':'fas fa-exclamation-triangle','CHECK':'fas fa-check fa-3x','PROGRESS':'fas fa-cog fa-spin'}
var uri = ([sessionStorage.context,'/ui/dialog']).join('') var uri = ([sessionStorage.store_context,'/ui/dialog']).join('')
var info = {title:title,message:message,icon:ICONS[type],type:type} var info = {title:title,message:message,icon:ICONS[type],type:type}
var httpclient = HttpClient.instance() var httpclient = HttpClient.instance()
httpclient.setData( JSON.stringify(info)) httpclient.setData( JSON.stringify(info))
@ -233,7 +233,7 @@
// //
info.amount = info.amount * 100 info.amount = info.amount * 100
$('.dialog > .message').text('Processing card, please wait ...') $('.dialog > .message').text('Processing card, please wait ...')
var uri = ([sessionStorage.context,'/{{product.name|safe}}/pay']).join('/') var uri = ([sessionStorage.store_context,'/{{product.name|safe}}/pay']).join('/')
var http = HttpClient.instance() var http = HttpClient.instance()
http.setData(JSON.stringify(info)) http.setData(JSON.stringify(info))
http.setHeader('content-type','application/json') http.setHeader('content-type','application/json')

Loading…
Cancel
Save