mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
3
js/angular/controller/navBarController.js
vendored
3
js/angular/controller/navBarController.js
vendored
@@ -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) {
|
||||
|
||||
5
js/angular/controller/navViewController.js
vendored
5
js/angular/controller/navViewController.js
vendored
@@ -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) {
|
||||
|
||||
1
js/angular/directive/headerFooterBar.js
vendored
1
js/angular/directive/headerFooterBar.js
vendored
@@ -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;
|
||||
|
||||
@@ -264,6 +264,10 @@
|
||||
|
||||
.platform-android {
|
||||
|
||||
.nav-bar-has-subheader .bar {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.bar {
|
||||
|
||||
.back-button .icon:before {
|
||||
|
||||
Reference in New Issue
Block a user