Commit 24d9d418 authored by Jérémie Passerat's avatar Jérémie Passerat

1ere version tableau contenu panier

parent bac81109
<template> <template>
<div> <div>
Maj <span class="niveau" id="recues" v-on:click="naviguer">Maj Recues</span><br>
<div id="detailRecues" class="masque"><p>Liste des maj recues</p></div>
<span class="niveau" id="proposees" v-on:click="naviguer">Maj Proposées</span>
<div id="detailProposees" class="masque"><p>Liste des maj proposees</p></div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: "Maj" name: "Maj",
methods: {
naviguer: function (e) {
e.target.classList.toggle("niveau-down")
//alert(e.target.id)
document.getElementById("detail" + e.target.id[0].toUpperCase() + e.target.id.substring(1)).classList.toggle('affiche')
}
}
} }
</script> </script>
<style scoped> <style scoped>
div{
text-align: center;
}
.niveau::before {
content: "\25B6";
color: black;
display: inline-block;
margin-left: 2px;
margin-right: 4px;
}
.niveau-down::before {
transform: rotate(90deg);
}
.masque {
display: none;
}
.affiche {
display: block;
}
</style> </style>
\ No newline at end of file
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
width: 100px; width: 100px;
background: white; background: white;
border: thin solid black; border: thin solid black;
margin-top: 1px; margin-top: 100px;
margin-left: 93.5%; margin-left: 93.5%;
position: absolute; position: absolute;
display: flex; display: flex;
......
<template> <template>
<div> <div>
Profil <p id="infoTitre"> Vos informations : </p>
<p> Auteur : </p>
<p> Ecole : </p>
<p> "Note" : </p>
<p> "Publications" : </p>
<button class="changermdp" v-on:click="modeEdition">ChangerMdp</button>
<div id="editMode" v-show="editMode">
<label for="mdp1">Entrer le nouveau mdp</label>
<input type="password" id="mdp1"> <br>
<label for="mdp1">Entrer a nouveau votre mdp</label>
<input type="password" id="mdp2"> <br>
<button class="changermdp" v-on:click="validerChangement">Valider</button>
</div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: "Profil" name: "Profil",
data: function () {
return {
editMode: false,
}
},
methods: {
modeEdition: function () {
this.editMode = ! this.editMode
},
validerChangement: function (){
alert ('mot de passe changé')
this.editMode = ! this.editMode
}
}
} }
</script> </script>
<style scoped> <style scoped>
div{
text-align: center;
}
#infoTitre {
text-decoration: underline;
}
.changermdp{
width: auto;
}
#editMode{
display: flex;
flex-direction: column;
width: 350px;
align-items: center;
margin: 10px auto 0;
}
</style> </style>
\ No newline at end of file
<template> <template>
<div> <div>
Tags <p>Tags (a définir et à réaliser)</p>
</div> </div>
</template> </template>
...@@ -11,5 +11,7 @@ export default { ...@@ -11,5 +11,7 @@ export default {
</script> </script>
<style scoped> <style scoped>
p {
text-align: center;
}
</style> </style>
\ No newline at end of file
<template> <template>
<div> <div>
<button id="changerVariante" v-on:click="changerVariante">changer</button> <button id="changerVariante" v-on:click="changerVariante">changer</button>
<div id="ensemble"> <div id="principal">
<button id="boutonVolet" v-on:click="desactiverVolet"></button> <div id="ensemble">
<div class="full" id="volet" v-show="isActif"> <button id="boutonVolet" v-on:click="desactiverVolet"></button>
<Volet_Menu v-bind:mode-choisi = "modeChoisi" @filtre_choisi="passerFiltre"/> <div class="full" id="volet" v-show="isActif">
<Volet_Contenu @mode_choisi="ajusterMode" v-bind:filtre_choisi="filtre_choisi" v-bind:variante="variante"/> <Volet_Menu v-bind:mode-choisi = "modeChoisi" @filtre_choisi="passerFiltre"/>
<Volet_Contenu @mode_choisi="ajusterMode" v-bind:filtre_choisi="filtre_choisi" v-bind:variante="variante"/>
</div>
</div>
<div id="tableau">
<table>
<thead>
<tr>
<th colspan="7">Contenus</th>
</tr>
</thead>
<tr>
<th>Titre</th>
<th>Version actuelle</th>
<th>Date Version actuelle</th>
<th>Nbre d'Utilisations</th>
<th>Likes</th>
<th>Tags</th>
<th v-on:click="supprimerContenus"><img src="../assets/img/balai.png" alt="pipi" height=20 width=20/></th>
</tr>
<tbody>
<tr v-for="(index) in contenus" :key="index">
<td class="titreContenu">{{ index }}</td>
<td>with two columns</td>
<td>The table body</td>
<td>with two columns</td>
<td>with two columns</td>
<td>with two columns</td>
<td class="boutonSupprimer"> <input type="checkbox" id="horns" name="horns"/></td>
</tr>
<!-- <tr>
<td class="titreContenu">Titre td</td>
<td>with two columns</td>
<td>The table body</td>
<td>with two columns</td>
<td>with two columns</td>
<td>with two columns</td>
<td class="boutonSupprimer"><input type="checkbox" id="horns" name="horns"/></td>
</tr>-->
</tbody>
</table>
</div>
</div>
<div class="circle" v-on:click="ajouterContenu" v-bind:style="{'margin-left': '95%'}">
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
...@@ -30,7 +80,8 @@ export default { ...@@ -30,7 +80,8 @@ export default {
isActif: true, isActif: true,
modeChoisi: "Panier", modeChoisi: "Panier",
filtre_choisi: "", filtre_choisi: "",
variante: false variante: false,
contenus: []
} }
}, },
mounted() { mounted() {
...@@ -54,9 +105,24 @@ export default { ...@@ -54,9 +105,24 @@ export default {
changerVariante: function (){ changerVariante: function (){
this.variante = ! this.variante this.variante = ! this.variante
this.$emit("choix_variante", {variante: this.variante}) this.$emit("choix_variante", {variante: this.variante})
},
supprimerContenus: function () {
/*/ $(':checkbox:checked').each(function () {
console.log($(this).prev(".titreContenu").id)
})*/
let inputs = document.querySelectorAll("input[type='checkbox']")
for(let i = 0; i < inputs.length; i++) {
if ( inputs[i].checked)
inputs[i].parentElement.parentElement.style.display='none'
}
},
ajouterContenu: function () {
this.contenus.push("nouveau contenu")
} }
} }
} }
...@@ -64,6 +130,34 @@ export default { ...@@ -64,6 +130,34 @@ export default {
<style scoped> <style scoped>
#principal {
display: flex;
}
table {
margin-top: 97.5px;
margin-left: 20px;
width: 1550px;
}
th,
td {
border: 1px solid #333;
}
td {
text-align: center;
vertical-align: middle;
}
thead,
tfoot {
background-color: #333;
color: #fff;
}
#volet{ #volet{
position: relative; position: relative;
width: 300px; width: 300px;
...@@ -82,5 +176,18 @@ export default { ...@@ -82,5 +176,18 @@ export default {
width: auto; width: auto;
} }
.circle {
border: 1px solid black ;
margin-top: 1%;
border-radius: 50%;
display: flex; /* or inline-flex */
align-items: center;
justify-content: center;
height: 75px;
width: 75px;
background: white url(../assets/img/plus.png);
background-size: cover;
}
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment