fix(subHeader): removes borders on android subheaders

Closes #3265
This commit is contained in:
mhartington
2015-03-11 12:01:36 -04:00
parent c18c69f71c
commit ebe32265e4
4 changed files with 13 additions and 0 deletions

View File

@@ -414,6 +414,9 @@ function($scope, $element, $attrs, $compile, $timeout, $ionicNavBarDelegate, $io
$element[isTabsTop ? 'addClass' : 'removeClass']('nav-bar-tabs-top');
};
self.hasBarSubheader = function(isBarSubheader) {
$element[isBarSubheader ? 'addClass' : 'removeClass']('nav-bar-has-subheader');
};
// DEPRECATED, as of v1.0.0-beta14 -------
self.changeTitle = function(val) {

View File

@@ -56,6 +56,7 @@ function($scope, $element, $attrs, $compile, $controller, $ionicNavBarDelegate,
$scope.$on('$ionicHistory.deselect', self.cacheCleanup);
$scope.$on('$ionicTabs.top', onTabsTop);
$scope.$on('$ionicSubheader', onBarSubheader);
ionic.Platform.ready(function() {
if (ionic.Platform.isWebView() && $ionicConfig.views.swipeBackEnabled()) {
@@ -432,6 +433,10 @@ function($scope, $element, $attrs, $compile, $controller, $ionicNavBarDelegate,
associatedNavBarCtrl && associatedNavBarCtrl.hasTabsTop(isTabsTop);
}
function onBarSubheader(ev, isBarSubheader) {
var associatedNavBarCtrl = getAssociatedNavBarCtrl();
associatedNavBarCtrl && associatedNavBarCtrl.hasBarSubheader(isBarSubheader);
}
function getAssociatedNavBarCtrl() {
if (navBarDelegate) {

View File

@@ -137,6 +137,7 @@ function headerFooterBarDirective(isHeader) {
var isSubheader = value.indexOf('bar-subheader') !== -1;
$scope.$hasHeader = isShown && !isSubheader;
$scope.$hasSubheader = isShown && isSubheader;
$scope.$emit('$ionicSubheader', $scope.$hasSubheader);
});
$scope.$on('$destroy', function() {
delete $scope.$hasHeader;

View File

@@ -264,6 +264,10 @@
.platform-android {
.nav-bar-has-subheader .bar {
border-bottom: 0;
}
.bar {
.back-button .icon:before {