Fixes hallotoolbar misplacement within StreamField StructBlock

pull/3415/head
Janneke Janssen 2017-02-28 21:15:06 +01:00
rodzic ce251fbd96
commit 0f39001e46
1 zmienionych plików z 2 dodań i 1 usunięć
wagtail/wagtailadmin/static_src/wagtailadmin/js

Wyświetl plik

@ -27,10 +27,11 @@ function makeHalloRichTextEditable(id) {
}
var closestObj = input.closest('.object');
var isDeepNested = input.closest('.struct-block').length;
richText.hallo({
toolbar: 'halloToolbarFixed',
toolbarCssClass: (closestObj.hasClass('full')) ? 'full' : (closestObj.hasClass('stream-field')) ? 'stream-field' : '',
toolbarCssClass: (closestObj.hasClass('full')) ? 'full' : (closestObj.hasClass('stream-field') && !isDeepNested) ? 'stream-field' : '',
plugins: halloPlugins
}).bind('hallomodified', function(event, data) {
input.val(data.content);