aboutsummaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorpiernov <piernov@piernov.org>2016-05-07 13:31:15 +0200
committerpiernov <piernov@piernov.org>2016-05-07 13:31:15 +0200
commit25556ed4765a897996fba7fb4b0776f043d47cb9 (patch)
treee37b583f0e0aee84858d3c9e2822adfac6cdaf48 /js
parentacfc0e766e266e60302a1cf1f4b18da759eb0243 (diff)
downloadcandybox-25556ed4765a897996fba7fb4b0776f043d47cb9.tar.gz
candybox-25556ed4765a897996fba7fb4b0776f043d47cb9.tar.bz2
candybox-25556ed4765a897996fba7fb4b0776f043d47cb9.tar.xz
candybox-25556ed4765a897996fba7fb4b0776f043d47cb9.zip
btn-primary → btn-success
Diffstat (limited to 'js')
-rw-r--r--js/dungeon.js8
-rw-r--r--js/shop.js8
2 files changed, 7 insertions, 9 deletions
diff --git a/js/dungeon.js b/js/dungeon.js
index d20a3cf..4fb226d 100644
--- a/js/dungeon.js
+++ b/js/dungeon.js
@@ -8,7 +8,7 @@ function buildDungeon(){
function displayDungeon(){
var tmphtml = "<br/>";
- tmphtml += "<button id=\"launch\" type=\"button\" class=\"btn btn-primary\" onclick=\"launchDungeon()\">Launch</button>";
+ tmphtml += "<button id=\"launch\" type=\"button\" class=\"btn btn-success\" onclick=\"launchDungeon()\">Launch</button>";
document.getElementById("tab4").innerHTML = tmphtml;
}
@@ -24,13 +24,13 @@ function displayBattle(ret){
tmphtml += "<h4>Battle</h4>";
tmphtml += "<ul class=\"list-inline\">";
tmphtml += "<li>";
- tmphtml += "<button type=\"button\" class=\"btn btn-primary\" style=\"margin-left:30px;\"><span class=\"item-icon\">" + data.icon + "</span><br />" + data.name + "<br/> lv: " + data.level + " <span id=\"lifeMob\">hp: " + data.hp + "</span></button>";
- tmphtml += "<button type=\"button\" class=\"btn btn-primary\" style=\"margin-left:30px;\"><span class=\"item-icon\">" + ret[0].icon + "</span><br />" + ret[0].name + "<br/> lv: " + ret[0].level + " <span id=\"lifeMob\">hp: " + ret[0].hp + "</span></button>";
+ tmphtml += "<button type=\"button\" class=\"btn btn-success\" style=\"margin-left:30px;\"><span class=\"item-icon\">" + data.icon + "</span><br />" + data.name + "<br/> lv: " + data.level + " <span id=\"lifeMob\">hp: " + data.hp + "</span></button>";
+ tmphtml += "<button type=\"button\" class=\"btn btn-success\" style=\"margin-left:30px;\"><span class=\"item-icon\">" + ret[0].icon + "</span><br />" + ret[0].name + "<br/> lv: " + ret[0].level + " <span id=\"lifeMob\">hp: " + ret[0].hp + "</span></button>";
tmphtml += "</li>";
tmphtml += "</ul>";
tmphtml += "</div>";
tmphtml += "<br/><br/>";
- tmphtml += "<button type=\"button\" class=\"btn btn-primary\" onclick=\"exitDungeon()\">Exit</button>";
+ tmphtml += "<button type=\"button\" class=\"btn btn-success\" onclick=\"exitDungeon()\">Exit</button>";
document.getElementById("tab4").innerHTML = tmphtml;
}
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>"