Commit 722cf5cf authored by Jérémie Passerat's avatar Jérémie Passerat

Correction bugs

parent 84cbe060
......@@ -71,6 +71,7 @@ export default {
nouveauContenu.tags_libres = []
that.$emit("contenuAjoute", {contenu: nouveauContenu})
that.contenuSaisi = ''
that.titreContenu = ''
that.retourArriere(true)
that.isCreation = true
}
......
......@@ -51,10 +51,12 @@ export default {
if (this.source === 'moodle') {
console.log("this.provenance : " + this.provenance !== 'maj')
if (!(this.provenance === 'en-cours' || this.provenance === 'maj')) {
console.log("Je le suis ici")
Service.parserTexte(JSON.stringify(this.id)).then(function (response) {
that.questionParsee = response.data
})
} else {
console.log("Je le suis là")
Service.parserTexteEnCours(JSON.stringify(this.id)).then(function (response) {
that.questionParsee = response.data
})
......
......@@ -9,18 +9,18 @@
<label>Choisir le tag de niveau 1</label><br><br>
<select @change="niveau1()" v-model="tagUn" :disabled="(provenance === 'tiers' || provenance === 'en-cours') && provenance !== undefined">
<option>Informatique</option>
<option>Genie Civil</option>
<option>Systemes Electriques</option>
<option>Genie_Civil</option>
<option>Systemes_Electriques</option>
</select><br><br>
<label>Choisir le tag de niveau 2</label><br><br>
<select @change="niveau2()" :disabled="niveauDeux === 0 || (provenance === 'tiers' || provenance === 'en-cours') && provenance !== undefined" v-model="tagDeux">
<option v-for="i in 3" :key="i">{{tagUn}}.{{ i }}</option>
<option v-for="i in 3" :key="i">{{tagUn}}_{{ i }}</option>
</select><br><br>
<label>Choisir le tag de niveau 3</label><br><br>
<select @change="niveau3()" :disabled="niveauTrois === 0 || (provenance === 'tiers' || provenance === 'en-cours') && provenance !== undefined" v-model="tagTrois">
<option v-for="i in 5" :key="i">{{tagDeux}}.{{ i }}</option>
<select :disabled="niveauTrois === 0 || (provenance === 'tiers' || provenance === 'en-cours') && provenance !== undefined" v-model="tagTrois">
<option v-for="i in 5" :key="i">{{tagDeux}}_{{ i }}</option>
</select><br><br>
<button v-on:click="validerTags" :disabled="validationTags === 0" v-show="provenance === undefined || provenance === 'perso'">Valider</button>
</div>
......
......@@ -26,7 +26,7 @@
style="margin-right: 5px; background: none; border: none" >
<option v-for="i in versionMax" v-bind:key="i"> {{i}}</option>
</select>
<input type="text" id="titreDuContenu" placeholder="titre du contenu" style="width: 350px; outline: none; border: none" v-model="titreContenu">
<input type="text" id="titreDuContenu" placeholder="titre du contenu" style="width: 15vw; outline: none; border: none; margin-right: 1vw" v-model="titreContenu">
</div>
<div id="voirNote">
<button style="margin-left: 10px; background: floralwhite; border: none" v-show="contenuCliqueProvenance === 'tiers' && !notePresente" id="noterContenu">{{ messageNoter }}</button>
......@@ -34,8 +34,8 @@
<star-rating @rating-selected ="setRating" v-model="rating" :read-only="notePresente" :show-rating="false" :increment=0.5 :star-size=25 />
</b-popover>
<star-rating v-show="notePresente" @rating-selected ="setRating" v-model="rating" :read-only="notePresente"
:show-rating="false" :increment=0.5 :star-size=25 />
<star-rating id="etoiles" v-show="notePresente" @rating-selected ="setRating" v-model="rating" :read-only="notePresente"
:show-rating="false" :increment=0.5 :star-size=25 style="margin-right: 0.1vw" />
</div>
</div>
......@@ -338,9 +338,11 @@ export default {
if (this.contenuCliqueProvenance !== 'banque'){
Service.recupererNoteContenu(JSON.stringify(this.contenuClique._id), this.auteur, this.versionChoisie).then(function (result) {
let nombre = result.data
console.log("nombre : " + nombre + " " + typeof (nombre))
if (nombre !== '-') {
nombre = JSON.parse(nombre)
that.rating = nombre.note
//nombre = JSON.parse(nombre)
//that.rating = nombre.note
that.rating = nombre
that.notePresente = true
}
})
......@@ -512,4 +514,8 @@ button {
}
#etoiles {
margin-left: 10px;
}
</style>
\ No newline at end of file
......@@ -53,8 +53,7 @@ export default {
Authorization: "Bearer " + localStorage.token,
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': 'Authorization',
'Content-Type': 'application/json',
Chameau: "Chamelle"
'Content-Type': 'application/json'
}
}
//console.log("headon : " + header)
......@@ -83,7 +82,7 @@ export default {
return {
headers:
{
HTTP_AUTHORIZATION: "Bearer " + token,
Authorization: "Bearer " + token,
}
}
},
......
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