Commit bc3e6d28 authored by Jérémie Passerat's avatar Jérémie Passerat

Sauvegarde avant test tableau dans Consulter_Contenu

parent 44aa8a43
......@@ -3,7 +3,8 @@
<Volet_Base @rechercherNouvellesPublications="rechercherNouvellesPublications" @choix_variante="choixVariante"
@newContenu="newContenu" v-bind:nvoContenu="nvoContenu" v-bind:auteur="auteur"
v-bind:contenuAjoute="contenuAjoute" v-bind:majContenus="majContenus" v-bind:darktheme="darktheme"
v-bind:deconnexion="deconnexion" v-bind:etat="etat" @ChangerTitre="ChangerTitre" />
v-bind:deconnexion="deconnexion" v-bind:etat="etat" @ChangerTitre="ChangerTitre" @volet_desactive="voletDesactive"
@chargerTagsLibres="chargerTagsLibres"/>
</div>
</template>
......@@ -24,6 +25,13 @@ export default {
// Transmission du booléen concernant la variante
// @arg True si variante active, False sinon
this.$emit("choix_variante", {variante: event.variante})
},
/**
* @vuese
* Permet de transmettre l'information sur le fait que le volet soit actif ou non
*/
voletDesactive: function (event) {
this.$emit("volet_desactive", {actif: event.actif})
},
/**
* @vuese
......@@ -47,6 +55,13 @@ export default {
*/
ChangerTitre: function (event) {
this.$emit("ChangerTitre", {titre: event.titre})
},
/**
* @vuese
* Permet de passer le signal pour charger le composant "GererTagsLibres"
*/
chargerTagsLibres: function () {
this.$emit("chargerTagsLibres")
}
},
props: {
......
<template>
<div>
<span v-show="modeModificationContenu" id="retourContenu" style="font-size: smaller" @click="revenirModifContenu"> Revenir au contenu</span>
<Filtre_Tag_Libre v-bind:modeGestion = "modeGestion" v-bind:auteur="auteur"></Filtre_Tag_Libre>
</div>
</template>
......@@ -22,7 +23,9 @@ export default {
//l'auteur connecte
auteur: {},
// signal permettant de déterminer si on accede a filtre_tags_libres via cette page ou pas
modeGestion: {}
modeGestion: {},
// permet de savoir si ce menu a été atteint via la consultation d'un contenu du panier ou non
modeModificationContenu: {}
},
methods: {
creerTag: function () {
......@@ -37,9 +40,11 @@ export default {
//alert("Supprimer le tag " + tag)
//let data = {auteur: this.auteur, id_contenu: "", tag: tagAVirer}
//this.$emit("actionTagLibre", {suppression: tagAVirer, id_contenu: this.contenu._id})
alert("hi hi")
Service.supprimerTagLibre(this.auteur, tagAVirer)
this.tagsLibresAuteur = this.tagsLibresAuteur.filter(tag => tag !== tagAVirer)
},
revenirModifContenu: function () {
this.$emit("revenirAuContenu")
}
},
watch:{
......@@ -68,4 +73,10 @@ button {
margin-left: 5px;
}
#retourContenu::before{
content: "\21A9";
margin-left: 5vw;
margin-top: 1vh;
}
</style>
\ No newline at end of file
......@@ -10,19 +10,20 @@
@choix_variante="choixVariante" @newContenu="newContenu"
@rechercherNouvellesPublications="rechercherPublications = !rechercherPublications" v-bind:etat="etat"
v-bind:majContenus="majContenus" v-bind:darktheme="darktheme" v-bind:deconnexion="deconnexion"
@ChangerTitre="ChangerTitre"></Contenu>
@ChangerTitre="ChangerTitre" @volet_desactive="voletDesactive" @chargerTagsLibres="chargerTagsLibres"></Contenu>
<Maj v-show="etat === 'Mises à jour'" v-bind:auteur="auteur" v-bind:isRecu="isRecu" v-bind:isPropose="isPropose"
v-bind:contenuEnPublication="contenuEnPublication" @recalculerNotif="recalculerNotification"
@majNvoContenu="majNvoContenu" @majContenus="majContenus = !majContenus"
v-bind:rechercherPublications="rechercherPublications" v-bind:darktheme="darktheme"></Maj>
<Profil v-show="etat === 'Profil'" ></Profil>
<GererTagsLibres v-show="etat === 'Tags'" v-bind:auteur="auteur" v-bind:modeGestion="modeGestion" ></GererTagsLibres>
<GererTagsLibres v-show="etat === 'Tags'" v-bind:auteur="auteur" v-bind:modeGestion="modeGestion"
v-bind:modeModificationContenu="modeModificationContenu" @revenirAuContenu="revenirAuContenu"></GererTagsLibres>
<TagsFixes v-show="etat === 'newContenu_Tags'"></TagsFixes>
<!-- <p style="text-align: center" v-show="errorLogin">{{errorMessage}}</p>-->
<NewContenu v-show="etat === 'newContenu'" v-bind:auteur="auteur" @contenuAjoute="ajouterUnContenu" @retourArriere="retourArriere"></NewContenu>
<ImporterFichier v-show="etat === 'importContenu'" v-bind:auteur="auteur" @contenuAjoute="ajouterUnContenu" @retourArriere="retourArriere"></ImporterFichier>
<span id="prout" v-show="hoverManuel">Manuel d'utilisation d'OpenQuizz</span>
<span :class="etat !== 'manuel' ? 'manuel' : 'retourManuel'" v-on:mouseover="popoverManuel" v-on:mouseleave="popoverManuel" v-on:click="consulterManuel"> </span>
<span :class="etat !== 'manuel' ? (!voletOuvert ? 'manuelVoletFerme' : 'manuel') : 'retourManuel'" v-on:mouseover="popoverManuel" v-on:mouseleave="popoverManuel" v-on:click="consulterManuel"> </span>
<Manuel v-show="etat === 'manuel'" v-bind:etatTmp="etatTmp" v-bind:darktheme="darktheme"></Manuel>
</div>
</template>
......@@ -65,7 +66,9 @@ export default {
couleurFond: 'aqua',
modeGestion: false,
hoverManuel: false,
etatTmp: ''
etatTmp: '',
voletOuvert: true,
modeModificationContenu: false
}
},
methods: {
......@@ -100,6 +103,7 @@ export default {
}
if (event.choix === "Tags"){
this.modeGestion = !this.modeGestion
this.modeModificationContenu = false
}
if (event.choix === "Mises à jour"){
this.isRecu = event.isRecu
......@@ -112,7 +116,13 @@ export default {
*/
choixVariante: function (event) {
this.variante = event.variante
},
/**
* @vuese
* Permet de transmettre l'information sur le fait que le volet soit actif ou non
*/
voletDesactive: function (event) {
this.voletOuvert = event.actif
},
/**
* @vuese
......@@ -176,6 +186,15 @@ export default {
ChangerTitre: function (event) {
this.nouveauTitre = event.titre
},
/**
* @vuese
* Permet de passer le signal pour charger le composant "GererTagsLibres"
*/
chargerTagsLibres: function () {
this.etat = 'Tags'
this.modeGestion = !this.modeGestion
this.modeModificationContenu = true
},
popoverManuel: function () {
this.hoverManuel = !this.hoverManuel
},
......@@ -188,6 +207,11 @@ export default {
this.etat = 'manuel'
this.nouveauTitre = "Manuel d'utilisation de l'application OpenQuizz"
}
},
revenirAuContenu: function () {
this.etat = 'Contenu'
this.modeGestion = !this.modeGestion
this.modeModificationContenu = false
}
},
......@@ -220,6 +244,14 @@ export default {
font-size: 32px;
}
.manuelVoletFerme::before{
content: "\01F4D6";
position: fixed;
bottom: 1%;
left: 0.5%;
font-size: 24px;
}
.retourManuel::before {
content: "\2B05";
position: fixed;
......
......@@ -13,6 +13,7 @@
<option></option>
<option v-for="tag in tagsAuteurDisponibles" :key="tag">{{ tag }}</option>
</select><br><br>
<span id="versGestionTags" style="font-size: smaller" @click="chargerGestionTagsLibres"> Gestion des tags libres</span>
</div>
<p>----------------------------------------------------------------------------</p>
<TagsFixes v-bind:isModif="isModif" v-bind:tagsBanque="tagsBanque" v-bind:id_contenu="id_contenu"></TagsFixes>
......@@ -58,6 +59,9 @@ export default {
let data = {auteur: this.auteur, id_contenu: JSON.stringify(this.contenu._id), tag: tagAVirer}
this.$emit("actionTagLibre", {suppression: tagAVirer, id_contenu: this.contenu._id})
Service.dissocierTagLibre(data)
},
chargerGestionTagsLibres: function () {
this.$emit("chargerTagsLibres")
}
},
data: function () {
......@@ -77,11 +81,11 @@ export default {
this.isModif = true
this.tagsBanque = this.contenu.tags_fixes
this.id_contenu = this.contenu._id
this.tagsDeAuteur = []
//this.tagsLibres = this.contenu.tags_libres
Service.recupererTagLibre(this.auteur).then(function (response) {
that.tagsDeAuteur = response.data
Service.recupererTagLibreContenu(JSON.stringify(that.contenu._id), that.auteur).then(function (response) {
// alert(response.data)
that.tagsLibres = response.data
})
})
......@@ -124,7 +128,11 @@ ul {
padding-top: 0.75 %;
}
#ajouterTag {
padding-bottom: 0.75%;
padding-bottom: 0.25%;
}
#versGestionTags::before {
content: "\01F4D3";
}
</style>
\ No newline at end of file
,passerat,weber-Latitude-5520,12.08.2021 13:46,file:///home/passerat/.config/libreoffice/4;
\ No newline at end of file
......@@ -177,7 +177,6 @@ export default {
Service.recupererTexteContenuEnCours(JSON.stringify(this.contenuClique._id)).then(
function (response) {
that.contenu = response.data
alert("Les enfantches : " + response.data)
}
)
......@@ -256,5 +255,13 @@ select {
text-align-last:center;
}
button {
background-color: #7b38d8;
border-radius: 10px;
border: 4px double #cccccc;
color: #eeeeee;
width: auto;
}
</style>
\ No newline at end of file
......@@ -37,14 +37,14 @@
</div>
<div id="actionsContenu">
<!-- <button class="boutonAction" v-on:click="actionContenu('supprimer')">Supprimer</button>-->
<!-- <button class="boutonAction" v-on:click="actionContenu('supprimer')">Supprimer</button>-->
<span class="boutonAction" v-if="contenuCliqueProvenance !== 'perso' && contenuCliqueProvenance !== 'tiers'" v-on:click="actionContenu('supprimer')" id="supprimerContenu"></span>
<span class="boutonAction" v-else v-on:click="actionContenu('supprimer')" id="supprimerContenuSolo"></span>
<!-- <button class="boutonAction" v-show="contenuCliqueProvenance !== 'maj' && contenuCliqueProvenance === 'en-cours' &&
<!-- <button class="boutonAction" v-show="contenuCliqueProvenance !== 'maj' && contenuCliqueProvenance === 'en-cours' &&
contenuClique.origine === 'tiers' && contenuClique.anonyme !== 'oui'" v-on:click="actionContenu('publier')">Publier le contenu</button>-->
<span class="boutonAction" v-show="contenuCliqueProvenance !== 'maj' && contenuCliqueProvenance === 'en-cours' &&
contenuClique.origine === 'tiers' && contenuClique.anonyme !== 'oui'" v-on:click="actionContenu('publier')" id="publierContenu">publier contenu</span>
<!-- <button class="boutonAction" v-show="contenuCliqueProvenance !== 'maj' && contenuCliqueProvenance === 'en-cours' &&
<!-- <button class="boutonAction" v-show="contenuCliqueProvenance !== 'maj' && contenuCliqueProvenance === 'en-cours' &&
(contenuClique.origine === 'perso' || contenuClique.anonyme === 'oui')"
v-on:click="actionContenu('validerModification')">Valider la modification</button>-->
<span class="boutonAction" v-show="contenuCliqueProvenance !== 'maj' && contenuCliqueProvenance === 'en-cours' &&
......@@ -58,7 +58,7 @@
<mavon-editor :language="'fr'" style="position: static; height: 79vh; margin-top: -0.5%" v-model="texteDuContenu"/>
</div>
<TagsLibres v-show="isModeTag" v-bind:contenu="this.contenuClique" v-bind:auteur="auteur" @actionTagLibre="actionTagLibre"
style="position: static; height: 79vh; margin-top: -0.5%" v-bind:darktheme="darktheme"></TagsLibres>
style="position: static; height: 79vh; margin-top: -0.5%" v-bind:darktheme="darktheme" @chargerTagsLibres="chargerTagsLibres"></TagsLibres>
<div class="markdown">
<br>
<button id="validerModif" v-on:click="action('valider')">modifier </button>
......@@ -205,10 +205,18 @@ export default {
else {
this.$emit("actionTagLibre", {creation: event.creation, id_contenu: event.id_contenu})
}
},
/**
* @vuese
* Permet de passer le signal pour charger le composant "GererTagsLibres"
*/
chargerTagsLibres: function () {
this.$emit("chargerTagsLibres")
}
},computed: {
},
computed: {
/**
* @vuese
* Fonction de calcul de la note globale d'un contenu (en fonction de sa version)
......@@ -349,7 +357,7 @@ button {
#supprimerContenuSolo::before {
content: "\01F5D1";
/* border-right: 1px solid black;
/* border-right: 1px solid black;
margin-right: 10px;
padding-right: 10px;*/
}
......@@ -407,7 +415,7 @@ button {
transform: rotate(180deg);
padding-right: 5px;
margin-right: 5px;
/* left: 350px;
/* left: 350px;
position: absolute;*/
}
......
......@@ -4,14 +4,16 @@
<div id="principal" v-show="!modeModification && !modeConsultation">
<!-- width: 330px;
-->
<div id="ensemble" class="ensemble" :class="darktheme ? 'ensembledark' : ''" :style="isActif ? {width: '340px'} : {width: '40px'}">
<button id="changerVariante" :style="isActif ? {width: 'auto'} : {width: '20px'}"
<div id="ensemble" class="ensemble" :class="darktheme ? 'ensembledark' : ''" :style="isActif ? {width: '17vw'} : {width: '2.5vw'}">
<button id="changerVariante" :style="isActif ? {width: 'auto', 'margin-left': '1vw'} : {width: '20px', 'margin-left': '0.6vw'}"
v-show="!modeModification && !modeConsultation" v-on:click="changerVariante">{{ texteBoutonvariante }}</button>
<br>
<div id="ensembleVolet">
<button id="boutonVolet" v-on:click="desactiverVolet" v-bind:style="{'margin-top': '0%'}"></button>
<div class="full" id="volet" v-bind:style="darktheme ? {'border-color': 'white'} : {'border-color': 'black'}" v-show="isActif">
<button id="boutonVolet" v-on:click="desactiverVolet" v-bind:style="[{'margin-top': '0%'},
isActif ? {'margin-left': '1vw', 'margin-right': '1vw'} : {'margin-left': '0.6vw'}]"></button>
<div class="full" id="volet" v-bind:style="[isActif ? {'margin-left': '1vw', 'margin-right': '1vw'} : {'margin-left': '0.1vw', 'margin-right': '0.1vw'},
darktheme ? {'border-color': 'white'} : {'border-color': 'black'}]" v-show="isActif">
<Volet_Menu v-bind:darktheme="darktheme" v-bind:panierChoisi = "panierChoisi" @filtre_choisi="passerFiltre"
@basculeRechercheFiltre="basculeRechercheFiltre" v-bind:filtre_choisi="filtre_choisi"/>
<Volet_Contenu v-bind:darktheme="darktheme" @mode_choisi="ajusterMode" v-bind:filtre_choisi="filtre_choisi" v-bind:variante="variante"
......@@ -23,7 +25,7 @@
<div id="tableau" :class="darktheme ? 'tableaudark' : ''" :style="isActif ? {width: '90%'} : {width: '98%'}" >
<div class="choixPanier" v-show="panierChoisi && (!modeModification && !modeConsultation)">
<label id="labelPerso" :style="isActif ? {'margin-left': '-5px'} : {'margin-left': '180px'}">Perso </label>
<label id="labelPerso" :style="isActif ? {'margin-left': '-5px'} : {'margin-left': '5px'}">Perso </label>
<input type="checkbox" class="filtreTableau" id="filtrePerso" v-model="persoChecked"
v-on:click="persoChecked = !persoChecked" name="perso" value="tiers"/>
<label> Tiers </label>
......@@ -37,7 +39,7 @@
<!-- <table v-bind:style="panierChoisi ? {'margin-top': '0%'} : {'margin-top': '24px'}">-->
<table :style="{
'margin-top': (panierChoisi ? '0%' : '24px' ),
'margin-left': (isActif ? '20px' : '11%' ),
'margin-left': (isActif ? '20px' : '1.5%' ),
'margin-right': '20px'
}" >
<thead>
......@@ -139,7 +141,8 @@
v-bind:contenuCliqueProvenance = "contenuCliqueProvenance" v-show="modeConsultation"/>
<Modifier_Contenu v-bind:auteur="auteur" v-bind:texteDuContenu = "texteDuContenu" v-bind:contenuCliqueProvenance = "contenuCliqueProvenance"
v-show="modeModification" @actionContenu="actionContenu" v-bind:contenuClique = "contenuClique" v-bind:darktheme="darktheme"
@choixModif="choixModif" v-bind:titreContenu="titreContenu" @majMoyenne="majMoyenne" @actionTagLibre="actionTagLibre"/>
@choixModif="choixModif" v-bind:titreContenu="titreContenu" @majMoyenne="majMoyenne" @actionTagLibre="actionTagLibre"
@chargerTagsLibres="chargerTagsLibres"/>
</div>
</template>
......@@ -342,6 +345,8 @@ export default {
desactiverVolet: function () {
this.isActif = !this.isActif
this.texteBoutonvariante === "changer" ? this.texteBoutonvariante = "c" : this.texteBoutonvariante = "changer"
this.$emit("volet_desactive", {actif: this.isActif})
},
/**
* @vuese
......@@ -984,6 +989,13 @@ export default {
this.contenus.push(contenu[0])
}
},
/**
* @vuese
* Permet de passer le signal pour charger le composant "GererTagsLibres"
*/
chargerTagsLibres: function () {
this.$emit("chargerTagsLibres")
}
}
}
......@@ -1002,7 +1014,7 @@ export default {
}
table {
width: 167vh;
width: 97.5%;
}
th,
......@@ -1023,24 +1035,24 @@ tfoot {
#volet{
position: relative;
width: 33.5vh;
width: 15vw;
height: 56vh;
border: 1px solid;
margin-top: 2px;
margin-left: 10px;
margin-right: 10px;
margin-left: 1vw;
margin-right: 1vw;
}
#boutonVolet {
margin-top: 0.55vh;
margin-left: 1.1vh;
margin-left: 1vw;
}
#changerVariante {
/*width: auto;*/
text-align: center;
line-height: 1em;
margin-left: 1.1vh;
margin-left: 1vw;
margin-top: 0.55vh;
margin-bottom: 2.2vh;
......
......@@ -88,7 +88,7 @@ export default {
<style scoped>
#contenu {
width: 100%;
height: 97.85%;
height: 97.5%;
margin-top: -5%;
display: flex;
flex-direction: column;
......@@ -113,5 +113,11 @@ export default {
overflow: auto;
}
#detailChoixMode {
flex-basis: 10%;
}
</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