Commit 43ff48b0 authored by Jérémie Passerat's avatar Jérémie Passerat

Sauvegarde avant tests de couleur de fond

parent e053b284
<!DOCTYPE html>
<html dir="ltr" lang="fr" xml:lang="fr">
<head>
<link rel="stylesheet" type="text/css" href="https://celene.univ-orleans.fr/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.css" />
<script id="firstthemesheet" type="text/css">/** Required in order to fix style inclusion problems in IE with YUI **/</script>
<link rel="stylesheet" type="text/css" href="https://celene.univ-orleans.fr/theme/styles.php/celeneboost/1617792745_1614585414/all" />
</head>
<body>
<div role="main">
<span id="maincontent"></span>
<form method="post" action="https://celene.univ-orleans.fr/question/preview.php?id=7920206&amp;previewid=696734&amp;courseid=4997&amp;variant=1&amp;correctness=1&amp;marks=1&amp;markdp=2&amp;feedback=1&amp;generalfeedback=1&amp;rightanswer=1&amp;history=0" enctype="multipart/form-data" id="responseform">
<div><input type="hidden" name="sesskey" value="zESgJU3xYb" /><input type="hidden" name="slots" value="1" /><input type="hidden" name="scrollpos" value="" id="scrollpos" /></div>
<div id="q1" class="que truefalse deferredfeedback notyetanswered">
<div class="info">
<h3 class="no">Question <span class="qno">1</span></h3>
<div class="state">Pas encore répondu</div>
<div class="grade">Noté sur 10,00</div>
</div>
<div class="content">
<div class="formulation clearfix">
<h4 class="accesshide">Texte de la question</h4>
<input type="hidden" name="q696734:1_:sequencecheck" value="1" />
<div class="qtext">
<p>ertert</p>
</div>
<div class="ablock">
<div class="prompt">Sélectionnez une réponse :</div>
<div class="answer">
<div class="r0"><input type="radio" name="q696734:1_answer" value="1" id="q696734:1_answertrue" /><label for="q696734:1_answertrue" class="m-l-1">Vrai</label> </div>
<div class="r1"><input type="radio" name="q696734:1_answer" value="0" id="q696734:1_answerfalse" /><label for="q696734:1_answerfalse" class="m-l-1">Faux</label> </div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
......@@ -5,7 +5,12 @@
<input type="file" name="fichier" @change="onUploadFiles">
<div class="markdown">
<br>
<button class="ajouterContenu" v-on:click="ajouterContenu">créer</button><br><br>
<button class="retourArriere" v-on:click="retourArriere">revenir en arrière</button>
</div>
</div>
</template>
......@@ -15,13 +20,40 @@ import Service from "./service/Service";
export default {
name: "ImporterFichier",
props: {
// l'auteur connecté
auteur: {}
},
data() {
return {
formData: null
}
},
methods: {
onUploadFiles: function (event) {
const file = event.target.files.item(0)
let formData = new FormData();
formData.append('file', file);
Service.uploaderContenuPerso(formData)
this.formData = new FormData()
this.formData.append('file', event.target.files.item(0));
},
/**
* @vuese
* (A construire) Fonction de changement du mot de passe utilisateur
*/
retourArriere: function () {
// evenement pour retourner vers le volet Contenu_Base
this.$emit("retourArriere")
},
ajouterContenu: function () {
let that = this
Service.uploaderContenuPerso(this.formData, this.auteur).then(
function (reponse) {
let nouveauContenu = reponse.data
nouveauContenu.provenance = "perso"
that.$emit("contenuAjoute", {contenu: nouveauContenu})
that.contenuSaisi = ''
that.retourArriere()
}
)
}
}
}
......@@ -29,4 +61,11 @@ export default {
<style scoped>
button {
align-items: center;
width: auto;
text-align: center;
line-height: 1em;
}
</style>
\ No newline at end of file
......@@ -16,7 +16,7 @@
<Tags v-show="etat === 'Tags'" ></Tags>
<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'"></ImporterFichier>
<ImporterFichier v-show="etat === 'importContenu'" v-bind:auteur="auteur" @contenuAjoute="ajouterUnContenu" @retourArriere="retourArriere"></ImporterFichier>
</div>
</template>
......
......@@ -176,11 +176,13 @@ export default {
#menuHaut{
display: flex;
background-color: whitesmoke;
}
.circle {
background: gold;
border: 1px solid yellow;
margin-top: 1%;
margin-bottom: 1%;
border-radius: 50%;
display: flex; /* or inline-flex */
align-items: center;
......
<template>
<div role="main">
<span id="maincontent"></span>
<form method="post" enctype="multipart/form-data" id="responseform">
<div><input type="hidden" name="sesskey" value="zESgJU3xYb" /><input type="hidden" name="slots" value="1" /><input type="hidden" name="scrollpos" value="" id="scrollpos" /></div>
<div id="q1" class="que truefalse deferredfeedback notyetanswered">
<div class="info">
<h3 class="no">Question <span class="qno">1</span></h3>
<div class="state">Pas encore répondu</div>
<div class="grade">Noté sur 10,000</div>
</div>
<div class="content">
<div class="formulation clearfix">
<h4 class="accesshide">Texte de la question</h4>
<input type="hidden" name="q696734:1_:sequencecheck" value="1" />
<div class="qtext">
<p>ertert</p>
</div>
<div class="ablock">
<div class="prompt">Sélectionnez une réponse :</div>
<div class="answer">
<div class="r0"><input type="radio" name="q696734:1_answer" value="1" id="q696734:1_answertrue" /><label for="q696734:1_answertrue" class="m-l-1">Vrai</label> </div>
<div class="r1"><input type="radio" name="q696734:1_answer" value="0" id="q696734:1_answerfalse" /><label for="q696734:1_answerfalse" class="m-l-1">Faux</label> </div>
</div>
</div>
</div>
</div>
</div>
</form>
<!-- <script id="firstthemesheet" type="text/css">/** Required in order to fix style inclusion problems in IE with YUI **/</script>
<link rel="stylesheet" type="text/css" href="https://celene.univ-orleans.fr/theme/styles.php/celeneboost/1617792745_1614585414/all" />-->
</div>
</template>
<script>
export default {
name: "Test"
}
</script>
<style scoped>
/*
YUI 3.17.2 (build 9c3c78e)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
.yui3-widget-hidden{display:none}.yui3-widget-content{overflow:hidden}.yui3-widget-content-expanded{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;height:100%}.yui3-widget-tmp-forcesize{overflow:hidden!important}#yui3-css-stamp.skin-sam-widget-base{display:none}
/*
YUI 3.17.2 (build 9c3c78e)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
.yui3-widget-stacked .yui3-widget-shim{opacity:0;filter:alpha(opacity=0);position:absolute;border:0;top:0;left:0;padding:0;margin:0;z-index:-1;width:100%;height:100%;_width:0;_height:0}#yui3-css-stamp.skin-sam-widget-stack{display:none}
/*
YUI 3.17.2 (build 9c3c78e)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
.yui3-overlay{position:absolute}.yui3-overlay-hidden{visibility:hidden}.yui3-widget-tmp-forcesize .yui3-overlay-content{overflow:hidden!important}#yui3-css-stamp.skin-sam-overlay{display:none}
/*
YUI 3.17.2 (build 9c3c78e)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
.yui3-skin-sam .yui3-widget-mask{background-color:black;zoom:1;-ms-filter:"alpha(opacity=40)";filter:alpha(opacity=40);opacity:.4}#yui3-css-stamp.skin-sam-widget-modality{display:none}
/*
YUI 3.17.2 (build 9c3c78e)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
.yui3-panel{position:absolute}.yui3-panel-hidden{visibility:hidden}.yui3-widget-tmp-forcesize .yui3-panel-content{overflow:hidden!important}.yui3-panel .yui3-widget-hd{position:relative}.yui3-panel .yui3-widget-hd .yui3-widget-buttons{position:absolute;top:0;right:0}.yui3-panel .yui3-widget-ft .yui3-widget-buttons{display:inline-block;*display:inline;zoom:1}.yui3-skin-sam .yui3-panel-content{-webkit-box-shadow:0 0 5px #333;-moz-box-shadow:0 0 5px #333;box-shadow:0 0 5px #333;border:1px solid black;background:white}.yui3-skin-sam .yui3-panel .yui3-widget-hd{padding:8px 28px 8px 8px;min-height:13px;_height:13px;color:white;background-color:#3961c5;background:-moz-linear-gradient(0% 100% 90deg,#2647a0 7%,#3d67ce 50%,#426fd9 100%);background:-webkit-gradient(linear,left bottom,left top,from(#2647a0),color-stop(0.07,#2647a0),color-stop(0.5,#3d67ce),to(#426fd9))}.yui3-skin-sam .yui3-panel .yui3-widget-hd .yui3-widget-buttons{padding:8px}.yui3-skin-sam .yui3-panel .yui3-widget-bd{padding:10px}.yui3-skin-sam .yui3-panel .yui3-widget-ft{background:#edf5ff;padding:8px;text-align:right}.yui3-skin-sam .yui3-panel .yui3-widget-ft .yui3-button{margin-left:8px}.yui3-skin-sam .yui3-panel .yui3-widget-hd .yui3-button-close{background:transparent;filter:none;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;width:13px;height:13px;padding:0;overflow:hidden;vertical-align:top;*font-size:0;*line-height:0;*letter-spacing:-1000px;*color:#86a5ec;*background:url(/theme/yui_image.php?file=3.17.2/sprite_icons.png) no-repeat 1px 1px}.yui3-skin-sam .yui3-panel .yui3-widget-hd .yui3-button-close:before{content:url(/theme/yui_image.php?file=3.17.2/sprite_icons.png);display:inline-block;text-align:center;font-size:0;line-height:0;width:13px;margin:1px 0 0 1px}.yui3-skin-sam .yui3-panel-hidden .yui3-widget-hd .yui3-button-close{display:none}#yui3-css-stamp.skin-sam-panel{display:none}
</style>
\ No newline at end of file
<template>
<div>
<div id="divPrincipale">
<button id="changerVariante" v-show="!modeConsultation && !modeModification" v-on:click="changerVariante">changer</button>
<div class="choixPanier" v-show="panierChoisi && !modeConsultation && !modeModification">
<label id="labelPerso">Perso </label>
<input type="checkbox" class="filtreTableau" id="filtrePerso" v-model="persoChecked" v-on:click="persoChecked = !persoChecked" name="perso" value="tiers"/>
<label id="labelPerso" :style="isActif ? {'margin-left': '-5px'} : {'margin-left': '-8.5%'}">Perso </label>
<input type="checkbox" class="filtreTableau" id="filtrePerso" v-model="persoChecked"
v-on:click="persoChecked = !persoChecked" name="perso" value="tiers"/>
<label> Tiers </label>
<input type="checkbox" class="filtreTableau" id="filtreTiers" v-model="tiersChecked" v-on:click="tiersChecked = !tiersChecked" name="tiers" value="tiers"/>
<input type="checkbox" class="filtreTableau" id="filtreTiers" v-model="tiersChecked"
v-on:click="tiersChecked = !tiersChecked" name="tiers" value="tiers"/>
<label> En Cours</label>
<input type="checkbox" class="filtreTableau" id="filtreEnCours" v-model="enCoursChecked" v-on:click="enCoursChecked = !enCoursChecked" name="en-cours" value="en-cours"/>
<input type="checkbox" class="filtreTableau" id="filtreEnCours" v-model="enCoursChecked"
v-on:click="enCoursChecked = !enCoursChecked" name="en-cours" value="en-cours"/>
</div>
<div id="principal" v-show="!modeConsultation && !modeModification">
......@@ -23,10 +25,15 @@
</div>
<div id="tableau">
<table v-bind:style="panierChoisi ? {'margin-top': '0%'} : {'margin-top': '24px'}">
<!-- <table v-bind:style="panierChoisi ? {'margin-top': '0%'} : {'margin-top': '24px'}">-->
<table :style="{
'margin-top': (panierChoisi ? '0%' : '24px' ),
'margin-left': (isActif ? '20px' : '11%' ),
'margin-right': '20px'
}" >
<thead>
<tr>
<th colspan="8 ">Contenus</th>
<th v-bind:colspan="!isActif ? 10 : 8">Contenus</th>
</tr>
</thead>
<tr>
......@@ -38,6 +45,8 @@
<th>Nbre d'Utilisations</th>
<th>Likes</th>
<th>Tags</th>
<th v-show="!isActif">Type</th>
<th v-show="!isActif">Source</th>
<th v-on:click="supprimerContenus" class="supprimerContenus">
<img v-bind:src="panierChoisi ? imgPoubelle : imgEtoile" alt='' height=20 width=20/></th>
......@@ -49,14 +58,13 @@
v-bind:style="{
'background-color': item.provenance === 'perso' ? 'white' : item.provenance === 'tiers' ? 'red' : 'blue'
}">
<!-- <td class="modal titreContenu" id="titreContenu" v-on:click="chargerContenu(item, item.provenance)">{{ item._id }}</td>-->
<!-- <b-popover target="titreContenu" triggers="hover" placement="bottom">
<template #title>Popover Title</template>
<h1>I am</h1> popover <b>component</b> content!
</b-popover>-->
<td :id="JSON.stringify(item._id)" v-on:click="chargerContenu(item, item.provenance)">{{item.titre}}</td>
<b-popover class="non" v-on:show="rechercherTexte(item._id, item.provenance)" :target="JSON.stringify(item._id)" triggers="hover" placement="bottom">
<p id="beautiful" v-html="texteDuContenu"></p>
<b-popover style="height: 700px; width: 700px" class="non" v-on:show="rechercherTexte(item._id, item.provenance, item.source)" :target="JSON.stringify(item._id)" triggers="hover" placement="bottom">
<p id="beautiful" v-html="texteDuContenu" v-if="!isMoodle"></p>
<Test v-else></Test>
<!-- <iframe src="http://localhost:8083/shimeta.html" style="height: 500px; width: 300px; zoom: 0.75" name="targetframe" allowTransparency="true" scrolling="no" frameborder="0" >
</iframe>-->
<!-- <div class="previsualisationPanier"></div>-->
</b-popover>
<!-- auteur -->
<td>{{item.auteur}}</td>
......@@ -74,15 +82,17 @@
<td v-else>{{ item.note }}</td>
<td v-if="item.provenance !== 'en-cours'" v-b-popover.hover.bottom="item.tags_banque_libres.toString()">{{item.tags_banque_libres.toString()}}</td>
<td v-else v-b-popover.hover.bottom="'tags non disponibles'">tags non disponibles</td>
<td v-show="!isActif">{{ item.type }}</td>
<td v-show="!isActif">{{ item.source }}</td>
<td class="boutonSupprimer"> <input type="checkbox" v-on:change="ajouterCoche(item._id, item.provenance)" class="horns" name="horns"/></td>
</tr>
<tr v-show="!panierChoisi" v-for="item in contenusbanque" :key="item.titre">
<td :id="'a' + JSON.stringify(item._id)" v-on:click="chargerContenu(item, 'banque')">{{ item.titre }}</td>
<b-popover :target="'a' + JSON.stringify(item._id)" v-on:show="rechercherTexte(item._id, 'banque')" triggers="hover" placement="bottom">
<p id="beautiful" v-html="texteDuContenu"></p>
<b-popover :target="'a' + JSON.stringify(item._id)" v-on:show="rechercherTexte(item._id, 'banque', item.source)" triggers="hover" placement="bottom">
<!-- <p id="beautiful" v-html="texteDuContenu"></p>-->
<div class="previsualisationBanque"></div>
</b-popover>
<td>{{ item.auteur }}</td>
<td>{{item.versionEnCours.numero}}</td>
......@@ -107,17 +117,20 @@
<Modifier_Contenu v-bind:auteur="auteur" v-bind:texteDuContenu = "texteDuContenu" v-bind:contenuCliqueProvenance = "contenuCliqueProvenance"
v-show="!modeConsultation && modeModification" @choixModif="choixModif" v-bind:titreContenu="titreContenu"/>
<div id="ajouterContenu" v-show="panierChoisi && !modeConsultation" class="circle" v-bind:style="{'margin-left': '95%'}">
<div id="ajouterContenu" v-show="panierChoisi && !modeConsultation" class="circle" v-bind:style="{'margin-left': '95%', 'margin-top': (!isActif ? '22.7%' : '1%')}">
<b-popover target="ajouterContenu" triggers="click" placement="lefttop">
<template #title>Choix : </template>
<button v-on:click="ajouterContenu('1')" v-bind:style="'height: auto; width: auto'">1. Créer un markdown</button>
<button v-on:click="ajouterContenu('2')" v-bind:style="'height: auto; width: auto'">2. Importer un xml moodle</button>
</b-popover>
</div>
<Test v-show="false"></Test>
</div>
</template>
<script>
//import axios from "axios";
let $ = require("jquery");
window.$ = window.jQuery = $;
require("jquery-ui-bundle");
......@@ -126,10 +139,12 @@ import Volet_Contenu from "./Volet_Contenu";
import Consulter_Contenu from "./Consulter_Contenu";
import Service from '../../src/service/Service'
import Modifier_Contenu from "./Modifier_Contenu";
import Test from "../Test"
export default {
name: "Volet_Base",
components: {
Test,
Modifier_Contenu,
Volet_Menu,
Volet_Contenu,
......@@ -170,6 +185,7 @@ export default {
token: '',
razModeVariante: false,
modeFiltre: false,
isMoodle: false,
chocolat: '<h1 id="hellomarkdown">hello, markdown!</h1>',
imgEtoile: "https://previews.123rf.com/images/ylivdesign/ylivdesign1612/ylivdesign161208906/67933171-ic%C3%B4ne-%C3%A9toile-%C3%A0-cinq-branches-jaunes-illustration-de-dessin-anim%C3%A9-d-ic%C3%B4ne-de-vecteur-%C3%A9toile-jaune-%C3%A0-cinq-branches-.jpg",
imgPoubelle: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAflBMVEX///8AAACampq4uLh5eXlcXFxlZWXr6+vFxcVFRUWurq6ioqL39/doaGju7u7Z2dmIiIjX19eoqKicnJxZWVlvb28qKirDw8Pl5eU6Ojq5ublAQEDOzs7f398dHR1OTk4xMTGRkZERERGLi4sbGxt+fn4kJCQLCwt0dHRSUlJ5VCwrAAAIRUlEQVR4nO2d6VYbSwyEHbyBMWbHEBKwCev7v+C9jruOMyqpx2YZKTn6fiLj6WJ60T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Ip0apOOb2TNdIUILmXuM5NJw7hfBRdNN0RXCAZKhRYw+DCBDOzhczXurK8S9kq6f/7MkfyIzowgXmvdWV4h7tRTfEaVosUY6NQj5mjNPV4gZLStVkVya/50XkTfUKxe6QuxK4sR5CJSl6XG6Gq53c33qCrHehOMdpQ8DiKIK3s/VTJ/pCpGYExlv/4dHm0inpvy4uT51hcazFrFcGs5AlB83vWldofGsRZQ+DCDzZPj5FgrVj8bpwwCydKE+c1FVKBPncYoWa2QeA9tHI5OqKkRWVOb0I+UwVljja1QuVIWoWlh/oyhYc6zR86YqtF4+G+vA79E+AUel4YqpCuHgyeDJQUMdcV7DnW4EF6pC4+Wzvu/01BA+F0rwy1aFCENEM0CX/7ByO0QhTQ1r1fd568FyoD4MsGwO8KI3m41P5/3GuJez8YpZ47OX/fnpeDaTOX3vF2AxonTxwm82qfMs+vQjFS3WKO/5/BDRXJrP/38lcfowgPIWzA8R40mLBp+s0FuOwr+v8HP/J2Kssswa7R+PvJ94B776yv8PEKtosUZ7Sff7iZbDWKH8v5IPEM+l+ewjP96Br79m/v3EKlokSZIkSZIkX81/MjFrMKxwu60AAAAASUVORK5CYII="
......@@ -486,39 +502,48 @@ export default {
* @vuese
* Récupération du texte d'un contenu
*/
rechercherTexte: function (id, provenance) {
rechercherTexte: function (id, provenance, source) {
let that = this
if(provenance === 'en-cours'){
Service.recupererTexteContenuEnCours(JSON.stringify(id)).then(
function (response) {
let showdown = require('showdown'),
converter = new showdown.Converter()
// alert('caca : ' + source)
that.texteDuContenu = converter.makeHtml(response.data)
}
)
if (source === "moodle"){
this.isMoodle = true
}
else if (provenance === 'banque'){
Service.recupererTexteVersionContenu(JSON.stringify(id), 0).then(
function (response) {
let showdown = require('showdown'),
converter = new showdown.Converter()
else {
this.isMoodle = false
that.texteDuContenu = converter.makeHtml(response.data)
}
)
}
else {
Service.recupererTexteContenu(JSON.stringify(id)).then(
function (response) {
let showdown = require('showdown'),
converter = new showdown.Converter()
that.texteDuContenu = converter.makeHtml(response.data)
}
)
if(provenance === 'en-cours'){
Service.recupererTexteContenuEnCours(JSON.stringify(id)).then(
function (response) {
let showdown = require('showdown'),
converter = new showdown.Converter()
that.texteDuContenu = converter.makeHtml(response.data)
}
)
}
else if (provenance === 'banque'){
Service.recupererTexteVersionContenu(JSON.stringify(id), 0).then(
function (response) {
let showdown = require('showdown'),
converter = new showdown.Converter()
that.texteDuContenu = converter.makeHtml(response.data)
}
)
}
else {
Service.recupererTexteContenu(JSON.stringify(id)).then(
function (response) {
let showdown = require('showdown'),
converter = new showdown.Converter()
that.texteDuContenu = converter.makeHtml(response.data)
}
)
}
}
},
/**
......@@ -550,75 +575,74 @@ export default {
Service.changerTexte(data, JSON.stringify(this.contenuClique._id))
for (let i = 0; i < this.contenus.length; i++) {
alert("prout " + i)
if (this.contenus[i]._id === this.contenuClique._id) {
this.contenus[i].titre = event.titre
}
}
}
}
},
/**
* @vuese
* Application des filtres choisis au contenu affiché (mode Banque et Panier)
*/
filtresChoisis(event) {
let contenusFiltres = []
// on récupère les contenus à filtrer
if (this.panierChoisi){
contenusFiltres = this.contenusTotal
}
else {
contenusFiltres = this.contenusTotalBanque
}
// on les filtre
},
/**
* @vuese
* Application des filtres choisis au contenu affiché (mode Banque et Panier)
*/
filtresChoisis(event) {
let contenusFiltres = []
// on récupère les contenus à filtrer
if (this.panierChoisi){
contenusFiltres = this.contenusTotal
}
else {
contenusFiltres = this.contenusTotalBanque
}
// on les filtre
if (event.filtres.filter(contenu => contenu.type === 'auteur').length > 0){
// auteur
let filtre_auteur = (event.filtres.filter(contenu => contenu.type === 'auteur').map(contenu => contenu.filtre))
contenusFiltres = contenusFiltres.filter(contenu => filtre_auteur.includes(contenu.auteur))
}
// date
if (event.filtres.filter(contenu => contenu.type === 'auteur').length > 0){
// auteur
let filtre_auteur = (event.filtres.filter(contenu => contenu.type === 'auteur').map(contenu => contenu.filtre))
contenusFiltres = contenusFiltres.filter(contenu => filtre_auteur.includes(contenu.auteur))
}
// date
if (event.filtres.filter(contenu => contenu.type === 'tags libres').length > 0) {
// tags libres
let filtre_tags_libres = (event.filtres.filter(contenu => contenu.type === 'tags libres').map(contenu => contenu.filtre))
if (event.filtres.filter(contenu => contenu.type === 'tags libres').length > 0) {
// tags libres
let filtre_tags_libres = (event.filtres.filter(contenu => contenu.type === 'tags libres').map(contenu => contenu.filtre))
for (let i = 0; i < filtre_tags_libres.length; i++) {
contenusFiltres = contenusFiltres.filter(contenu => contenu.tags_banque_libres.includes(filtre_tags_libres[i]))
for (let i = 0; i < filtre_tags_libres.length; i++) {
contenusFiltres = contenusFiltres.filter(contenu => contenu.tags_banque_libres.includes(filtre_tags_libres[i]))
}
}
}
if (event.filtres.filter(contenu => contenu.type === 'tags officiels').length > 0) {
// tags officiels
let filtre_tags_fixes = (event.filtres.filter(contenu => contenu.type === 'tags officiels').map(contenu => contenu.filtre))
for (let i = 0; i < filtre_tags_fixes.length; i++) {
contenusFiltres = contenusFiltres.filter(contenu => contenu.tags_banque_fixes.includes(filtre_tags_fixes[i]))
if (event.filtres.filter(contenu => contenu.type === 'tags officiels').length > 0) {
// tags officiels
let filtre_tags_fixes = (event.filtres.filter(contenu => contenu.type === 'tags officiels').map(contenu => contenu.filtre))
for (let i = 0; i < filtre_tags_fixes.length; i++) {
contenusFiltres = contenusFiltres.filter(contenu => contenu.tags_banque_fixes.includes(filtre_tags_fixes[i]))
}
}
if (event.filtres.filter(contenu => contenu.type === 'type').length > 0) {
// type
let filtre_type = (event.filtres.filter(contenu => contenu.type === 'type').map(contenu => contenu.filtre))
contenusFiltres = contenusFiltres.filter(contenu => filtre_type.includes(contenu.type))
}
if (event.filtres.filter(contenu => contenu.type === 'source').length > 0) {
// source
let filtre_source = (event.filtres.filter(contenu => contenu.type === 'source').map(contenu => contenu.filtre))
contenusFiltres = contenusFiltres.filter(contenu => filtre_source.includes(contenu.source))
// manque note, popularite
}
// et on les réinjecte dans la "source"
if (this.panierChoisi){
this.contenus = contenusFiltres
}
else {
this.contenusbanque = contenusFiltres
}
},
basculeRechercheFiltre: function (event) {
this.modeFiltre = event.choix
}
if (event.filtres.filter(contenu => contenu.type === 'type').length > 0) {
// type
let filtre_type = (event.filtres.filter(contenu => contenu.type === 'type').map(contenu => contenu.filtre))
contenusFiltres = contenusFiltres.filter(contenu => filtre_type.includes(contenu.type))
}
if (event.filtres.filter(contenu => contenu.type === 'source').length > 0) {
// source
let filtre_source = (event.filtres.filter(contenu => contenu.type === 'source').map(contenu => contenu.filtre))
contenusFiltres = contenusFiltres.filter(contenu => filtre_source.includes(contenu.source))
// manque note, popularite
}
// et on les réinjecte dans la "source"
if (this.panierChoisi){
this.contenus = contenusFiltres
}
else {
this.contenusbanque = contenusFiltres
}
},
basculeRechercheFiltre: function (event) {
this.modeFiltre = event.choix
}
}
}
</script>
......@@ -634,7 +658,6 @@ export default {
}
table {
margin-left: 20px;
width: 1550px;
}
......@@ -678,7 +701,6 @@ tfoot {
.circle {
border: 1px solid black ;
margin-top: 1%;
border-radius: 50%;
display: flex; /* or inline-flex */
align-items: center;
......@@ -693,9 +715,9 @@ tfoot {
margin: 0 5px 0 5px;
}
#labelPerso {
/*#labelPerso {
margin-left: -5px ;
}
}*/
th{
text-align: center;
......@@ -725,5 +747,19 @@ th image
}
.popover .popover-inner{
max-width: 2000px !important;
width: 1500px !important;
}
/*#ensemble {
background-color: whitesmoke;
height: 700px;
}*/
/*#divPrincipale {
background-color: lightgray;
}*/
/*<img src="@/assets/img/etoile.png" alt="" height=20 width=20/>*/
</style>
\ No newline at end of file
......@@ -55,6 +55,7 @@ export default {
height: 5%;
display: inline-flex;
justify-content: space-around;
}
#recherche {
......
......@@ -44,8 +44,8 @@ export default {
creerContenuPerso(data) {
return axios.post(urlBase + contenus + "addContenu", data, this.getHeader(localStorage.token))
},
uploaderContenuPerso(data){
return axios.post(urlBase + contenus + "uploadContenu", data, {
uploaderContenuPerso(data, auteur){
return axios.post(urlBase + contenus + "uploadContenu/" + auteur, data, {
headers: {
'Content-Type': 'multipart/form-data',
Authorization: "Bearer " + localStorage.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