Skip to content

Commit 28f7124

Browse files
Merge pull request #748 from dtaylor113/ignore-mobile-masthead-items
fix(pfVerticalNavigation): Masthead items work with ignoreMobile flag
2 parents f3e71c9 + 10a7414 commit 28f7124

File tree

3 files changed

+45
-3
lines changed

3 files changed

+45
-3
lines changed

src/navigation/vertical-navigation.html

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div>
22
<nav class="navbar navbar-pf-vertical">
3-
<div class="navbar-header">
3+
<div class="navbar-header" ng-class="{'ignore-mobile': $ctrl.ignoreMobile}">
44
<button type="button" class="navbar-toggle" ng-click="$ctrl.handleNavBarToggleClick()">
55
<span class="sr-only">Toggle navigation</span>
66
<span class="icon-bar"></span>
@@ -12,7 +12,8 @@
1212
<span class="navbar-brand-txt" ng-if="!$ctrl.brandSrc">{{$ctrl.brandAlt}}</span>
1313
</span>
1414
</div>
15-
<nav class="collapse navbar-collapse" ng-transclude></nav>
15+
<nav class="collapse navbar-collapse"
16+
ng-class="{'ignore-mobile': $ctrl.ignoreMobile}" ng-transclude></nav>
1617
<div class="nav-pf-vertical"
1718
ng-class="{'nav-pf-persistent-secondary': $ctrl.persistentSecondary,
1819
'nav-pf-vertical-collapsible-menus': $ctrl.pinnableMenus,
@@ -36,7 +37,8 @@
3637
'is-hover': item.isHover,
3738
'mobile-nav-item-pf': item.isMobileItem && $ctrl.showMobileSecondary,
3839
'mobile-secondary-item-pf': item.isMobileItem && $ctrl.showMobileTertiary,
39-
'visible-xs': item.mobileOnly}"
40+
'hidden': item.mobileOnly && $ctrl.ignoreMobile,
41+
'visible-xs': item.mobileOnly && !$ctrl.ignoreMobile}"
4042
ng-mouseenter="$ctrl.handlePrimaryHover(item)" ng-mouseleave="$ctrl.handlePrimaryUnHover(item)">
4143
<a ng-click="$ctrl.handlePrimaryClick(item, $event)">
4244
<span class="{{item.iconClass}}" ng-if="item.iconClass" ng-class="{hidden: $ctrl.hiddenIcons}"
+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
.navbar-header {
2+
&.ignore-mobile {
3+
float: left;
4+
}
5+
}
6+
7+
.navbar-collapse {
8+
&.ignore-mobile {
9+
width: auto;
10+
border-top: 0;
11+
box-shadow: none;
12+
display: block;
13+
14+
.navbar-nav {
15+
float: left;
16+
margin: 0;
17+
18+
&.navbar-right {
19+
float: right;
20+
.dropdown-menu {
21+
left: auto;
22+
right: 0;
23+
}
24+
}
25+
26+
> li {
27+
float: left;
28+
}
29+
30+
.open .dropdown-menu {
31+
position: absolute;
32+
margin-top: 0;
33+
background-color: @color-pf-white;
34+
border: 1px solid @color-pf-black-400;
35+
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
36+
}
37+
}
38+
}
39+
}

styles/angular-patternfly.less

+1
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@
1616
@import "../src/pagination/pagination.less";
1717
@import "../src/datepicker/datepicker.less";
1818
@import "../src/modals/modal-overlay/modal-overlay.less";
19+
@import "../src/navigation/vertical-navigation.less";

0 commit comments

Comments
 (0)