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

Block Region issue in My Home

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.9
    • 2.9
    • JavaScript
    • MOODLE_29_STABLE
    • MOODLE_29_STABLE
    • MDL-49094-master
    • Hide

      Run attached behat test

      Note: I did not feel it necessary to add the behat test to the branch as it is such a specific test that I do not feel that it makes sense to be run on such a regular basis.

      Show
      Run attached behat test Note: I did not feel it necessary to add the behat test to the branch as it is such a specific test that I do not feel that it makes sense to be run on such a regular basis.

      In trying to track down why the body class 'content-only' only appears in some situations and not others, I discovered it was set using JavaScript.
      This is making lots of work all round, thus calling for yet more overqualified CSS mark-up of 7 or 8 bodyclasses selectors in themes just to make a page layout display correctly, when .content-only would do just as well!

      For example, when all side blocks are docked in the My Home page (mydashboard) the blocks in the centre of the page are classed as a block region, yet not given the body class of 'content-only' in yui/src/dock/js/dock.js and other similar scripts elsewhere (I cannot quite fathom which is which).

      Looking at the dock.js it looks as though a condition could be set up that sets the content-only when All side blocks are docked whilst some blocks are in the center content region.

              if (BODY.hasClass('blocks-moving')) {
                  // open up blocks during blocks positioning
                  showregions = true;
              }
              if (populatedblockregions === 0 && showregions === false) {
                  BODY.addClass(CSS.contentonly);
              } else {
                  BODY.removeClass(CSS.contentonly);
              }
      

      Here is the CSS
      =============

      .jsenabled.has-region-content.used-region-content.docked-region-side-pre.docked-region-side-post #region-main-box,
      .jsenabled.has-region-content.used-region-content.docked-region-side-pre.docked-region-side-post #region-main {
        width: 100%;
      }
       
      .content-only #region-main-box,
      .content-only #region-main {
        width: 100%;
      }
      

            dobedobedoh Andrew Lyons
            lazydaisy Mary Evans
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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