Updating tests, fixing some old toggle and tab stuff

This commit is contained in:
Max Lynch
2013-10-29 12:04:44 -05:00
parent 4efd10765c
commit 599dd732d4
9 changed files with 4570 additions and 699 deletions

View File

@ -867,7 +867,7 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
this.add = function(controller) {
this.addController(controller);
this.select(0);
this.select(0);
};
this.select = function(controllerIndex) {
@ -982,13 +982,15 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
index: '='
},
link: function(scope, element, attrs, tabsCtrl) {
if(attrs.icon) {
scope.iconOn = scope.iconOff = attrs.icon;
}
scope.selectTab = function(index) {
tabsCtrl.select(scope.index);
};
},
template:
'<a href="#" ng-class="{active:active}" ng-click="selectTab()" class="tab-item">' +
'<i class="{{icon}}" ng-if="icon"></i>' +
'<i class="{{iconOn}}" ng-if="active"></i>' +
'<i class="{{iconOff}}" ng-if="!active"></i> {{title}}' +
'</a>'
@ -1046,7 +1048,7 @@ angular.module('ionic.ui.toggle', [])
if(!ngModel) { return; }
checkbox = $element.children().eq(0);
handle = track.children().eq(0);
handle = $element.children().eq(1);
if(!checkbox.length || !handle.length) { return; }