Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-45964

Issue with clean theme header banner and the site policy page

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.6.3, 2.7
    • JavaScript, Themes
    • 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

        1. after_fix.jpg
          81 kB
          John Hoopes
        2. before_fix.jpg
          77 kB
          John Hoopes

            Unassigned Unassigned
            jhoopes John Hoopes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.