-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
2.6.3, 2.7
-
MOODLE_26_STABLE, MOODLE_27_STABLE
The issue i'm finding is that pages with buttons underneath an embedded object/resource.
embedded objects and resources get auto resized by the M.util.init_maximised_embed function in the javascript-static file, and the resizing doesn't take into account the banner at the top of the page for the clean theme/themes derived from the clean theme.
basically we just need to take that height into account when it calculates the height for the embedded resource.
Basically to fix it we just add an id to the header/banner html element and then update the ini_maximised_embed.resize_object function to something like this:
var headerheight = get_htmlelement_size('page-header', 'height');
var floatingbanner = get_htmlelement_size('floating-banner', 'height');
var footerheight = get_htmlelement_size('page-footer', 'height');
var newheight = parseInt(Y.one('body').get('winHeight')) - footerheight - headerheight - floatingbanner - 100;
where I made the header html element's id "floating-banner"
(<header role="banner" id="floating-banner" class="navbar navbar-fixed-top<?php echo $html->navbarclass ?> moodle-has-zindex">)
Attached are before and after images too
- duplicates
-
MDL-34687 embedded object resizing javascript causing disappearing bug when HTML changed.
-
- Closed
-