diff --git a/html/membres.html b/html/membres.html index cbf7e42452711e78078a2b34bfa231b654c24c9e..e1eb510a6bfbc6d8529518edff57e2e07d82a347 100644 --- a/html/membres.html +++ b/html/membres.html @@ -23,6 +23,10 @@ display: inline; background-color: #53bdbd; } + + .memberTab button.active{ + background-color: #e6881a; + } .tealBackground{ height: 579px; background-color: #008C8C; @@ -47,22 +51,28 @@ </div> <div class="memberTab"> <button id="memberSectionTab" >Section membres</button> - <button class="tablinks active" onclick="openTab(event, 'mission')">Liste des frigos</button> - <button class="tablinks" onclick="openTab(event, 'stats')">Trouver un repas</button> - <button class="tablinks" onclick="openTab(event, 'reglement')">Mon profil</button> - <button class="tablinks" onclick="openTab(event, 'inscription')">Mon panier</button> + <button class="tablinks active" onclick="openTab(event, 'listeFrigos')">Liste des frigos</button> + <button class="tablinks" onclick="openTab(event, 'chercherUnRepas')">Trouver un repas</button> + <button class="tablinks" onclick="openTab(event, 'profil')">Mon profil</button> + <button class="tablinks" onclick="openTab(event, 'panier')">Mon panier</button> </div> - <div class="tealBackground"> + + <div id="listeFrigos" class="tabcontent active"> + <iframe id="mbrcontent" src="listeFrigos.html" width="100%" height="800"></iframe> + </div> + + <div class="tealBackground"> <div id="test"></div> </div> </div> </body> </html> +<script src="../scripts/tabsAndErrors.js"></script> <script> - var test = document.getElementById('test'); + /*var test = document.getElementById('test'); for (var i = 1; i < 15 ; i++) { test.innerHTML += "<div id=\"button_"+i+"\">" + i + "</div>"; - }; + };*/ </script> \ No newline at end of file diff --git a/scripts/tabsAndErrors.js b/scripts/tabsAndErrors.js index 5bdc32fc060237909ada0d4a748d83a71dfe70d9..26a9cf8f40bad403341fb61b30eea04a92cc627c 100644 --- a/scripts/tabsAndErrors.js +++ b/scripts/tabsAndErrors.js @@ -2,8 +2,14 @@ function openTab(evt, tabName) { let tabcontent; - tabcontent = document.getElementById("content"); - tabcontent.src = 'html/' + tabName + '.html'; + + if(document.getElementById("content")) { + tabcontent = document.getElementById("content"); + tabcontent.src = 'html/' + tabName + '.html'; + } else { + tabcontent = document.getElementById("mbrcontent"); + tabcontent.src = tabName + '.html'; + } //Set unactive to tab buttons tablinks = document.getElementsByClassName("tablinks");