aboutsummaryrefslogtreecommitdiffstats
path: root/js/shop.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/shop.js')
-rw-r--r--js/shop.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/js/shop.js b/js/shop.js
index bda3885..a2f14ad 100644
--- a/js/shop.js
+++ b/js/shop.js
@@ -3,16 +3,14 @@ function displayShop(ret) {
for(var key in ret.items){
if(ret.items.hasOwnProperty(key)){
var category = ret.items[key];
- tmphtml += "<div class=\"row\">";
tmphtml += "<h4>"+key+"</h4>";
tmphtml += "<ul class=\"list-inline\">";
for(var i=0; i < category.length; i++) {
tmphtml += "<li>";
- tmphtml += "<button type=\"button\" class=\"btn btn-primary\" onclick=\"buyItem('" + category[i].name + "')\"><span class=\"item-icon\">" + category[i].icon + "</span><br />" + category[i].name + "</button>";
+ tmphtml += "<button type=\"button\" class=\"btn btn-success\" onclick=\"buyItem('" + category[i].name + "')\"><span class=\"item-icon\">" + category[i].icon + "</span><br />" + category[i].name + "</button>";
tmphtml += "</li>";
}
tmphtml += "</ul>";
- tmphtml += "</div>";
}
}
document.getElementById("tab2").innerHTML = tmphtml;
@@ -37,7 +35,7 @@ function addItem(ret) {
var itemtag = document.querySelector("[data-name=\""+ret[0].name+"\"]");
if(!itemtag){ //si c'est la première itération de l'objet
itemhtml += "<li>";
- itemhtml += "<button type=\"button\" class=\"btn btn-primary\" onclick=\"useItem('" + ret[0].name + "')\"><span class=\"item-icon\">" + ret[0].icon + "</span><br />" + ret[0].name + "(<span data-name=\""+ ret[0].name + "\">"+ret[1]+"</span>)</button>";
+ itemhtml += "<button type=\"button\" class=\"btn btn-success\" onclick=\"useItem('" + ret[0].name + "')\"><span class=\"item-icon\">" + ret[0].icon + "</span><br />" + ret[0].name + "(<span data-name=\""+ ret[0].name + "\">"+ret[1]+"</span>)</button>";
itemhtml += "</li>";
}
else{ // si c'est une n-ième itération
@@ -48,7 +46,7 @@ function addItem(ret) {
if(invcontent.children.length <= 1)
{
- var tmphtml = "<h4>Your bag contains the following items:</h4>";
+ var tmphtml = "<h3>Your bag contains the following items:</h3>";
tmphtml += "<ul class=\"list-inline\">";
tmphtml += itemhtml;
tmphtml += "</ul>"