Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] Sidebar - switch to vertical collapsing #22587

Merged
merged 26 commits into from
Oct 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions administrator/components/com_menus/presets/joomla.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,6 @@
type="component"
element="com_menus"
link="index.php?option=com_menus&view=menus">
<menuitem
title="MOD_MENU_MENU_MANAGER_NEW_MENU"
type="component"
element="com_menus"
link="index.php?option=com_menus&amp;view=menu&amp;layout=edit"
scope="edit"
/>
</menuitem>
<menuitem
type="separator"
Expand Down
3 changes: 2 additions & 1 deletion administrator/modules/mod_menu/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

HTMLHelper::_('script', 'vendor/metismenujs/metismenujs.min.js', ['version' => 'auto', 'relative' => true]);
HTMLHelper::_('script', 'mod_menu/admin-menu.min.js', ['version' => 'auto', 'relative' => true], ['defer' => true]);

$doc = \Joomla\CMS\Factory::getDocument();
$direction = $doc->direction === 'rtl' ? 'float-right' : '';
$class = $enabled ? 'nav navbar-nav nav-stacked main-nav clearfix ' . $direction : 'nav navbar-nav nav-stacked main-nav clearfix disabled ' . $direction;
$class = $enabled ? 'nav flex-column main-nav ' . $direction : 'nav flex-column main-nav disabled ' . $direction;

// Recurse through children of root node if they exist
$menuTree = $menu->getTree();
Expand Down
7 changes: 3 additions & 4 deletions administrator/modules/mod_menu/tmpl/default_submenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

if ($current->hasChildren())
{
$linkClass[] = 'collapse-arrow';
$linkClass[] = 'has-arrow';

if ($current->getLevel() > 2)
{
Expand Down Expand Up @@ -112,12 +112,11 @@
{
$id = $current->get('id') ? ' id="menu-' . strtolower($current->get('id')) . '"' : '';

echo '<ul' . $id . ' class="nav panel-collapse collapse collapse-level-' . $current->getLevel() . '">' . "\n";
echo '<ul' . $id . ' class="collapse collapse-level-' . $current->getLevel() . '">' . "\n";
}
else
{
echo '<ul id="collapse' . $this->tree->getCounter() . '" class="nav panel-collapse collapse-level-1 collapse" role="menu" aria-hidden="true">
<li>' . Text::_($current->get('title')) . '<a href="#" class="close"><span aria-label="' . Text::_('MOD_MENU_ARIA_CLOSE_SUBMENU') . '">×</span></a></li>' . "\n";
echo '<ul id="collapse' . $this->tree->getCounter() . '" class="collapse-level-1 collapse" role="menu" aria-hidden="true">' . "\n";
}

// WARNING: Do not use direct 'include' or 'require' as it is important to isolate the scope for each call
Expand Down
9 changes: 7 additions & 2 deletions administrator/templates/atum/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,14 @@ $atum-toolbar-line-height: 2.3rem;
// Sidebar
$atum-level-1-bg: rgba($black, .65);
$atum-level-2-bg: rgba($black, .05);
$sidebar-bg: #122942;
$sidebar-width: 250px;
$sidebar-width-closed: 64px;
$main-brand-height: 50px;
$sidebar-width-closed: 48px;
$sidebar-sub-bg: #1b3654;
$sidebar-text-color: #7189a4;
$sidebar-link-color: #e3eaf1;
$sidebar-child-link-color: #cbd6e2;
$main-brand-height: 48px;

// Fonts
$font-family-base: Arial, sans-serif;
Expand Down
Loading