Commit 9bc8c6ba authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1813987: resizing wall/gallery block when content change"

parents c650b1bb 9e81132d
......@@ -70,6 +70,12 @@ class PluginBlocktypeGallery extends MaharaCoreBlocktype {
array(
'file' => get_config('wwwroot') . 'js/masonry/masonry.min.js',
'initjs' => " $('.js-masonry.thumbnails').masonry({ itemSelector: '.thumb' });"
),
array(
'file' => '',
'initjs' => "$('#slideshow{$blockid}').on('slid.bs.carousel', function () {
$(window).trigger('colresize');
});"
)
);
}
......
......@@ -214,11 +214,20 @@ function wallpost_success(form, data) {
}
}
formSuccess(form, data);
$(window).trigger('colresize');
}
}
jQuery( function() {
// needs to initialize the tinyMCE editor when the block is loaded
PieformManager.signal('onload');
if (typeof(tinyMCE) != 'undefined') {
tinyMCE.activeEditor.on('ResizeEditor', function(e) {
$(window).trigger('colresize');
});
tinyMCE.activeEditor.on('init', function(e) {
$(window).trigger('colresize');
});
}
});
EOF;
return "<script>$js</script>";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment