diff --git a/wagtail/admin/static_src/wagtailadmin/js/page-editor.js b/wagtail/admin/static_src/wagtailadmin/js/page-editor.js index 647cec26d5..d624dc4dd2 100644 --- a/wagtail/admin/static_src/wagtailadmin/js/page-editor.js +++ b/wagtail/admin/static_src/wagtailadmin/js/page-editor.js @@ -242,7 +242,7 @@ function initCollapsibleBlocks() { $fieldset.hide(); } - $li.find('> h2').on('click', function() { + $li.find('> .title-wrapper').on('click', function() { if (!$li.hasClass('collapsed')) { $li.addClass('collapsed'); $fieldset.hide('slow'); diff --git a/wagtail/admin/static_src/wagtailadmin/scss/layouts/page-editor.scss b/wagtail/admin/static_src/wagtailadmin/scss/layouts/page-editor.scss index 5fe504f6db..1b0a219ab8 100644 --- a/wagtail/admin/static_src/wagtailadmin/scss/layouts/page-editor.scss +++ b/wagtail/admin/static_src/wagtailadmin/scss/layouts/page-editor.scss @@ -86,7 +86,7 @@ $object-title-height: 40px; opacity: 1; } - > h3 { + > .title-wrapper { box-sizing: border-box; height: $object-title-height; -webkit-font-smoothing: auto; @@ -115,8 +115,7 @@ $object-title-height: 40px; font-size: inherit; } - &:before, - label:before { + &:before { @include font-smoothing; text-shadow: none; font-family: wagtail; @@ -218,7 +217,7 @@ $object-title-height: 40px; // special panel for the publishing fields, requires a bit more pizzazz &.publishing { - > h3:before { + > .title-wrapper:before { content: map-get($icons, 'date'); font-size: 1.8rem; line-height: 1.4em; @@ -301,18 +300,16 @@ $object-title-height: 40px; // and h2 has position: absolute which doesn't add to it either, so it would be 0 without this min-height: 41px; - > h3 { - &:before, - > label:before { + .title-wrapper { + &:before { content: map-get($icons, 'collapse-up'); cursor: pointer; } } &.collapsed { - > h3 { - &:before, - > label:before { + .title-wrapper { + &:before { content: map-get($icons, 'collapse-down'); } } diff --git a/wagtail/admin/templates/wagtailadmin/edit_handlers/object_list.html b/wagtail/admin/templates/wagtailadmin/edit_handlers/object_list.html index a8cbb343ad..b002ad157c 100644 --- a/wagtail/admin/templates/wagtailadmin/edit_handlers/object_list.html +++ b/wagtail/admin/templates/wagtailadmin/edit_handlers/object_list.html @@ -2,9 +2,11 @@ {% for child in self.children %}