Commit 874ef56f authored by Jérémie Passerat's avatar Jérémie Passerat

Filtres de tableau fonctionnels

parent 7f2e0e54
...@@ -71,7 +71,7 @@ export default { ...@@ -71,7 +71,7 @@ export default {
background: white; background: white;
border: thin solid black; border: thin solid black;
margin-top: 100px; margin-top: 100px;
margin-left: 23.5%; margin-left: 93%;
position: absolute; position: absolute;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
......
...@@ -43,10 +43,11 @@ ...@@ -43,10 +43,11 @@
</tr> </tr>
<tbody> <tbody>
<tr v-show="panierChoisi" v-for="item in contenus" :key="item.titre" <tr v-show="panierChoisi && (persoChecked ** (item.provenance === 'perso')) && (tiersChecked ** (item.provenance === 'tiers'))
&& (enCoursChecked ** (item.provenance === 'en-cours'))" v-for="item in contenus" :key="item.titre"
v-bind:style="{ v-bind:style="{
'background-color': item.provenance === 'perso' ? 'white' : (item.provenance === 'banque' ? 'red' : 'green') 'background-color': item.provenance === 'perso' ? 'white' : item.provenance === 'tiers' ? 'red' : 'blue'
}"> }" >
<td class="modal titreContenu" v-on:click="chargerContenu($event, item.provenance)" v-popover:tooltip="'prévisualisation'">{{ item.titre }}</td> <td class="modal titreContenu" v-on:click="chargerContenu($event, item.provenance)" v-popover:tooltip="'prévisualisation'">{{ item.titre }}</td>
<td>Auteur 1</td> <td>Auteur 1</td>
<td>with two columns</td> <td>with two columns</td>
...@@ -153,15 +154,17 @@ export default { ...@@ -153,15 +154,17 @@ export default {
let inputs = document.querySelectorAll("input[type='checkbox'], #horns") let inputs = document.querySelectorAll("input[type='checkbox']")
// alert(inputs.length) // alert(inputs.length)
for(let i = 0; i < inputs.length; i++) { for(let i = 0; i < inputs.length; i++) {
let titre = inputs[i].parentElement.parentElement.innerText let titre = inputs[i].parentElement.parentElement.innerText
titre = titre.split('\t') titre = titre.split('\t')
let contenusTmp = this.contenusbanque let contenusTmp = this.contenusbanque
if ( inputs[i].checked) if ( inputs[i].checked && inputs[i].className !== "filtreTableau")
if (!this.panierChoisi){ if (!this.panierChoisi ){
alert ("titre " + inputs[i].className)
//this.contenus.push(titre[0]) //this.contenus.push(titre[0])
this.contenus.push(({titre: titre[0] , provenance: "tiers"})) this.contenus.push(({titre: titre[0] , provenance: "tiers"}))
for (let i = 0; i < contenusTmp.length; i++){ for (let i = 0; i < contenusTmp.length; i++){
......
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