Skip to content

Commit 62698fd

Browse files
committed
Revert "Added support for badges in TabBar icons."
This reverts commit 1bd89a8.
1 parent 1bd89a8 commit 62698fd

File tree

9 files changed

+10
-97
lines changed

9 files changed

+10
-97
lines changed

dist/css/ionic.css

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3489,81 +3489,51 @@ a.subdued {
34893489
border-top-width: 1px;
34903490
background-size: 0;
34913491
line-height: 49px; }
3492-
.tabs .tab-item .icon.badge {
3493-
background-color: #444444;
3494-
color: #f8f8f8; }
34953492
.tabs.tabs-light {
34963493
background-color: white;
34973494
background-image: linear-gradient(0deg, #dddddd, #dddddd 50%, transparent 50%);
34983495
border-color: #dddddd;
34993496
color: #444444; }
3500-
.tabs.tabs-light .tab-item .icon.badge {
3501-
background-color: #444444;
3502-
color: white; }
35033497
.tabs.tabs-stable {
35043498
background-color: #f8f8f8;
35053499
background-image: linear-gradient(0deg, #b2b2b2, #b2b2b2 50%, transparent 50%);
35063500
border-color: #b2b2b2;
35073501
color: #444444; }
3508-
.tabs.tabs-stable .tab-item .icon.badge {
3509-
background-color: #444444;
3510-
color: #f8f8f8; }
35113502
.tabs.tabs-positive {
35123503
background-color: #4a87ee;
35133504
background-image: linear-gradient(0deg, #145dd7, #145dd7 50%, transparent 50%);
35143505
border-color: #145dd7;
35153506
color: white; }
3516-
.tabs.tabs-positive .tab-item .icon.badge {
3517-
background-color: white;
3518-
color: #4a87ee; }
35193507
.tabs.tabs-calm {
35203508
background-color: #43cee6;
35213509
background-image: linear-gradient(0deg, #1aaac3, #1aaac3 50%, transparent 50%);
35223510
border-color: #1aaac3;
35233511
color: white; }
3524-
.tabs.tabs-calm .tab-item .icon.badge {
3525-
background-color: white;
3526-
color: #43cee6; }
35273512
.tabs.tabs-assertive {
35283513
background-color: #ef4e3a;
35293514
background-image: linear-gradient(0deg, #cc2511, #cc2511 50%, transparent 50%);
35303515
border-color: #cc2511;
35313516
color: white; }
3532-
.tabs.tabs-assertive .tab-item .icon.badge {
3533-
background-color: white;
3534-
color: #ef4e3a; }
35353517
.tabs.tabs-balanced {
35363518
background-color: #66cc33;
35373519
background-image: linear-gradient(0deg, #478f24, #478f24 50%, transparent 50%);
35383520
border-color: #478f24;
35393521
color: white; }
3540-
.tabs.tabs-balanced .tab-item .icon.badge {
3541-
background-color: white;
3542-
color: #66cc33; }
35433522
.tabs.tabs-energized {
35443523
background-color: #f0b840;
35453524
background-image: linear-gradient(0deg, #d39511, #d39511 50%, transparent 50%);
35463525
border-color: #d39511;
35473526
color: white; }
3548-
.tabs.tabs-energized .tab-item .icon.badge {
3549-
background-color: white;
3550-
color: #f0b840; }
35513527
.tabs.tabs-royal {
35523528
background-color: #8a6de9;
35533529
background-image: linear-gradient(0deg, #552bdf, #552bdf 50%, transparent 50%);
35543530
border-color: #552bdf;
35553531
color: white; }
3556-
.tabs.tabs-royal .tab-item .icon.badge {
3557-
background-color: white;
3558-
color: #8a6de9; }
35593532
.tabs.tabs-dark {
35603533
background-color: #444444;
35613534
background-image: linear-gradient(0deg, #111111, #111111 50%, transparent 50%);
35623535
border-color: #111111;
35633536
color: white; }
3564-
.tabs.tabs-dark .tab-item .icon.badge {
3565-
background-color: white;
3566-
color: #444444; }
35673537
@media (min--moz-device-pixel-ratio: 1.5), (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 144dpi), (min-resolution: 1.5dppx) {
35683538
.tabs {
35693539
padding-top: 2px;
@@ -3630,16 +3600,6 @@ a.subdued {
36303600
.tabs-icon-only .icon:before {
36313601
line-height: inherit; }
36323602

3633-
.tab-item.has-badge {
3634-
position: relative; }
3635-
3636-
.tab-item .icon.badge {
3637-
position: absolute;
3638-
padding: 2px 6px;
3639-
top: 2%;
3640-
right: 10%;
3641-
font-size: 12px; }
3642-
36433603
/* Navigational tab */
36443604
/* Active state for tab */
36453605
.tab-item.active,

dist/css/ionic.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/ionic-angular.js

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2360,7 +2360,6 @@ angular.module('ionic.ui.tabs', ['ionic.service.view'])
23602360
$scope.icon = $attr.icon;
23612361
$scope.iconOn = $attr.iconOn;
23622362
$scope.iconOff = $attr.iconOff;
2363-
$scope.badge = $attr.badge;
23642363
$scope.viewSref = $attr.uiSref;
23652364
$scope.url = $attr.href;
23662365
if($scope.url && $scope.url.indexOf('#') === 0) {
@@ -2450,7 +2449,7 @@ angular.module('ionic.ui.tabs', ['ionic.service.view'])
24502449
replace: true,
24512450
scope: true,
24522451
template: '<div class="tabs">' +
2453-
'<tab-controller-item icon-title="{{c.title}}" icon="{{c.icon}}" icon-on="{{c.iconOn}}" icon-off="{{c.iconOff}}" badge="{{c.badge}}" active="c.isVisible" index="$index" ng-repeat="c in controllers"></tab-controller-item>' +
2452+
'<tab-controller-item icon-title="{{c.title}}" icon="{{c.icon}}" icon-on="{{c.iconOn}}" icon-off="{{c.iconOff}}" active="c.isVisible" index="$index" ng-repeat="c in controllers"></tab-controller-item>' +
24542453
'</div>',
24552454
link: function($scope, $element, $attr, tabsCtrl) {
24562455
$element.addClass($scope.tabsType);
@@ -2469,7 +2468,6 @@ angular.module('ionic.ui.tabs', ['ionic.service.view'])
24692468
icon: '@',
24702469
iconOn: '@',
24712470
iconOff: '@',
2472-
badge: '@',
24732471
active: '=',
24742472
tabSelected: '@',
24752473
index: '='
@@ -2484,8 +2482,7 @@ angular.module('ionic.ui.tabs', ['ionic.service.view'])
24842482
};
24852483
},
24862484
template:
2487-
'<a ng-class="{active:active, \'has-badge\':badge}" ng-click="selectTab()" class="tab-item">' +
2488-
'<i class="icon badge" ng-if="badge">{{badge}}</i>' +
2485+
'<a ng-class="{active:active}" ng-click="selectTab()" class="tab-item">' +
24892486
'<i class="icon {{icon}}" ng-if="icon"></i>' +
24902487
'<i class="{{iconOn}}" ng-if="active"></i>' +
24912488
'<i class="{{iconOff}}" ng-if="!active"></i> {{iconTitle}}' +
@@ -2759,10 +2756,6 @@ angular.module('ionic.ui.viewState', ['ionic.service.view', 'ionic.service.gestu
27592756
updateHeaderData(data);
27602757
});
27612758

2762-
$rootScope.$on('viewState.titleUpdated', function(e, data) {
2763-
$scope.currentTitle = (data && data.title ? data.title : '');
2764-
});
2765-
27662759
// If a nav page changes the left or right buttons, update our scope vars
27672760
$scope.$parent.$on('viewState.leftButtonsChanged', function(e, data) {
27682761
$scope.leftButtons = data;
@@ -2824,16 +2817,10 @@ angular.module('ionic.ui.viewState', ['ionic.service.view', 'ionic.service.gestu
28242817
$scope.$emit('viewState.rightButtonsChanged', $scope.rightButtons);
28252818
});
28262819

2827-
// watch for changes in the title
2828-
var deregTitle = $scope.$watch('title', function(val) {
2829-
$scope.$emit('viewState.titleUpdated', $scope);
2830-
});
2831-
28322820
$scope.$on('$destroy', function(){
28332821
// deregister on destroy
28342822
deregLeftButtons();
28352823
deregRightButtons();
2836-
deregTitle();
28372824
});
28382825

28392826
};

dist/js/ionic-angular.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/ionic.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/ext/angular/src/directive/ionicTabBar.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ angular.module('ionic.ui.tabs', ['ionic.service.view'])
147147
$scope.icon = $attr.icon;
148148
$scope.iconOn = $attr.iconOn;
149149
$scope.iconOff = $attr.iconOff;
150-
$scope.badge = $attr.badge;
151150
$scope.viewSref = $attr.uiSref;
152151
$scope.url = $attr.href;
153152
if($scope.url && $scope.url.indexOf('#') === 0) {
@@ -237,7 +236,7 @@ angular.module('ionic.ui.tabs', ['ionic.service.view'])
237236
replace: true,
238237
scope: true,
239238
template: '<div class="tabs">' +
240-
'<tab-controller-item icon-title="{{c.title}}" icon="{{c.icon}}" icon-on="{{c.iconOn}}" icon-off="{{c.iconOff}}" badge="{{c.badge}}" active="c.isVisible" index="$index" ng-repeat="c in controllers"></tab-controller-item>' +
239+
'<tab-controller-item icon-title="{{c.title}}" icon="{{c.icon}}" icon-on="{{c.iconOn}}" icon-off="{{c.iconOff}}" active="c.isVisible" index="$index" ng-repeat="c in controllers"></tab-controller-item>' +
241240
'</div>',
242241
link: function($scope, $element, $attr, tabsCtrl) {
243242
$element.addClass($scope.tabsType);
@@ -256,7 +255,6 @@ angular.module('ionic.ui.tabs', ['ionic.service.view'])
256255
icon: '@',
257256
iconOn: '@',
258257
iconOff: '@',
259-
badge: '@',
260258
active: '=',
261259
tabSelected: '@',
262260
index: '='
@@ -271,8 +269,7 @@ angular.module('ionic.ui.tabs', ['ionic.service.view'])
271269
};
272270
},
273271
template:
274-
'<a ng-class="{active:active, \'has-badge\':badge}" ng-click="selectTab()" class="tab-item">' +
275-
'<i class="icon badge" ng-if="badge">{{badge}}</i>' +
272+
'<a ng-class="{active:active}" ng-click="selectTab()" class="tab-item">' +
276273
'<i class="icon {{icon}}" ng-if="icon"></i>' +
277274
'<i class="{{iconOn}}" ng-if="active"></i>' +
278275
'<i class="{{iconOff}}" ng-if="!active"></i> {{iconTitle}}' +

scss/_mixins.scss

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,6 @@
7979
color: $color;
8080
}
8181

82-
@mixin tab-badge-style($bg-color, $color) {
83-
.tab-item .icon.badge {
84-
background-color: $bg-color;
85-
color: $color;
86-
}
87-
}
8882

8983
// Item Mixins
9084
// --------------------------------------------------

scss/_tabs.scss

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
@include justify-content(center);
1212

1313
@include tab-style($tabs-default-bg, $tabs-default-border, $tabs-default-text);
14-
@include tab-badge-style($tabs-default-text, $tabs-default-bg);
1514

1615
position: absolute;
1716
bottom: 0;
@@ -29,39 +28,30 @@
2928

3029
&.tabs-light {
3130
@include tab-style($tabs-light-bg, $tabs-light-border, $tabs-light-text);
32-
@include tab-badge-style($tabs-light-text, $tabs-light-bg);
3331
}
3432
&.tabs-stable {
3533
@include tab-style($tabs-stable-bg, $tabs-stable-border, $tabs-stable-text);
36-
@include tab-badge-style($tabs-stable-text, $tabs-stable-bg);
3734
}
3835
&.tabs-positive {
3936
@include tab-style($tabs-positive-bg, $tabs-positive-border, $tabs-positive-text);
40-
@include tab-badge-style($tabs-positive-text, $tabs-positive-bg);
4137
}
4238
&.tabs-calm {
4339
@include tab-style($tabs-calm-bg, $tabs-calm-border, $tabs-calm-text);
44-
@include tab-badge-style($tabs-calm-text, $tabs-calm-bg);
4540
}
4641
&.tabs-assertive {
4742
@include tab-style($tabs-assertive-bg, $tabs-assertive-border, $tabs-assertive-text);
48-
@include tab-badge-style($tabs-assertive-text, $tabs-assertive-bg);
4943
}
5044
&.tabs-balanced {
5145
@include tab-style($tabs-balanced-bg, $tabs-balanced-border, $tabs-balanced-text);
52-
@include tab-badge-style($tabs-balanced-text, $tabs-balanced-bg);
5346
}
5447
&.tabs-energized {
5548
@include tab-style($tabs-energized-bg, $tabs-energized-border, $tabs-energized-text);
56-
@include tab-badge-style($tabs-energized-text, $tabs-energized-bg);
5749
}
5850
&.tabs-royal {
5951
@include tab-style($tabs-royal-bg, $tabs-royal-border, $tabs-royal-text);
60-
@include tab-badge-style($tabs-royal-text, $tabs-royal-bg);
6152
}
6253
&.tabs-dark {
6354
@include tab-style($tabs-dark-bg, $tabs-dark-border, $tabs-dark-text);
64-
@include tab-badge-style($tabs-dark-text, $tabs-dark-bg);
6555
}
6656
@media (min--moz-device-pixel-ratio: 1.5),
6757
(-webkit-min-device-pixel-ratio: 1.5),
@@ -142,18 +132,6 @@
142132
line-height: inherit;
143133
}
144134

145-
.tab-item.has-badge {
146-
position: relative;
147-
}
148-
149-
.tab-item .icon.badge {
150-
position: absolute;
151-
padding: $tabs-badge-padding;
152-
top: 2%;
153-
right: 10%;
154-
font-size: $tabs-badge-font-size;
155-
}
156-
157135
/* Navigational tab */
158136

159137
/* Active state for tab */

scss/_variables.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,6 @@ $tabs-height: 49px !default;
231231
$tabs-text-font-size: 14px !default;
232232
$tabs-text-font-size-side-icon: 12px !default;
233233
$tabs-icon-size: 32px !default;
234-
$tabs-badge-padding: 2px 6px;
235-
$tabs-badge-font-size: 12px !default;
236-
$tabs-text-font-size: 14px !default;
237234

238235
$tabs-light-bg: $button-light-bg;
239236
$tabs-light-border: $button-light-border;

0 commit comments

Comments
 (0)