Update: wagtail 2.11 -> 2.13 pour garder la duplication de bloc

pull/78/head
Raphael 2021-07-01 14:12:51 +02:00 commité par Antoine
Parent b33f630dc2
révision 8f71ebb86a
3 fichiers modifiés avec 2 ajouts et 24 suppressions

Voir le fichier

@ -1,25 +1,9 @@
import $ from 'jquery';
function collapseBlock(block) {
if (block.style.display === 'none') {
block.style.display = 'block';
} else {
block.style.display = 'none';
}
}
function initHeaders() {
const editorHeaders = document.getElementsByClassName('c-sf-block__header');
for (const editorHeader of editorHeaders) {
editorHeader.addEventListener(
'click',
e => {
if(e.target == e.currentTarget) {
collapseBlock(editorHeader.nextElementSibling);
}
}
);
editorHeader.nextElementSibling.style.display = 'none';
editorHeader.click();
}
}

Voir le fichier

@ -8,12 +8,6 @@
// Styles de l'administration
// -----------------------------------------------------------------------------
// react-streamfield
.c-sf-block__header:hover{
cursor: pointer;
}
// Masque les boutons d'ajouts s'ils ne sont pas visible
[class="c-sf-add-button"] {
display: none;

Voir le fichier

@ -9,6 +9,6 @@ django-environ ==0.4.5 # https://github.com/joke2k/django-environ
# Wagtail
# ------------------------------------------------------------------------------
wagtail >=2.11,<2.12 # https://wagtail.io
wagtail >=2.13,<2.14 # https://wagtail.io
wagtailmedia >=0.5,<0.6 # https://github.com/torchbox/wagtailmedia
wagtailmenus >=3.0,<3.1 # https://github.com/rkhleics/wagtailmenus