aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiernov <piernov@piernov.org>2016-05-08 13:45:16 +0200
committerpiernov <piernov@piernov.org>2016-05-08 13:45:16 +0200
commit206c01cb1d89e7b04553af7eaf363e2cfb0c1ee3 (patch)
treedcf6cf9077234d5130d5339663594442602a8dea
parent90e9e78500e09447cc3c26d129348eb3f0d2433d (diff)
downloadcandybox-206c01cb1d89e7b04553af7eaf363e2cfb0c1ee3.tar.gz
candybox-206c01cb1d89e7b04553af7eaf363e2cfb0c1ee3.tar.bz2
candybox-206c01cb1d89e7b04553af7eaf363e2cfb0c1ee3.tar.xz
candybox-206c01cb1d89e7b04553af7eaf363e2cfb0c1ee3.zip
Revert "add id to item in order to change the value client side"
This reverts commit 3795b462a30a1942f5ebac3105e72824acbd1a87.
-rw-r--r--js/shop.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/shop.js b/js/shop.js
index 053f7c8..ce0ecd8 100644
--- a/js/shop.js
+++ b/js/shop.js
@@ -35,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-success\" onclick=\"useItem('" + ret[0].name + "')\"><span class=\"item-icon\">" + ret[0].icon + "</span><br />" + ret[0].name + "(<span id=\"nbItem\" 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