Compare commits

..

No commits in common. "8fa40620159e31e1b5e51fb38d8d865a9d38f553" and "97b06fe9200756fe0ec72f8f910649f4222a5862" have entirely different histories.

5 changed files with 5 additions and 39 deletions

View file

@ -38,7 +38,6 @@ img {
table {
width: 100%;
border-collapse: collapse;
border: 1px solid #ddd;
}

View file

@ -12,7 +12,7 @@
<script src="./js/element.js"></script>
<div id="div_button_score">
<script src="./js/technologie.js"></script>
<div id="divButton_score">
</div>
<table>

View file

@ -4,7 +4,7 @@ class Element{
this.techno = techno
}
chargerDepuisBdd(){
charger_depuis_bdd(){
fetch("../bdd/arbre.json").then((data)=>{
data.json().then((data)=>{
this.props = data["technologies"][this.techno]["elements"][this.tag]
@ -16,7 +16,7 @@ class Element{
})
}
afficherDropsDansHtml(){
afficher_props_dans_html(){
const table= document.getElementById("table_technologies_body")
const tr = document.createElement("tr")

View file

@ -1,33 +0,0 @@
function remplirMagasin(){
const table= document.getElementById("table_magasin_body")
fetch("../bdd/arbre.json").then((data)=>{
data.json().then((data)=>{
console.log(data)
let tech = data["technologies"]
Object.keys(tech).forEach(key => {
el = tech[key]
const tr = document.createElement("tr")
const nom = document.createElement("td")
nom.innerText = el.nom
const boost = document.createElement("td")
boost.innerText = el.boost
const cout = document.createElement("td")
cout.innerText = el.cout
tr.appendChild(nom)
tr.appendChild(boost)
tr.appendChild(cout)
table.appendChild(tr)
});
})
})
}

View file

@ -3,7 +3,7 @@ class Technologie{
this.nom = nom
}
chargerDepuisBdd(){
charger_depuis_bdd(){
fetch("../bdd/arbre.json").then((data)=>{
data.json().then((data)=>{
console.log(data)
@ -15,7 +15,7 @@ class Technologie{
})
}
appliquerAmeliorationStyle(){
appliquer_amelioration_style(){
document.getElementById("link-css").setAttribute("href","css/"+this.props.css_id)
}