imrpove dropdown bulk action style
This commit is contained in:
parent
1ecdf5f544
commit
7fcc892398
2 changed files with 17 additions and 4 deletions
|
@ -215,6 +215,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul.dropdown-items {
|
||||||
|
padding-inline-start: 0;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
.dropdown-items {
|
.dropdown-items {
|
||||||
li {
|
li {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -261,11 +266,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make child links fill the whole clickable area
|
// Make child links fill the whole clickable area
|
||||||
> a {
|
> a, .dropdown-items-link {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
margin: -$default-padding;
|
margin: -$default-padding;
|
||||||
padding: $default-padding;
|
padding: $default-padding;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
|
|
|
@ -18,8 +18,11 @@
|
||||||
%li{ 'data-turbo': 'true' }
|
%li{ 'data-turbo': 'true' }
|
||||||
- if opt[:operation] == 'accepter'
|
- if opt[:operation] == 'accepter'
|
||||||
.wrapper
|
.wrapper
|
||||||
%a{ href: '#', onclick: "DS.showMotivation(event, 'accept');", class: ['fr-btn--icon-left', icons[opt[:operation].to_sym]] }
|
|
||||||
= opt[:label]
|
%a{ href: '#', class: 'dropdown-items-link', onclick: "DS.showMotivation(event, 'accept');" }
|
||||||
|
%span{ class: icons[opt[:operation].to_sym] }
|
||||||
|
.dropdown-description
|
||||||
|
%h4= opt[:label]
|
||||||
|
|
||||||
.motivation.hidden{ class: 'accept' }
|
.motivation.hidden{ class: 'accept' }
|
||||||
= form.text_area :motivation, class: 'motivation-text-area'
|
= form.text_area :motivation, class: 'motivation-text-area'
|
||||||
|
@ -33,4 +36,7 @@
|
||||||
|
|
||||||
= form.button "Valider la décision", class: ['fr-btn'], disabled: :disabled, name: "#{form.object_name}[operation]", data: { "batch-operation-target" => "submit", "submitter-operation" => opt[:operation]}
|
= form.button "Valider la décision", class: ['fr-btn'], disabled: :disabled, name: "#{form.object_name}[operation]", data: { "batch-operation-target" => "submit", "submitter-operation" => opt[:operation]}
|
||||||
- else
|
- else
|
||||||
= form.button opt[:label], class: ['fr-btn--icon-left', icons[opt[:operation].to_sym]], disabled: :disabled, name: "#{form.object_name}[operation]", data: { "batch-operation-target" => "submit", "submitter-operation" => opt[:operation]}
|
= form.button opt[:label], class: 'dropdown-items-link', disabled: :disabled, name: "#{form.object_name}[operation]", data: { "batch-operation-target" => "submit", "submitter-operation" => opt[:operation]} do
|
||||||
|
%span{ class: icons[opt[:operation].to_sym] }
|
||||||
|
.dropdown-description
|
||||||
|
%h4= opt[:label]
|
||||||
|
|
Loading…
Reference in a new issue