summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/tutorials/store/assets/uiservices/store.html
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-07-03 13:34:44 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-07-03 13:34:44 +0000
commitf5a67eabb6d251a61eb958d7b54f4227f036faa7 (patch)
tree420cb95529879ae4006c54f275785aa9b4bf7dbb /branches/sca-java-1.x/tutorials/store/assets/uiservices/store.html
parentb9f1b28c3bd59ac74663def107679d34ab205a58 (diff)
Update assets and domain to support the enterprise example
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@790911 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--branches/sca-java-1.x/tutorials/store/assets/uiservices/store.html32
1 files changed, 28 insertions, 4 deletions
diff --git a/branches/sca-java-1.x/tutorials/store/assets/uiservices/store.html b/branches/sca-java-1.x/tutorials/store/assets/uiservices/store.html
index dfe28bb260..5f4182972e 100644
--- a/branches/sca-java-1.x/tutorials/store/assets/uiservices/store.html
+++ b/branches/sca-java-1.x/tutorials/store/assets/uiservices/store.html
@@ -51,6 +51,7 @@
}
function shoppingCart_getResponse(feed) {
+ document.getElementById("shoppingCart").innerHTML = "";
if (feed != null) {
var entries = feed.getElementsByTagName("entry");
var list = "";
@@ -99,25 +100,48 @@
}
}
function checkoutCart() {
+ var cartHtml = document.getElementById('shoppingCart').innerHTML;
+ var totalHtml = document.getElementById('total').innerHTML;
+
+ document.getElementById('shoppingCart').innerHTML = "";
+ document.getElementById('total').innerHTML = "";
+
document.getElementById('store').innerHTML='<h2>' +
'Thanks for Shopping With Us!</h2>'+
'<h2>Your Order</h2>'+
'<form name="orderForm">'+
- document.getElementById('shoppingCart').innerHTML+
+ cartHtml +
'<br>'+
- document.getElementById('total').innerHTML+
+ totalHtml +
'<br>'+
'<br>'+
- '<input type="submit" value="Continue Shopping">'+
+ '<input type="submit" value="Place Order" onClick="confirmTotal()">'+
'</form>';
- shoppingCart.del("", null);
}
+
function deleteCart() {
shoppingCart.del("", null);
document.getElementById('shoppingCart').innerHTML = "";
document.getElementById('total').innerHTML = "";
}
+ function confirmTotal() {
+ try {
+ shoppingTotal.confirmTotal(shoppingTotal_confirmTotalResponse);
+ alert("Order dispatched to warehouse");
+ }
+ catch(e) {
+ alert(e);
+ }
+ }
+
+ function shoppingTotal_confirmTotalResponse(exception) {
+ if(exception){
+ alert(exception.message);
+ return;
+ }
+ }
+
function init() {
try {
catalog.get(catalog_getResponse);