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

Ajout de tag libre via glisser déposer

parent 6205615d
......@@ -5,6 +5,7 @@
"requires": true,
"packages": {
"": {
"name": "volet_navigation",
"version": "0.1.0",
"dependencies": {
"@popperjs/core": "^2.9.2",
......@@ -7539,9 +7540,9 @@
"dev": true
},
"node_modules/dns-packet": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz",
"integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==",
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.4.tgz",
"integrity": "sha512-BQ6F4vycLXBvdrJZ6S3gZewt6rcrks9KBgM9vrhW+knGRqc8uEdT7fuCwloc7nny5xNoMJ17HGH0R/6fpo8ECA==",
"dev": true,
"dependencies": {
"ip": "^1.1.0",
......@@ -15344,9 +15345,9 @@
}
},
"node_modules/path-parse": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
"dev": true
},
"node_modules/path-to-regexp": {
......@@ -15527,9 +15528,9 @@
}
},
"node_modules/postcss": {
"version": "7.0.35",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz",
"integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==",
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dev": true,
"dependencies": {
"chalk": "^2.4.2",
......@@ -19153,9 +19154,9 @@
}
},
"node_modules/url-parse": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.1.tgz",
"integrity": "sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q==",
"version": "1.5.3",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.3.tgz",
"integrity": "sha512-IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjvQ==",
"dev": true,
"dependencies": {
"querystringify": "^2.1.1",
......@@ -20669,9 +20670,9 @@
}
},
"node_modules/ws": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz",
"integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==",
"version": "6.2.2",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz",
"integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==",
"dev": true,
"dependencies": {
"async-limiter": "~1.0.0"
......@@ -27024,9 +27025,9 @@
"dev": true
},
"dns-packet": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz",
"integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==",
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.4.tgz",
"integrity": "sha512-BQ6F4vycLXBvdrJZ6S3gZewt6rcrks9KBgM9vrhW+knGRqc8uEdT7fuCwloc7nny5xNoMJ17HGH0R/6fpo8ECA==",
"dev": true,
"requires": {
"ip": "^1.1.0",
......@@ -33141,9 +33142,9 @@
"dev": true
},
"path-parse": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
"dev": true
},
"path-to-regexp": {
......@@ -33282,9 +33283,9 @@
"dev": true
},
"postcss": {
"version": "7.0.35",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz",
"integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==",
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dev": true,
"requires": {
"chalk": "^2.4.2",
......@@ -36327,9 +36328,9 @@
}
},
"url-parse": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.1.tgz",
"integrity": "sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q==",
"version": "1.5.3",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.3.tgz",
"integrity": "sha512-IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjvQ==",
"dev": true,
"requires": {
"querystringify": "^2.1.1",
......@@ -37568,9 +37569,9 @@
}
},
"ws": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz",
"integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==",
"version": "6.2.2",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz",
"integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==",
"dev": true,
"requires": {
"async-limiter": "~1.0.0"
......@@ -77,7 +77,7 @@ export default {
that.$emit("contenuAjoute", {contenu: nouveauContenu})
that.contenuSaisi = ''
that.retourArriere(true)
that.isCreation = false
that.isCreation = true
}
)
},
......
......@@ -35,7 +35,9 @@ export default {
// provenance du contenu
contenuCliqueProvenance: {},
// Signal d'activation ou non du theme sombre
darktheme: {}
darktheme: {},
// Récupération d'un tag libre ajouté
tagLibreAssocie: {}
},
methods:{
/**
......@@ -106,6 +108,21 @@ export default {
})
})
},
/**
* @vuese
* Traitement d'un tag associé via drag&dro
*/
tagLibreAssocie: function () {
//alert(this.auteur)
//alert(this.tagLibreAssocie)
let that = this
Service.recupererTagLibre(this.auteur).then(function (response) {
that.tagsDeAuteur = response.data
Service.recupererTagLibreContenu(JSON.stringify(that.tagLibreAssocie), that.auteur).then(function (response) {
that.tagsLibres = response.data
})
})
}
},
computed: {
/**
......@@ -125,6 +142,10 @@ ul {
}
li {
margin-left: -1.5vw;
}
/*#pageTagLibre {
margin-left: 20%;
margin-right: 20%;
......
......@@ -3,7 +3,9 @@
<p v-show="filtre_choisi.length === 0">{{ texte }}</p>
<Filtre_Tag v-show="filtre_choisi === 'tags officiels'" @creer_filtre="creer_filtre"/>
<Filtre_Tag_Libre v-bind:darktheme="darktheme" v-show="filtre_choisi === 'tags libres' " v-bind:filtreChoisi="filtre_choisi" v-bind:auteur="auteur" @creer_filtre="creer_filtre"/>
<Filtre_Tag_Libre v-bind:darktheme="darktheme" v-show="filtre_choisi === 'tags libres' " v-bind:filtreChoisi="filtre_choisi"
v-bind:auteur="auteur" @creer_filtre="creer_filtre" v-bind:checkes="checkes" @lignesDropped="lignesDropped"
@actionTagLibre="actionTagLibre"/>
<Filtre_Auteur v-bind:panierChoisi="panierChoisi" v-show="filtre_choisi === 'auteur'" v-bind:auteur="auteur" @creer_filtre="creer_filtre"/>
<Filtre_Date v-show="filtre_choisi === 'date' " @creer_filtre="creer_filtre"/>
<Filtre_Note_Popularite v-show="filtre_choisi === 'note' " @creer_filtre="creer_filtre" v-bind:deconnexion="deconnexion"/>
......@@ -24,7 +26,6 @@ import Filtre_Tag_Libre from "@/components/filtres/Filtre_Tag_Libre";
import Filtre_Recherche from "@/components/filtres/Filtre_Recherche";
export default {
name: "Detail_Contenu",
components: {
......@@ -49,6 +50,8 @@ export default {
deconnexion: {},
// Signal d'activation ou non du theme sombre
darktheme: {},
// lignes cochées
checkes: {}
},
methods: {
/**
......@@ -59,6 +62,20 @@ export default {
// Transmet la création d'un filtre
// @arg filtre le filtre créé
this.$emit("creer_filtre", {filtre: event})
},
/**
* @vuese
* Permet de savoir si les lignes sélectionnées ont été déposées sur un tag
*/
lignesDropped: function () {
this.$emit("lignesDropped")
},
/**
* @vuese
* Permet de remonter l'info pour un tag libre associé via drag&drop
*/
actionTagLibre: function (event) {
this.$emit("actionTagLibre", {creation: event.creation, id_contenu: event.id_contenu})
}
},
data: function () {
......@@ -66,11 +83,11 @@ export default {
texte: "Ajoutez des filtres pour restreindre les contenus de la banque ou du panier en sélectionnant le filtre à appliquer dans la zone de choix ci dessus"
}
}
/* watch: {
modeFiltre: function () {
this.filtre_choisi = ""
}
},*/
/* watch: {
modeFiltre: function () {
this.filtre_choisi = ""
}
},*/
}
</script>
......
......@@ -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" @chargerTagsLibres="chargerTagsLibres"></TagsLibres>
style="position: static; height: 79vh; margin-top: -0.5%" v-bind:darktheme="darktheme" @chargerTagsLibres="chargerTagsLibres" v-bind:tagLibreAssocie="tagLibreAssocie"></TagsLibres>
<div class="markdown">
<br>
<button id="validerModif" v-on:click="action('valider')">modifier </button>
......@@ -95,6 +95,8 @@ export default {
contenuClique: {},
// Signal d'activation ou non du theme sombre
darktheme: {},
// Récupération d'un tag libre ajouté
tagLibreAssocie: {}
},
data: function () {
return {
......@@ -252,13 +254,17 @@ export default {
this.isContenuRefuse = Object.prototype.hasOwnProperty.call(this.contenuClique, 'refuse');
if (this.contenuCliqueProvenance === 'perso'){
this.versionMax = this.contenuClique.versionEnCours.numero
this.versionChoisie = this.versionMax
} else {
this.versionChoisie = this.contenuClique.version
}
let that = this
Service.recupererNoteContenu(JSON.stringify(this.contenuClique._id), this.auteur, this.contenuClique.version).then(function (result) {
Service.recupererNoteContenu(JSON.stringify(this.contenuClique._id), this.auteur, this.versionChoisie).then(function (result) {
let nombre = result.data
if (nombre !== '-1'){
nombre = JSON.parse(nombre)
......@@ -273,7 +279,8 @@ export default {
*/
versionChoisie: function () {
this.noteContenu = this.calculerNoteContenu
}
},
}
}
......
This diff is collapsed.
......@@ -6,7 +6,9 @@
</div>
<div id = "detailContenu">
<Detail_Contenu v-bind:panierChoisi="panierChoisi" v-bind:filtre_choisi="filtre_choisi"
v-bind:auteur="auteur" v-bind:darktheme="darktheme" @creer_filtre="creer_filtre" v-bind:deconnexion="deconnexion"/>
v-bind:auteur="auteur" v-bind:darktheme="darktheme" @creer_filtre="creer_filtre"
v-bind:deconnexion="deconnexion" v-bind:checkes="checkes" @lignesDropped="lignesDropped"
@actionTagLibre="actionTagLibre"/>
</div>
<div id="detailChoixMode">
<Choix_Mode v-show="!variante" v-bind:darktheme="darktheme" @mode_choisi="ajusterMode" v-bind:razModeVariante="razModeVariante" />
......@@ -41,7 +43,9 @@ export default {
// Signal d'activation ou non du theme sombre
darktheme: {},
// Signal de deconnexion
deconnexion: {}
deconnexion: {},
// lignes cochées
checkes: {}
},
methods: {
......@@ -74,6 +78,20 @@ export default {
// @arg les filtres choisis
this.$emit("filtresChoisis", {filtres: event.filtres})
},
/**
* @vuese
* Permet de savoir si les lignes sélectionnées ont été déposées sur un tag
*/
lignesDropped: function () {
this.$emit("lignesDropped")
},
/**
* @vuese
* Permet de remonter l'info pour un tag libre associé via drag&drop
*/
actionTagLibre: function (event) {
this.$emit("actionTagLibre", {creation: event.creation, id_contenu: event.id_contenu})
}
},
data: function () {
......
This diff is collapsed.
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