Fix buttons on screen bottom
This commit is contained in:
parent
d837066091
commit
b7058947e1
5 changed files with 23 additions and 22 deletions
|
@ -2,6 +2,7 @@ $blue: #0069CC;
|
||||||
$light-blue: #1C7EC9;
|
$light-blue: #1C7EC9;
|
||||||
$lighter-blue: #C3D9FF;
|
$lighter-blue: #C3D9FF;
|
||||||
$black: #333333;
|
$black: #333333;
|
||||||
|
$white: #FFFFFF;
|
||||||
$grey: #999999;
|
$grey: #999999;
|
||||||
$light-grey: #F8F8F8;
|
$light-grey: #F8F8F8;
|
||||||
$border-grey: #CCCCCC;
|
$border-grey: #CCCCCC;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
@import "colors";
|
@import "colors";
|
||||||
|
@import "constants";
|
||||||
|
|
||||||
#champs-editor {
|
#champs-editor {
|
||||||
.spinner {
|
.spinner {
|
||||||
|
@ -111,10 +112,21 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.header,
|
|
||||||
.footer {
|
.footer {
|
||||||
|
margin-bottom: 70px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.buttons {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-top: 30px;
|
margin: 0px;
|
||||||
margin-bottom: 30px;
|
position: fixed;
|
||||||
|
bottom: 0px;
|
||||||
|
background-color: $white;
|
||||||
|
max-width: $page-width;
|
||||||
|
width: 100%;
|
||||||
|
border: 1px solid $border-grey;
|
||||||
|
padding: 10px;
|
||||||
|
border-top-left-radius: 5px;
|
||||||
|
border-top-right-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="champs-editor">
|
<div class="champs-editor">
|
||||||
<div v-if="state.typesDeChamp.length > 3" class="header">
|
|
||||||
<button class="button" v-scroll-to="'.footer'" @click.prevent="addChamp">
|
|
||||||
<template v-if="state.isAnnotation">
|
|
||||||
Ajouter une annotation
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
Ajouter un champ
|
|
||||||
</template>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button class="button primary" @click.prevent="save">Enregistrer</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Draggable :list="state.typesDeChamp" :options="{handle:'.handle'}">
|
<Draggable :list="state.typesDeChamp" :options="{handle:'.handle'}">
|
||||||
<DraggableItem
|
<DraggableItem
|
||||||
v-for="(item, index) in state.typesDeChamp"
|
v-for="(item, index) in state.typesDeChamp"
|
||||||
|
@ -22,7 +9,8 @@
|
||||||
:key="item.id" />
|
:key="item.id" />
|
||||||
</Draggable>
|
</Draggable>
|
||||||
|
|
||||||
<div class="footer">
|
<div class="footer"></div>
|
||||||
|
<div class="buttons">
|
||||||
<button class="button" v-scroll-to="'.footer'" @click.prevent="addChamp">
|
<button class="button" v-scroll-to="'.footer'" @click.prevent="addChamp">
|
||||||
<template v-if="state.isAnnotation">
|
<template v-if="state.isAnnotation">
|
||||||
Ajouter une annotation
|
Ajouter une annotation
|
||||||
|
|
|
@ -105,7 +105,7 @@ feature 'As an administrateur I wanna create a new procedure', js: true do
|
||||||
blur
|
blur
|
||||||
expect(page).to have_content('Formulaire enregistré')
|
expect(page).to have_content('Formulaire enregistré')
|
||||||
|
|
||||||
within '.footer' do
|
within '.buttons' do
|
||||||
click_on 'Ajouter un champ'
|
click_on 'Ajouter un champ'
|
||||||
end
|
end
|
||||||
expect(page).to have_selector('#procedure_types_de_champ_attributes_1_libelle')
|
expect(page).to have_selector('#procedure_types_de_champ_attributes_1_libelle')
|
||||||
|
|
|
@ -13,7 +13,7 @@ feature 'As an administrateur I can edit types de champ', js: true do
|
||||||
it "Add a new champ" do
|
it "Add a new champ" do
|
||||||
click_on 'Supprimer'
|
click_on 'Supprimer'
|
||||||
|
|
||||||
within '.footer' do
|
within '.buttons' do
|
||||||
click_on 'Ajouter un champ'
|
click_on 'Ajouter un champ'
|
||||||
end
|
end
|
||||||
expect(page).to have_selector('#procedure_types_de_champ_attributes_0_libelle')
|
expect(page).to have_selector('#procedure_types_de_champ_attributes_0_libelle')
|
||||||
|
@ -22,7 +22,7 @@ feature 'As an administrateur I can edit types de champ', js: true do
|
||||||
expect(page).to have_content('Formulaire enregistré')
|
expect(page).to have_content('Formulaire enregistré')
|
||||||
|
|
||||||
page.refresh
|
page.refresh
|
||||||
within '.footer' do
|
within '.buttons' do
|
||||||
click_on 'Enregistrer'
|
click_on 'Enregistrer'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ feature 'As an administrateur I can edit types de champ', js: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "Add multiple champs" do
|
it "Add multiple champs" do
|
||||||
within '.footer' do
|
within '.buttons' do
|
||||||
click_on 'Ajouter un champ'
|
click_on 'Ajouter un champ'
|
||||||
click_on 'Ajouter un champ'
|
click_on 'Ajouter un champ'
|
||||||
click_on 'Ajouter un champ'
|
click_on 'Ajouter un champ'
|
||||||
|
@ -107,7 +107,7 @@ feature 'As an administrateur I can edit types de champ', js: true do
|
||||||
expect(page).to have_content('Formulaire enregistré')
|
expect(page).to have_content('Formulaire enregistré')
|
||||||
expect(page).to have_content('Supprimer', count: 2)
|
expect(page).to have_content('Supprimer', count: 2)
|
||||||
|
|
||||||
within '.footer' do
|
within '.buttons' do
|
||||||
click_on 'Ajouter un champ'
|
click_on 'Ajouter un champ'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue