The attached patch improves support for horizontal docks and right-aligned docks to the dock.js file.
It makes three main changes:
- 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.
- 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.
- 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.