Skip to content

Commit 060bf61

Browse files
committed
Merge pull request #3289 from mhartington/master
fix(subHeader): removes borders on android subheaders
2 parents c18c69f + ebe3226 commit 060bf61

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

js/angular/controller/navBarController.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,9 @@ function($scope, $element, $attrs, $compile, $timeout, $ionicNavBarDelegate, $io
414414
$element[isTabsTop ? 'addClass' : 'removeClass']('nav-bar-tabs-top');
415415
};
416416

417+
self.hasBarSubheader = function(isBarSubheader) {
418+
$element[isBarSubheader ? 'addClass' : 'removeClass']('nav-bar-has-subheader');
419+
};
417420

418421
// DEPRECATED, as of v1.0.0-beta14 -------
419422
self.changeTitle = function(val) {

js/angular/controller/navViewController.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ function($scope, $element, $attrs, $compile, $controller, $ionicNavBarDelegate,
5656

5757
$scope.$on('$ionicHistory.deselect', self.cacheCleanup);
5858
$scope.$on('$ionicTabs.top', onTabsTop);
59+
$scope.$on('$ionicSubheader', onBarSubheader);
5960

6061
ionic.Platform.ready(function() {
6162
if (ionic.Platform.isWebView() && $ionicConfig.views.swipeBackEnabled()) {
@@ -432,6 +433,10 @@ function($scope, $element, $attrs, $compile, $controller, $ionicNavBarDelegate,
432433
associatedNavBarCtrl && associatedNavBarCtrl.hasTabsTop(isTabsTop);
433434
}
434435

436+
function onBarSubheader(ev, isBarSubheader) {
437+
var associatedNavBarCtrl = getAssociatedNavBarCtrl();
438+
associatedNavBarCtrl && associatedNavBarCtrl.hasBarSubheader(isBarSubheader);
439+
}
435440

436441
function getAssociatedNavBarCtrl() {
437442
if (navBarDelegate) {

js/angular/directive/headerFooterBar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ function headerFooterBarDirective(isHeader) {
137137
var isSubheader = value.indexOf('bar-subheader') !== -1;
138138
$scope.$hasHeader = isShown && !isSubheader;
139139
$scope.$hasSubheader = isShown && isSubheader;
140+
$scope.$emit('$ionicSubheader', $scope.$hasSubheader);
140141
});
141142
$scope.$on('$destroy', function() {
142143
delete $scope.$hasHeader;

scss/_bar.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,10 @@
264264

265265
.platform-android {
266266

267+
.nav-bar-has-subheader .bar {
268+
border-bottom: 0;
269+
}
270+
267271
.bar {
268272

269273
.back-button .icon:before {

0 commit comments

Comments
 (0)