From 349c6fe7ecf10e5929dc27c2446853f0fe416077 Mon Sep 17 00:00:00 2001 From: alexichi Date: Wed, 27 Apr 2016 12:59:51 +0200 Subject: add loadShop() and categories in the xml file and modify the presentation of the items in the shop --- js/shop.js | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'js') diff --git a/js/shop.js b/js/shop.js index 22ca85f..efd6ac5 100644 --- a/js/shop.js +++ b/js/shop.js @@ -1,12 +1,20 @@ function displayShop(ret) { - var tmphtml = "

Select an item to buy it:

"; - tmphtml += "" document.getElementById("tab2").innerHTML = tmphtml; } @@ -40,7 +48,7 @@ function addItem(ret) { } else invcontent.getElementsByTagName('ul')[0].innerHTML += itemhtml; - showInfo(ret.desc); + showInfo("The "+ ret.name + " has been successfully purchased"); } function buyItem(name) { -- cgit v1.2.3-54-g00ecf