Commit 045f8d04 authored by Jérémie Passerat's avatar Jérémie Passerat

modification en-cours finie

parent bd8b9014
......@@ -719,6 +719,8 @@ export default {
//this.contenuClique = []
//this.contenuCliqueProvenance = ''
if (event.action !== 'arriere') {
this.$emit("ChangerTitre", {titre: ""})
let data = {}
// on prépare les données suivant le type de contenu ('valider' -> markdown, 'modifier' -> XML moodle)
......@@ -736,7 +738,10 @@ export default {
// on créée ou on met à jour un contenu en cours
if (this.contenuCliqueProvenance !== 'en-cours') {
let dataDeux = {
auteur: this.auteur, provenance: this.contenuCliqueProvenance, contenu: JSON.stringify(this.contenuClique), titre: event.titre
auteur: this.auteur,
provenance: this.contenuCliqueProvenance,
contenu: JSON.stringify(this.contenuClique),
titre: event.titre
}
let that = this
Service.creerEnCours(dataDeux).then(function (reponse) {
......@@ -748,7 +753,9 @@ export default {
if (event.action === "valider") {
Service.changerTexte(data, JSON.stringify(reponse.data._id))
} else if (event.action === "modifier") {
Service.modifierXML(data)
data["id_contenu"] = JSON.stringify(reponse.data._id)
Service.modifierXMLEnCours(data)
}
})
} else {
......@@ -765,7 +772,7 @@ export default {
}
}
}
}
},
/**
* @vuese
......
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