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