Skip to content

Commit

Permalink
Merge pull request #13 from spasovski/ddown
Browse files Browse the repository at this point in the history
MOZ specific dropdown fix
  • Loading branch information
spasovski authored Nov 30, 2016
2 parents cf74405 + dc507d8 commit fddd178
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
32 changes: 32 additions & 0 deletions rd_ui/app/styles/redash.css
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ to add those CSS styles here. */
display: block;
}

.dashboards .dropdown-submenu:hover > .dropdown-menu {
display: flex;
}

.dropdown-submenu > a:after {
display: block;
content: " ";
Expand Down Expand Up @@ -273,6 +277,34 @@ to add those CSS styles here. */
border-radius: 6px 0 6px 6px;
}

.dashboards .dropdown-menu {
align-items: flex-start;
flex-direction: column;
flex-wrap: wrap;
justify-content: flex-start;
max-height: 500px;
}

.dashboards.open > .dropdown-menu {
display: flex;
}

.dashboards > .dropdown-menu {
width: 80vw;
align-items: flex-start;
}

.dashboards .dropdown-menu > li a {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}

.dashboards .dropdown-menu > li a,
.dashboards .dropdown-submenu > a {
width: 20vw;
}

.rd-tab .remove {
cursor: pointer;
color: #A09797;
Expand Down
8 changes: 4 additions & 4 deletions rd_ui/app/views/app_header.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</div>
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li class="dropdown"
<li class="dropdown dashboards"
ng-show="groupedDashboards.length > 0 || otherDashboards.length > 0 || currentUser.hasPermission('create_dashboard')"
dropdown>
<a href="#" class="dropdown-toggle" dropdown-toggle title="Dashboards">
Expand All @@ -21,16 +21,16 @@
<ul class="dropdown-menu" dropdown-menu>
<span ng-repeat="(name, group) in groupedDashboards">
<li class="dropdown-submenu">
<a href="#" ng-bind="name"></a>
<a href="#" title="{{name}}" ng-bind="name"></a>
<ul class="dropdown-menu">
<li ng-repeat="dashboard in group" role="presentation">
<a role="menu-item" ng-href="dashboard/{{dashboard.slug}}" ng-bind="dashboard.name"></a>
<a role="menu-item" title="{{dashboard.name}}" ng-href="dashboard/{{dashboard.slug}}" ng-bind="dashboard.name"></a>
</li>
</ul>
</li>
</span>
<li ng-repeat="dashboard in otherDashboards">
<a role="menu-item" ng-href="dashboard/{{dashboard.slug}}" ng-bind="dashboard.name"></a>
<a role="menu-item" title="{{dashboard.name}}" ng-href="dashboard/{{dashboard.slug}}" ng-bind="dashboard.name"></a>
</li>
<li class="divider"
ng-show="currentUser.hasPermission('create_dashboard') && (groupedDashboards.length > 0 || otherDashboards.length > 0)"></li>
Expand Down

0 comments on commit fddd178

Please sign in to comment.