Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Géocontrib Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
externe Matthieu
Géocontrib Frontend
Commits
2b322104
Commit
2b322104
authored
2 years ago
by
Timothee P
Committed by
Sébastien DA ROCHA
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
REDMINE_ISSUE-14462
|Bouton filtres mal placé et flêche inconsistante
parent
edab018f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/Projects/ProjectsMenu.vue
+52
-56
52 additions, 56 deletions
src/components/Projects/ProjectsMenu.vue
with
52 additions
and
56 deletions
src/components/Projects/ProjectsMenu.vue
+
52
−
56
View file @
2b322104
<
template
>
<div
class=
"filters-container"
>
<div
class=
"ui styled accordion"
>
<div
id=
"filters-container"
>
<div
class=
"ui styled accordion"
@
click=
"displayFilters = !displayFilters"
>
<div
id=
"filters"
class=
"title collapsible-filters"
>
FILTRES
<i
class=
"ui icon c
aret right down
"
:
class=
"
['
ui icon c
ustomcaret',
{ 'collapsed': !displayFilters }]
"
aria-hidden="true"
/>
</div>
</div>
<div
class=
"ui menu filters
hidden
"
>
<div
:
class=
"
['
ui menu filters
',
{ 'hidden': displayFilters }]
">
<div
class=
"item"
>
<label>
Niveau d'autorisation requis
...
...
@@ -40,7 +43,7 @@
v-on=
"$listeners"
/>
</div>
<div
class=
"
right
item"
>
<div
class=
"item"
>
<label>
Recherche par nom
</label>
...
...
@@ -69,6 +72,7 @@ export default {
data
()
{
return
{
displayFilters
:
false
,
moderationOptions
:
[
{
label
:
'
Tous
'
,
...
...
@@ -157,42 +161,10 @@ export default {
}
},
mounted
()
{
const
el
=
document
.
getElementsByClassName
(
'
collapsible-filters
'
);
el
[
0
].
addEventListener
(
'
click
'
,
function
()
{
const
icon
=
document
.
getElementsByClassName
(
'
caret
'
);
icon
[
0
].
classList
.
toggle
(
'
right
'
);
const
content
=
document
.
getElementsByClassName
(
'
filters
'
);
content
[
0
].
classList
.
toggle
(
'
hidden
'
);
if
(
content
[
0
].
style
.
maxHeight
){
content
[
0
].
style
.
maxHeight
=
null
;
}
else
{
content
[
0
].
style
.
maxHeight
=
content
[
0
].
scrollHeight
+
5
+
'
px
'
;
}
});
window
.
addEventListener
(
'
resize
'
,
this
.
handleResize
);
},
methods
:
{
...
mapActions
(
'
projects
'
,
[
'
SEARCH_PROJECTS
'
]),
handleResize
()
{
if
(
window
.
innerWidth
<=
700
)
{
const
icon
=
document
.
getElementsByClassName
(
'
caret
'
);
icon
[
0
].
classList
.
toggle
(
'
right
'
);
const
content
=
document
.
getElementsByClassName
(
'
filters
'
);
content
[
0
].
classList
.
toggle
(
'
hidden
'
);
if
(
content
[
0
].
style
.
maxHeight
){
content
[
0
].
style
.
maxHeight
=
null
;
}
else
{
content
[
0
].
style
.
maxHeight
=
content
[
0
].
scrollHeight
+
5
+
'
px
'
;
}
}
}
}
};
</
script
>
...
...
@@ -205,18 +177,34 @@ export default {
transition: @arguments;
}
.
filters-container {
#
filters-container {
width: 100%;
display: flex;
flex-direction: column;
justify-content: flex-end;
align-items: center;
margin-bottom: 1rem;
align-items: flex-end;
.accordion {
width: fit-content
!important
;
width: fit-content;
.collapsible-filters {
font-size: 1.25em;
padding-right: 0;
.customcaret{
transition: transform .2s ease;
&.collapsed {
transform: rotate(180deg);
}
&::before{
position: relative;
right: 0;
top: 65%;
color: #999;
margin-top: 4px;
border-color: #999 transparent transparent;
border-style: solid;
border-width: 5px 5px 0;
content: "";
}
}
}
}
.filters {
...
...
@@ -224,16 +212,16 @@ export default {
height:auto;
min-height: 0;
max-height:75px;
opacity: 1;
margin: 0 0 1em 0;
border: none;
box-shadow: none;
.transition-properties(
max-height
0.2s ease-out;);
.transition-properties(
all
0.2s ease-out;);
.item {
display: flex;
flex-direction: column;
align-items: flex-start !important;
padding: 0.4em 0.6em 0.4em 0;
padding: 0.5em;
label {
margin-bottom: 0.2em;
...
...
@@ -247,33 +235,41 @@ export default {
.item::before {
width: 0;
}
.right.item {
padding-right: 0;
#search-projects {
width: 100%;
}
#search-projects {
width: 100%;
}
.right.item::before {
width: 0;
}
}
.filters.hidden {
max-height: 0;
overflow: hidden;
border: none;
opacity: 0;
max-height: 0;
}
}
@media screen and (min-width: 701px) {
.item {
&:first-child {
padding-left: 0;
}
&:last-child {
padding-right: 0;
}
}
}
@media screen and (max-width: 700px) {
.
filters-container {
#
filters-container {
.filters {
display: flex;
flex-direction: column;
.transition-properties(max-height 0.2s ease-out;);
max-height: 275px;
.transition-properties(all 0.2s ease-out;);
.item {
width: 100%;
padding-right: 0;
padding-left: 0;
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment