remove read more function because of accordion for procedure description
This commit is contained in:
parent
7340206f81
commit
6fa44a4c11
7 changed files with 1 additions and 69 deletions
|
@ -1,16 +1,6 @@
|
|||
@import "constants";
|
||||
|
||||
.commencer {
|
||||
@media (min-width: $two-columns-breakpoint) {
|
||||
.button:first-of-type {
|
||||
margin-top: 4 * $default-spacer;
|
||||
}
|
||||
}
|
||||
|
||||
.button {
|
||||
margin-bottom: 2 * $default-spacer;
|
||||
}
|
||||
|
||||
.optional-on-small-screens {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
@import "constants";
|
||||
|
||||
$procedure-context-breakpoint: $two-columns-breakpoint;
|
||||
$procedure-description-line-height: 22px;
|
||||
|
||||
.procedure-preview {
|
||||
.paperless-logo {
|
||||
|
@ -55,36 +54,6 @@ $procedure-description-line-height: 22px;
|
|||
border-bottom: 1px dotted $blue-france-500;
|
||||
}
|
||||
|
||||
.read-more-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width: $procedure-context-breakpoint) {
|
||||
// Truncate description and display the "Read more" UI if the text is too long
|
||||
.procedure-description-body.read-more-collapsed {
|
||||
// Setting the description at 25% of the viewport height:
|
||||
// - displays more text on screens having more vertical space (like small tablets);
|
||||
// - is enough for the action buttons to be visible on the bottom (even on mobiles).
|
||||
max-height: 25vh;
|
||||
|
||||
// If the text exceeds the max-height,
|
||||
// truncate it and displays the "Read more" button.
|
||||
&.read-more-enabled {
|
||||
overflow: auto;
|
||||
border-bottom: 1px solid $border-grey;
|
||||
|
||||
+ .read-more-button {
|
||||
display: block;
|
||||
position: relative;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
top: -19px;
|
||||
margin-bottom: -19px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.procedure-logos {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
|
@ -12,7 +12,6 @@ import '../shared/toggle-target';
|
|||
import { registerControllers } from '../shared/stimulus-loader';
|
||||
|
||||
import '../new_design/form-validation';
|
||||
import '../new_design/procedure-context';
|
||||
import '../new_design/procedure-form';
|
||||
|
||||
import { toggleCondidentielExplanation } from '../new_design/avis';
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
import { delegate } from '@utils';
|
||||
|
||||
function updateReadMoreVisibility() {
|
||||
const descBody = document.querySelector('.procedure-description-body');
|
||||
if (descBody) {
|
||||
// If the description text overflows, display a "Read more" button.
|
||||
const isOverflowing = descBody.scrollHeight > descBody.clientHeight;
|
||||
descBody.classList.toggle('read-more-enabled', isOverflowing);
|
||||
}
|
||||
}
|
||||
|
||||
function expandProcedureDescription() {
|
||||
const descBody = document.querySelector('.procedure-description-body');
|
||||
descBody.classList.remove('read-more-collapsed');
|
||||
}
|
||||
|
||||
addEventListener('DOMContentLoaded', updateReadMoreVisibility);
|
||||
addEventListener('resize', updateReadMoreVisibility);
|
||||
|
||||
delegate('click', '.read-more-button', expandProcedureDescription);
|
|
@ -18,11 +18,7 @@ function syncFormToPreview() {
|
|||
}
|
||||
|
||||
delegate('input', '.procedure-form #procedure_libelle', syncFormToPreview);
|
||||
delegate(
|
||||
'input',
|
||||
'.procedure-form #procedure_description',
|
||||
syncFormToPreview
|
||||
);
|
||||
delegate('input', '.procedure-form #procedure_description', syncFormToPreview);
|
||||
delegate(
|
||||
'input',
|
||||
'.procedure-form #procedure_description_target_audience',
|
||||
|
|
|
@ -395,7 +395,6 @@ en:
|
|||
identity_data: Identity data
|
||||
all_required: All fields are required.
|
||||
civility: Civility
|
||||
description: Description of the procedure
|
||||
first_name: First Name
|
||||
last_name: Last Name
|
||||
birthdate: Date de naissance
|
||||
|
|
|
@ -396,7 +396,6 @@ fr:
|
|||
identity_data: Données d’identité
|
||||
all_required: Tous les champs sont obligatoires.
|
||||
civility: Civilité
|
||||
description: Description de la démarche
|
||||
first_name: Prénom
|
||||
last_name: Nom
|
||||
birthdate: Date de naissance
|
||||
|
|
Loading…
Reference in a new issue