Skip to content

Commit 95471a4

Browse files
committed
Merge pull request django-cms#4178 from FinalAngel/develop
Structure board fixes
2 parents c0b338d + 715e221 commit 95471a4

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

cms/static/cms/js/modules/cms.plugins.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,9 @@ $(document).ready(function () {
699699
el.addClass('cms_dragitem-expanded').parent().find('> .cms_draggables').show();
700700
}
701701

702+
// make sure structurboard gets updated after expanding
703+
$(window).trigger('resize.sideframe');
704+
702705
// save settings
703706
CMS.API.Toolbar.setSettings(settings);
704707
});
@@ -784,6 +787,8 @@ $(document).ready(function () {
784787
tpl.fadeOut(function () {
785788
$(this).remove()
786789
});
790+
// make sure structurboard gets updated after success
791+
$(window).trigger('resize.sideframe');
787792
}
788793

789794
});

cms/static/cms/js/modules/cms.structureboard.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ $(document).ready(function () {
353353
'dropOnEmpty': true,
354354
'forcePlaceholderSize': true,
355355
'helper': 'clone',
356-
'appendTo': 'body',
356+
'appendTo': '.cms_structure-content',
357357
'cursor': 'move',
358358
'opacity': 0.4,
359359
'zIndex': 9999999,
@@ -382,6 +382,11 @@ $(document).ready(function () {
382382
$(this).show();
383383
}
384384
});
385+
// add overflow hidden to body
386+
$('.cms_structure-content').css({
387+
'height': $(document).height(),
388+
'overflow': 'hidden'
389+
});
385390
},
386391

387392
'stop': function (event, ui) {
@@ -416,6 +421,12 @@ $(document).ready(function () {
416421
$(this).hide();
417422
}
418423
});
424+
425+
// add overflow hidden to body
426+
$('.cms_structure-content').css({
427+
'height': '',
428+
'overflow': ''
429+
});
419430
},
420431
'isAllowed': function(placeholder, placeholderParent, originalItem) {
421432
// cancel if action is excecuted

0 commit comments

Comments
 (0)