Commit 49d6cba2 authored by Lucas Détré's avatar Lucas Détré

adjusting focus on keypress in modification textarea, style of modification...

adjusting focus on keypress in modification textarea, style of modification interface, fix problems with nav icons on firefox and add text to home page
parent e24c12f9
Pipeline #2762 passed with stage
in 2 minutes and 25 seconds
......@@ -8,7 +8,18 @@
</div>
<div class="row mt-3">
<div class="col-md-12">
<p>Vide, quantum, inquam, fallare, Torquate. oratio me istius philosophi non offendit; nam et complectitur verbis, quod vult, et dicit plane, quod intellegam; et tamen ego a philosopho, si afferat eloquentiam, non asperner, si non habeat, non admodum flagitem. re mihi non aeque satisfacit, et quidem locis pluribus. sed quot homines, tot sententiae; falli igitur possumus.</p>
<p>
Trèfle est un outil dédié aux dispositifs de financement des formations.
</p>
<p>
Il recense région par région tous les dispositifs applicables.
</p>
<p>
Trèfle vous permet de consulter ou de modifier un dispositif de financement existant.
</p>
<p>
Les règles enregistrées dans Trèfle alimentent le simulateur de financement de formation disponible sur <a href="https://labonneformation.pole-emploi.fr/" target="_blank">La Bonne Formation</a> et <a href="https://candidat.pole-emploi.fr/formations/accueil" target="_blank">Pole Emploi.fr</a>
</p>
</div>
</div>
<div class="row mt-3">
......@@ -21,7 +32,7 @@
<div class="col-md-8 col-sm-12">
<div id="modification_list">
<div v-if="selected_rule">
<h5> Modification(s) de la règle en cours de validation {{ selected_rule }} ({{ Object.keys(selected_modification_list).length }}) </h5>
<h5> Modification(s) de la règle en cours de validation {{ selected_rule }} ({{ Object.keys(selected_modification_list).length }}) </h5>
<ul v-for="modification in selected_modification_list" :key="modification.id" class="dash">
<li>
<a :href="'referentiel#'+selected_rule+'.rules#modified'"> {{ modification.title }} </a>
......@@ -67,7 +78,7 @@
beforeMount: function() {
this.loadInProgressModification();
},
methods: {
methods: {
loadInProgressModification: function () {
this.$http
.get('/source/modified')
......@@ -121,7 +132,7 @@
}
return acc;
}, {}))
return {
labels: keys,
datasets: [
......@@ -140,5 +151,5 @@
width: 20rem;
height: 20rem;
}
</style>
......@@ -71,16 +71,16 @@
</div>
<div id="svg_icons">
<svg display="none">
<symbol id="accueil_icon" width="19px" height="17px" viewBox="0 0 19 17">
<symbol id="accueil_icon" width="18px" height="17px" viewBox="0 0 19 17">
<path d="M7.19785197,15.655 L7.19785197,10.655 L11.197852,10.655 L11.197852,15.655 C11.197852,16.205 11.647852,16.655 12.197852,16.655 L15.197852,16.655 C15.747852,16.655 16.197852,16.205 16.197852,15.655 L16.197852,8.655 L17.897852,8.655 C18.357852,8.655 18.577852,8.085 18.227852,7.785 L9.86785197,0.255 C9.48785197,-0.085 8.90785197,-0.085 8.52785197,0.255 L0.167851974,7.785 C-0.172148026,8.085 0.0378519742,8.655 0.497851974,8.655 L2.19785197,8.655 L2.19785197,15.655 C2.19785197,16.205 2.64785197,16.655 3.19785197,16.655 L6.19785197,16.655 C6.74785197,16.655 7.19785197,16.205 7.19785197,15.655" id="Fill-1"></path>
</symbol>
<symbol id="referentiel_icon" width="18px" height="18px" viewBox="0 0 18 18">
<symbol id="referentiel_icon" width="17px" height="18px" viewBox="0 0 18 18">
<g id="Welcome" stroke="none" stroke-width="1" fill-rule="evenodd"><g id="Ecran_Ref_1_Hover" transform="translate(-36.000000, -162.000000)"><g id="Navigation" transform="translate(0.000000, 65.000000)"><g id="Icone_Referentiel" transform="translate(36.000000, 97.000000)"><path d="M2,16 L16,16 L16,2 L2,2 L2,16 Z M17,0 L1,0 C0.45,0 0,0.45 0,1 L0,17 C0,17.55 0.45,18 1,18 L17,18 C17.55,18 18,17.55 18,17 L18,1 C18,0.45 17.55,0 17,0 L17,0 Z M4,14 L6,14 L6,12 L4,12 L4,14 Z M4,10 L6,10 L6,8 L4,8 L4,10 Z M4,6 L6,6 L6,4 L4,4 L4,6 Z M9,14 L13,14 C13.55,14 14,13.55 14,13 C14,12.45 13.55,12 13,12 L9,12 C8.45,12 8,12.45 8,13 C8,13.55 8.45,14 9,14 L9,14 Z M9,10 L13,10 C13.55,10 14,9.55 14,9 C14,8.45 13.55,8 13,8 L9,8 C8.45,8 8,8.45 8,9 C8,9.55 8.45,10 9,10 L9,10 Z M9,6 L13,6 C13.55,6 14,5.55 14,5 C14,4.45 13.55,4 13,4 L9,4 C8.45,4 8,4.45 8,5 C8,5.55 8.45,6 9,6 L9,6 Z" id="Fill-1"></path></g></g></g></g>
</symbol>
<symbol id="financements_icon" x="0px" y="0px" width="30px" height="30px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;">
<path d="M15,0C6.729,0,0,6.729,0,15c0,8.271,6.729,15,15,15c8.271,0,15-6.729,15-15C30,6.729,23.271,0,15,0z M15,27.777 C7.956,27.777,2.223,22.046,2.223,15S7.956,2.223,15,2.223S27.777,7.954,27.777,15S22.044,27.777,15,27.777z"/><path d="M15,3.5C8.66,3.5,3.5,8.659,3.5,15S8.66,26.5,15,26.5S26.5,21.341,26.5,15S21.34,3.5,15,3.5z M19.145,10.677 c-0.754-0.593-1.61-0.89-2.568-0.89c-0.741,0-1.395,0.239-1.957,0.718c-0.563,0.479-0.963,1.116-1.199,1.912h4.309v1.891h-4.611 c-0.027,0.397-0.041,0.674-0.041,0.829c0,0.184,0.007,0.381,0.02,0.598h4.63v1.922h-4.328c0.506,1.699,1.514,2.548,3.024,2.548 c0.95,0,1.856-0.304,2.72-0.911v2.488c-0.795,0.484-1.832,0.728-3.115,0.728c-1.516,0-2.753-0.42-3.71-1.259 s-1.591-2.038-1.901-3.595H9.182v-1.923h0.971c-0.014-0.168-0.021-0.367-0.021-0.597c0-0.12,0.014-0.396,0.041-0.829H9.182v-1.891 h1.285c0.37-1.558,1.072-2.768,2.103-3.63c1.032-0.863,2.316-1.295,3.853-1.295c1.126,0,2.032,0.186,2.72,0.557v2.629H19.145z"/>
<symbol id="financements_icon" width="20px" height="25px" viewBox="0 0 35 35">
<path d="M15,0C6.729,0,0,6.729,0,15c0,8.271,6.729,15,15,15c8.271,0,15-6.729,15-15C30,6.729,23.271,0,15,0z M15,27.777 C7.956,27.777,2.223,22.046,2.223,15S7.956,2.223,15,2.223S27.777,7.954,27.777,15S22.044,27.777,15,27.777z"/><path d="M15,3.5C8.66,3.5,3.5,8.659,3.5,15S8.66,26.5,15,26.5S26.5,21.341,26.5,15S21.34,3.5,15,3.5z M19.145,10.677 c-0.754-0.593-1.61-0.89-2.568-0.89c-0.741,0-1.395,0.239-1.957,0.718c-0.563,0.479-0.963,1.116-1.199,1.912h4.309v1.891h-4.611 c-0.027,0.397-0.041,0.674-0.041,0.829c0,0.184,0.007,0.381,0.02,0.598h4.63v1.922h-4.328c0.506,1.699,1.514,2.548,3.024,2.548 c0.95,0,1.856-0.304,2.72-0.911v2.488c-0.795,0.484-1.832,0.728-3.115,0.728c-1.516,0-2.753-0.42-3.71-1.259 s-1.591-2.038-1.901-3.595H9.182v-1.923h0.971c-0.014-0.168-0.021-0.367-0.021-0.597c0-0.12,0.014-0.396,0.041-0.829H9.182v-1.891 h1.285c0.37-1.558,1.072-2.768,2.103-3.63c1.032-0.863,2.316-1.295,3.853-1.295c1.126,0,2.032,0.186,2.72,0.557v2.629H19.145z"/>
</symbol>
<symbol id="simulateur_icon" width="17px" height="13px" viewBox="0 0 17 13">
......@@ -91,7 +91,7 @@
<path d="M17,14.0002 L3,14.0002 C2.45,14.0002 2,13.5502 2,13.0002 L2,5.0002 C2,4.4502 2.45,4.0002 3,4.0002 L17,4.0002 C17.55,4.0002 18,4.4502 18,5.0002 L18,13.0002 C18,13.5502 17.55,14.0002 17,14.0002 M18,2.0002 L10,2.0002 L8.59,0.5902 C8.21,0.2102 7.7,0.0002 7.17,0.0002 L2,0.0002 C0.9,0.0002 0.01,0.9002 0.01,2.0002 L0,14.0002 C0,15.1002 0.9,16.0002 2,16.0002 L18,16.0002 C19.1,16.0002 20,15.1002 20,14.0002 L20,4.0002 C20,2.9002 19.1,2.0002 18,2.0002"></path>
</symbol>
<symbol id="outils_icon" width="24" height="24" viewBox="0 0 24 24">
<symbol id="outils_icon" width="23px" height="25px" viewBox="0 0 30 30">
<path fill="none" d="M0 0h24v24H0V0z"/><path d="M22.61 18.99l-9.08-9.08c.93-2.34.45-5.1-1.44-7C9.79.61 6.21.4 3.66 2.26L7.5 6.11 6.08 7.52 2.25 3.69C.39 6.23.6 9.82 2.9 12.11c1.86 1.86 4.57 2.35 6.89 1.48l9.11 9.11c.39.39 1.02.39 1.41 0l2.3-2.3c.4-.38.4-1.01 0-1.41zm-3 1.6l-9.46-9.46c-.61.45-1.29.72-2 .82-1.36.2-2.79-.21-3.83-1.25C3.37 9.76 2.93 8.5 3 7.26l3.09 3.09 4.24-4.24-3.09-3.09c1.24-.07 2.49.37 3.44 1.31 1.08 1.08 1.49 2.57 1.24 3.96-.12.71-.42 1.37-.88 1.96l9.45 9.45-.88.89z"/>
</symbol>
......
......@@ -5,7 +5,7 @@
<div id="referentiel-main-row">
<div class="container ml-5 mr-2">
<div class="row">
<div :class="classCollapsedMenu">
<div v-if="!isEditMode" :class="classCollapsedMenu">
<div class="mb-3 pull-right">
<button @click="collapsed = !collapsed" type="button" class="btn main-button mb-5">
<span v-show="collapsed"><span class="chevron-toggle">&#8594;</span> Ouvrir le panneau</span>
......@@ -66,6 +66,7 @@
collapsed: false,
currentRuleName: decodeURI(window.location.hash).split('#').pop() == "modified" ? decodeURI(window.location.hash).split('#')[1]:decodeURI(window.location.hash).split('#').pop(),
inProgressModification : false,
isEditMode: false,
}
},
computed: {
......
......@@ -49,7 +49,7 @@
</div>
<div class="row mb-3">
<label for="content"><u>Contenu de la règle</u></label>
<textarea-autosize id="content" v-model="content" class="rule-modification-text" :class="{editErrorClass: error_flags.notModified }" v-focus v-on:click="this.el.focus();"/>
<TextAreaAutosize id="content" :value="content" class="rule-modification-text" :class="{editErrorClass: error_flags.notModified }" v-focus/>
<span v-if="error_flags.notModified" class="text-danger font-weight-light">Aucune modification n'a été renseignée</span>
</div>
<div class="row mb-3">
......@@ -74,7 +74,7 @@
<span v-if="error_flags.badUser" class="text-danger font-weight-light">Cet utilisateur n'est pas autorisé à soumettre des modifications<br></span>
<span v-if="error_flags.noPass" class="text-danger font-weight-light">Ce champ est obligatoire<br></span>
<span v-if="!error_flags.noUser && !error_flags.noPass" class="font-weight-light">* Champs obligatoires<br></span>
<template v-slot:modal-footer>
<template v-slot:modal-footer>
<input @click="auth_to_edit" type="button" class="btn main-button-primary pull-right" value="Suivant"/>
</template>
</b-modal>
......@@ -84,7 +84,7 @@
<textarea id="comment" v-model="comment" :class="{editErrorClass: error_flags.noResume}" rows="3"></textarea>
<span v-if="error_flags.noResume" class="text-danger font-weight-light">Ce champ est obligatoire</span>
<span v-if="!error_flags.noUser && !error_flags.noResume" class="font-weight-light">* Champ obligatoire</span>
<template v-slot:modal-footer>
<template v-slot:modal-footer>
<input @click="save" type="button" class="btn main-button-primary pull-right" value="Enregistrer"/>
</template>
</b-modal>
......@@ -93,12 +93,13 @@
</div>
<div v-else class="text-center loading-gif">
<img src="./../assets/images/loading.gif" alt="loading...">
</div>
</div>
</div>
</template>
<script>
import TreeItem from './TreeItem.vue';
import Modification from './Modification.vue';
import TextAreaAutosize from "./TextAreaAutosize.vue";
function Node(name) {
this.name = name;
......@@ -110,7 +111,8 @@
name: 'Rule',
components: {
TreeItem,
Modification
Modification,
TextAreaAutosize
},
props: ['name', 'data', 'path', 'printRulePath', 'rulePath'],
data: function(){
......@@ -165,7 +167,15 @@
return Boolean(!this.modification_count)
}