Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Commit f3981d3

Browse files
author
Adam Bradley
committed
update to v0.9.23-alpha
1 parent 1e1d905 commit f3981d3

File tree

6 files changed

+155
-67
lines changed

6 files changed

+155
-67
lines changed

www/lib/css/ionic.css

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright 2014 Drifty Co.
33
* http://drifty.com/
44
*
5-
* Ionic, v0.9.22
5+
* Ionic, v0.9.23-alpha
66
* A powerful HTML5 mobile app framework.
77
* http://ionicframework.com/
88
*
@@ -3574,7 +3574,7 @@ a.subdued {
35743574
font-size: 12px;
35753575
line-height: 14px; }
35763576

3577-
.tab-item .icon:before {
3577+
.tab-item .icon {
35783578
display: block;
35793579
margin: 0 auto;
35803580
height: 32px;
@@ -3583,20 +3583,22 @@ a.subdued {
35833583
.tabs-icon-left .tab-item,
35843584
.tabs-icon-right .tab-item {
35853585
font-size: 12px; }
3586-
.tabs-icon-left .tab-item .icon:before,
3587-
.tabs-icon-right .tab-item .icon:before {
3586+
.tabs-icon-left .tab-item .icon,
3587+
.tabs-icon-right .tab-item .icon {
35883588
display: inline-block;
3589-
vertical-align: top;
3590-
font-size: 24px;
3591-
line-height: 49px; }
3589+
vertical-align: top; }
3590+
.tabs-icon-left .tab-item .icon:before,
3591+
.tabs-icon-right .tab-item .icon:before {
3592+
font-size: 24px;
3593+
line-height: 49px; }
35923594

3593-
.tabs-icon-left .tab-item .icon:before {
3595+
.tabs-icon-left .tab-item .icon {
35943596
padding-right: 3px; }
35953597

3596-
.tabs-icon-right .tab-item .icon:before {
3598+
.tabs-icon-right .tab-item .icon {
35973599
padding-left: 3px; }
35983600

3599-
.tabs-icon-only .icon:before {
3601+
.tabs-icon-only .icon {
36003602
line-height: inherit; }
36013603

36023604
/* Navigational tab */

www/lib/css/ionic.min.css

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

www/lib/js/ionic-angular.js

Lines changed: 39 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright 2014 Drifty Co.
33
* http://drifty.com/
44
*
5-
* Ionic, v0.9.22
5+
* Ionic, v0.9.23-alpha
66
* A powerful HTML5 mobile app framework.
77
* http://ionicframework.com/
88
*
@@ -469,8 +469,7 @@ angular.module('ionic.service.modal', ['ionic.service.templateLoad', 'ionic.serv
469469
};
470470
}]);
471471
;
472-
(function() {
473-
'use strict';
472+
(function(ionic) {'use strict';
474473

475474
angular.module('ionic.service.platform', [])
476475

@@ -484,18 +483,15 @@ angular.module('ionic.service.platform', [])
484483
.provider('$ionicPlatform', function() {
485484

486485
return {
487-
setPlatform: function(p) {
488-
platform = p;
489-
},
490-
$get: ['$q', '$timeout', function($q, $timeout) {
486+
$get: ['$q', function($q) {
491487
return {
492488
/**
493489
* Some platforms have hardware back buttons, so this is one way to bind to it.
494490
*
495491
* @param {function} cb the callback to trigger when this event occurs
496492
*/
497493
onHardwareBackButton: function(cb) {
498-
this.ready(function() {
494+
ionic.Platform.ready(function() {
499495
document.addEventListener('backbutton', cb, false);
500496
});
501497
},
@@ -506,7 +502,7 @@ angular.module('ionic.service.platform', [])
506502
* @param {function} fn the listener function that was originally bound.
507503
*/
508504
offHardwareBackButton: function(fn) {
509-
this.ready(function() {
505+
ionic.Platform.ready(function() {
510506
document.removeEventListener('backbutton', fn);
511507
});
512508
},
@@ -520,17 +516,12 @@ angular.module('ionic.service.platform', [])
520516
* ready.
521517
*/
522518
ready: function(cb) {
523-
var self = this;
524519
var q = $q.defer();
525520

526-
$timeout(function readyWait() {
527-
if(ionic.Platform.isReady) {
528-
q.resolve();
529-
cb();
530-
} else {
531-
$timeout(readyWait, 50);
532-
}
533-
}, 50);
521+
ionic.Platform.ready(function(){
522+
q.resolve();
523+
cb();
524+
});
534525

535526
return q.promise;
536527
}
@@ -622,11 +613,11 @@ angular.module('ionic.service.templateLoad', [])
622613
};
623614
}]);
624615
;
625-
angular.module('ionic.service.view', ['ui.router'])
616+
angular.module('ionic.service.view', ['ui.router', 'ionic.service.platform'])
626617

627618

628-
.run( ['$rootScope', '$state', '$location', '$document', '$animate',
629-
function( $rootScope, $state, $location, $document, $animate) {
619+
.run( ['$rootScope', '$state', '$location', '$document', '$animate', '$ionicPlatform',
620+
function( $rootScope, $state, $location, $document, $animate, $ionicPlatform) {
630621

631622
// init the variables that keep track of the view history
632623
$rootScope.$viewHistory = {
@@ -673,6 +664,21 @@ angular.module('ionic.service.view', ['ui.router'])
673664
}
674665
});
675666

667+
// Triggered when devices with a hardware back button (Android) is clicked by the user
668+
// This is a Cordova/Phonegap platform specifc method
669+
function onHardwareBackButton(e) {
670+
if($rootScope.$viewHistory.backView) {
671+
// there is a back view, go to it
672+
$rootScope.$viewHistory.backView.go();
673+
} else {
674+
// there is no back view, so close the app instead
675+
ionic.Platform.exitApp();
676+
}
677+
e.preventDefault();
678+
return false;
679+
}
680+
$ionicPlatform.onHardwareBackButton(onHardwareBackButton);
681+
676682
}])
677683

678684
.factory('$ionicViewService', ['$rootScope', '$state', '$location', '$window', '$injector',
@@ -1293,7 +1299,7 @@ angular.module('ionic.ui.content', ['ionic.ui.service'])
12931299

12941300
// The content directive is a core scrollable content area
12951301
// that is part of many View hierarchies
1296-
.directive('content', ['$parse', '$timeout', '$ionicPlatform', '$ionicScrollDelegate', function($parse, $timeout, $ionicPlatform, $ionicScrollDelegate) {
1302+
.directive('content', ['$parse', '$timeout', '$ionicScrollDelegate', function($parse, $timeout, $ionicScrollDelegate) {
12971303
return {
12981304
restrict: 'E',
12991305
replace: true,
@@ -1358,7 +1364,7 @@ angular.module('ionic.ui.content', ['ionic.ui.service'])
13581364

13591365
// Otherwise, supercharge this baby!
13601366
var hasBouncing = $scope.$eval($scope.hasBouncing);
1361-
var enableBouncing = (!$ionicPlatform.is('Android') && hasBouncing !== false) || hasBouncing === true;
1367+
var enableBouncing = (!ionic.Platform.isAndroid() && hasBouncing !== false) || hasBouncing === true;
13621368
// No bouncing by default for Android users, lest they take up pitchforks
13631369
// to our bouncing goodness
13641370
sv = new ionic.views.Scroll({
@@ -2756,6 +2762,10 @@ angular.module('ionic.ui.viewState', ['ionic.service.view', 'ionic.service.gestu
27562762
updateHeaderData(data);
27572763
});
27582764

2765+
$rootScope.$on('viewState.titleUpdated', function(e, data) {
2766+
$scope.currentTitle = (data && data.title ? data.title : '');
2767+
});
2768+
27592769
// If a nav page changes the left or right buttons, update our scope vars
27602770
$scope.$parent.$on('viewState.leftButtonsChanged', function(e, data) {
27612771
$scope.leftButtons = data;
@@ -2817,10 +2827,16 @@ angular.module('ionic.ui.viewState', ['ionic.service.view', 'ionic.service.gestu
28172827
$scope.$emit('viewState.rightButtonsChanged', $scope.rightButtons);
28182828
});
28192829

2830+
// watch for changes in the title
2831+
var deregTitle = $scope.$watch('title', function(val) {
2832+
$scope.$emit('viewState.titleUpdated', $scope);
2833+
});
2834+
28202835
$scope.$on('$destroy', function(){
28212836
// deregister on destroy
28222837
deregLeftButtons();
28232838
deregRightButtons();
2839+
deregTitle();
28242840
});
28252841

28262842
};

www/lib/js/ionic-angular.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.

0 commit comments

Comments
 (0)