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

[Patch] Improve support for horizontal and right aligned docks in dock.js

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Blocks, JavaScript, Themes
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      The attached patch improves support for horizontal docks and right-aligned docks to the dock.js file.

      It makes three main changes:

      1. The dockitem_container and controls divs are now wrapped in a "buttons" container. In a horizontal dock, each dockitem will need to float. The controls div would also need to float after the dock items. Without this additional container, it is nearly impossible for the theme designer to contain the floats (each dockitem floats, dockitem_container floats, and controls float). Another solution would be to include the controls div within the dockitem_container div, but I didn't want to mess up any existing themes.
      2. M.core_dock.resize has been modified to adjust panel's left and top styles according to the dock orientation and position. Resize understands orientations vertical and horizontal and orientations left, right, and top.
      3. A new body class is added referencing dock's orientation and position, e.g. has_dock_left_vertical, has_dock_right_vertical, has_dock_top_horizontal. This will help themes support multiple dock layouts.

      This patch doesn't contain any CSS updates. Existing left-vertical docks should continue to work without any issues. Obviously, themes would need to update their CSS if a different dock layout was desired.

        Attachments

          Activity

            People

            • Assignee:
              samhemelryk Sam Hemelryk
              Reporter:
              blt04 Brandon Turner
              Tester:
              Nobody
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Bas Brands
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10