File tree Expand file tree Collapse file tree 7 files changed +37
-14
lines changed
Expand file tree Collapse file tree 7 files changed +37
-14
lines changed Original file line number Diff line number Diff line change @@ -58,10 +58,10 @@ input[type=file] {
5858 display : none ;
5959
6060 + label {
61- color :white ;
61+ color : white ;
6262 border-radius : 4px ;
6363 padding : 10px 15px ;
64- cursor :pointer ;
64+ cursor : pointer ;
6565 text-transform : uppercase ;
6666 font-size : .7em ;
6767 font-weight : bold ;
@@ -79,15 +79,30 @@ input[type=file] {
7979
8080.input-wrapper--with-icon {
8181 position : relative ;
82+
83+ & .one-third {
84+ max-width : 33% ;
85+ }
86+
87+ & .input-with--enter-icon :after {
88+ content : " ↵" ;
89+ color :$PRIMARY_COLOR ;
90+ position : absolute ;
91+ top : 50% ;
92+ right : 20px ;
93+ @include transformHelper (translateY (-50% ));
94+ }
95+
8296 input :not ([type = radio ]) {
8397 padding-left : 50px ;
8498 }
99+
85100 svg {
86101 width : 15px ;
87102 position : absolute ;
88103 top : 50% ;
89104 left : 20px ;
90- transform : translateY (-50% );
105+ @include transformHelper ( translateY (-50% ) );
91106 }
92107}
93108
Original file line number Diff line number Diff line change 2020 rules =" max:100"
2121 v-slot =" { errors }" >
2222 <span class =" label__name" >
23- Titre de la sélection
23+ Titre de recherche
2424 </span >
2525 <input id =" Title" placeholder =" Entrez le titre de votre recherche" name =" title" v-model =" form.title"
2626 v-on:input =" debounceInput" class =" input--grey" type =" text" >
Original file line number Diff line number Diff line change 1616 <h1 >Gestion des catégories</h1 >
1717
1818 <div class =" header-wrapper" >
19- <div class =" input-wrapper--with-icon" >
19+ <div class =" input-wrapper--with-icon input-with--enter-icon " >
2020 <Icon type =" search" />
21- <input ref =" inputText" class =" input--primary-color" type =" text" @input =" resetIfEmpty" @keypress .enter =" debounceInput"
21+ <input ref =" inputText" class =" input--primary-color" type =" text" @input =" resetIfEmpty" @keydown .enter =" debounceInput"
2222 placeholder =" Rechercher" >
2323 </div >
2424
Original file line number Diff line number Diff line change 3939
4040
4141 <div class =" header-wrapper" >
42- <div class =" input-wrapper--with-icon" >
42+ <div class =" input-wrapper--with-icon input-with--enter-icon " >
4343 <Icon type =" search" />
44- <input ref =" inputText" class =" input--primary-color" type =" text" @input =" resetIfEmpty" @keypress .enter =" debounceInput"
44+ <input ref =" inputText" class =" input--primary-color" type =" text" @input =" resetIfEmpty" @keydown .enter =" debounceInput"
4545 placeholder =" Rechercher" >
4646 </div >
4747
Original file line number Diff line number Diff line change 2424 <h1 >Gestion des tags</h1 >
2525
2626 <div class =" header-wrapper" >
27- <div class =" input-wrapper--with-icon" >
27+ <div class =" input-wrapper--with-icon input-with--enter-icon " >
2828 <Icon type =" search" />
29- <input ref =" inputText" class =" input--primary-color" type =" text" @input =" resetIfEmpty" @keypress .enter =" debounceInput"
29+ <input ref =" inputText" class =" input--primary-color" type =" text" @input =" resetIfEmpty" @keydown .enter =" debounceInput"
3030 placeholder =" Rechercher" >
3131 </div >
3232
Original file line number Diff line number Diff line change 11<template >
22 <div class =" container--with-menu" >
33 <div class =" banner search-banner" >
4- <div class =" input-wrapper--with-icon" >
4+ <div class =" input-wrapper--with-icon one-third input-with--enter-icon " >
55 <Icon type =" search" />
6- <input ref =" inputText" class =" input--primary-color" type =" text" @keypress .enter =" debounceInput"
6+ <input ref =" inputText" class =" input--primary-color" type =" text" @input = " resetIfEmpty " @keydown .enter =" debounceInput"
77 placeholder =" Rechercher" >
88 </div >
99 </div >
8989 this .inputText .value = " "
9090 }
9191
92+ resetIfEmpty(e : any ) {
93+ const value: string = e .target .value ;
94+
95+ if (value === ' ' ) {
96+ this .$accessor .exercises .fetch ({data: {title: " " }});
97+ }
98+ }
99+
92100 refreshInput() {
93101 this .inputText .value = this .$accessor .exercises .search_criterion .title || ' ' ;
94102 }
Original file line number Diff line number Diff line change 3737 class =" init" >réinitialiser la recherche</span ></div >
3838
3939 <div class =" header-wrapper" >
40- <div class =" input-wrapper--with-icon" >
40+ <div class =" input-wrapper--with-icon input-with--enter-icon " >
4141 <Icon type =" search" />
42- <input ref =" inputText" class =" input--primary-color" type =" text" @input =" resetIfEmpty" @keypress .enter =" debounceInput"
42+ <input ref =" inputText" class =" input--primary-color" type =" text" @input =" resetIfEmpty" @keydown .enter =" debounceInput"
4343 placeholder =" Rechercher" >
4444 </div >
4545
You can’t perform that action at this time.
0 commit comments