2
2
* Copyright 2014 Drifty Co.
3
3
* http://drifty.com/
4
4
*
5
- * Ionic, v1.1.0
5
+ * Ionic, v1.1.1
6
6
* A powerful HTML5 mobile app framework.
7
7
* http://ionicframework.com/
8
8
*
14
14
15
15
( function ( ) {
16
16
/* eslint no-unused-vars:0 */
17
- var IonicModule = angular . module ( 'ionic' , [ 'ngAnimate' , 'ngSanitize' , 'ui.router' ] ) ,
17
+ var IonicModule = angular . module ( 'ionic' , [ 'ngAnimate' , 'ngSanitize' , 'ui.router' , 'ngIOS9UIWebViewPatch' ] ) ,
18
18
extend = angular . extend ,
19
19
forEach = angular . forEach ,
20
20
isDefined = angular . isDefined ,
@@ -446,7 +446,7 @@ IonicModule
446
446
return {
447
447
/**
448
448
* @ngdoc method
449
- * @name $ionicBody#add
449
+ * @name $ionicBody#addClass
450
450
* @description Add a class to the document's body element.
451
451
* @param {string } class Each argument will be added to the body element.
452
452
* @returns {$ionicBody } The $ionicBody service so methods can be chained.
@@ -2105,7 +2105,7 @@ IonicModule
2105
2105
// http://blogs.msdn.com/b/msdn_answers/archive/2015/02/10/
2106
2106
// running-cordova-apps-on-windows-and-windows-phone-8-1-using-ionic-angularjs-and-other-frameworks.aspx
2107
2107
. config ( [ '$compileProvider' , function ( $compileProvider ) {
2108
- $compileProvider . aHrefSanitizationWhitelist ( / ^ \s * ( h t t p s ? | t e l | f t p | m a i l t o | f i l e | g h t t p s ? | m s - a p p x | x - w m a p p 0 ) : / ) ;
2108
+ $compileProvider . aHrefSanitizationWhitelist ( / ^ \s * ( h t t p s ? | s m s | t e l | g e o | f t p | m a i l t o | f i l e | g h t t p s ? | m s - a p p x | x - w m a p p 0 ) : / ) ;
2109
2109
$compileProvider . imgSrcSanitizationWhitelist ( / ^ \s * ( h t t p s ? | f t p | f i l e | c o n t e n t | b l o b | m s - a p p x | x - w m a p p 0 ) : | d a t a : i m a g e \/ / ) ;
2110
2110
} ] ) ;
2111
2111
@@ -2530,6 +2530,7 @@ function($rootScope, $ionicBody, $compile, $timeout, $ionicPlatform, $ionicTempl
2530
2530
self . scope . $parent && self . scope . $parent . $broadcast ( self . viewType + '.shown' , self ) ;
2531
2531
self . el . classList . add ( 'active' ) ;
2532
2532
self . scope . $broadcast ( '$ionicHeader.align' ) ;
2533
+ self . scope . $broadcast ( '$ionicFooter.align' ) ;
2533
2534
} , 20 ) ;
2534
2535
2535
2536
return $timeout ( function ( ) {
@@ -3534,7 +3535,7 @@ function($ionicTemplateLoader, $ionicBackdrop, $q, $timeout, $rootScope, $ionicB
3534
3535
} ;
3535
3536
3536
3537
self . remove = function ( ) {
3537
- if ( self . removed || ! $ionicModal . stack . isHighest ( self ) ) return ;
3538
+ if ( self . removed ) return ;
3538
3539
3539
3540
self . hide ( function ( ) {
3540
3541
self . element . remove ( ) ;
@@ -3557,8 +3558,8 @@ function($ionicTemplateLoader, $ionicBackdrop, $q, $timeout, $rootScope, $ionicB
3557
3558
var showDelay = 0 ;
3558
3559
3559
3560
if ( popupStack . length > 0 ) {
3560
- popupStack [ popupStack . length - 1 ] . hide ( ) ;
3561
3561
showDelay = config . stackPushDelay ;
3562
+ $timeout ( popupStack [ popupStack . length - 1 ] . hide , showDelay , false ) ;
3562
3563
} else {
3563
3564
//Add popup-open & backdrop if this is first popup
3564
3565
$ionicBody . addClass ( 'popup-open' ) ;
@@ -3591,6 +3592,8 @@ function($ionicTemplateLoader, $ionicBackdrop, $q, $timeout, $rootScope, $ionicB
3591
3592
popupStack . splice ( index , 1 ) ;
3592
3593
}
3593
3594
3595
+ popup . remove ( ) ;
3596
+
3594
3597
if ( popupStack . length > 0 ) {
3595
3598
popupStack [ popupStack . length - 1 ] . show ( ) ;
3596
3599
} else {
@@ -3606,7 +3609,6 @@ function($ionicTemplateLoader, $ionicBackdrop, $q, $timeout, $rootScope, $ionicB
3606
3609
( $ionicPopup . _backButtonActionDone || noop ) ( ) ;
3607
3610
}
3608
3611
3609
- popup . remove ( ) ;
3610
3612
3611
3613
return result ;
3612
3614
} ) ;
@@ -3907,7 +3909,7 @@ IonicModule
3907
3909
* @name $ionicScrollDelegate#freezeScroll
3908
3910
* @description Does not allow this scroll view to scroll either x or y.
3909
3911
* @param {boolean= } shouldFreeze Should this scroll view be prevented from scrolling or not.
3910
- * @returns {object } If the scroll view is being prevented from scrolling or not.
3912
+ * @returns {boolean } If the scroll view is being prevented from scrolling or not.
3911
3913
*/
3912
3914
'freezeScroll' ,
3913
3915
/**
@@ -4951,6 +4953,82 @@ function($timeout, $document, $q, $ionicClickBlock, $ionicConfig, $ionicNavBarDe
4951
4953
4952
4954
} ] ) ;
4953
4955
4956
+ /**
4957
+ * ================== angular-ios9-uiwebview.patch.js v1.1.1 ==================
4958
+ *
4959
+ * This patch works around iOS9 UIWebView regression that causes infinite digest
4960
+ * errors in Angular.
4961
+ *
4962
+ * The patch can be applied to Angular 1.2.0 – 1.4.5. Newer versions of Angular
4963
+ * have the workaround baked in.
4964
+ *
4965
+ * To apply this patch load/bundle this file with your application and add a
4966
+ * dependency on the "ngIOS9UIWebViewPatch" module to your main app module.
4967
+ *
4968
+ * For example:
4969
+ *
4970
+ * ```
4971
+ * angular.module('myApp', ['ngRoute'])`
4972
+ * ```
4973
+ *
4974
+ * becomes
4975
+ *
4976
+ * ```
4977
+ * angular.module('myApp', ['ngRoute', 'ngIOS9UIWebViewPatch'])
4978
+ * ```
4979
+ *
4980
+ *
4981
+ * More info:
4982
+ * - https://openradar.appspot.com/22186109
4983
+ * - https://github.com/angular/angular.js/issues/12241
4984
+ * - https://github.com/driftyco/ionic/issues/4082
4985
+ *
4986
+ *
4987
+ * @license AngularJS
4988
+ * (c) 2010-2015 Google, Inc. http://angularjs.org
4989
+ * License: MIT
4990
+ */
4991
+
4992
+ angular . module ( 'ngIOS9UIWebViewPatch' , [ 'ng' ] ) . config ( [ '$provide' , function ( $provide ) {
4993
+ 'use strict' ;
4994
+
4995
+ $provide . decorator ( '$browser' , [ '$delegate' , '$window' , function ( $delegate , $window ) {
4996
+
4997
+ if ( isIOS9UIWebView ( $window . navigator . userAgent ) ) {
4998
+ return applyIOS9Shim ( $delegate ) ;
4999
+ }
5000
+
5001
+ return $delegate ;
5002
+
5003
+ function isIOS9UIWebView ( userAgent ) {
5004
+ return / ( i P h o n e | i P a d | i P o d ) .* O S 9 _ \d / . test ( userAgent ) && ! / V e r s i o n \/ 9 \. / . test ( userAgent ) ;
5005
+ }
5006
+
5007
+ function applyIOS9Shim ( browser ) {
5008
+ var pendingLocationUrl = null ;
5009
+ var originalUrlFn = browser . url ;
5010
+
5011
+ browser . url = function ( ) {
5012
+ if ( arguments . length ) {
5013
+ pendingLocationUrl = arguments [ 0 ] ;
5014
+ return originalUrlFn . apply ( browser , arguments ) ;
5015
+ }
5016
+
5017
+ return pendingLocationUrl || originalUrlFn . apply ( browser , arguments ) ;
5018
+ } ;
5019
+
5020
+ window . addEventListener ( 'popstate' , clearPendingLocationUrl , false ) ;
5021
+ window . addEventListener ( 'hashchange' , clearPendingLocationUrl , false ) ;
5022
+
5023
+ function clearPendingLocationUrl ( ) {
5024
+ pendingLocationUrl = null ;
5025
+ }
5026
+
5027
+ return browser ;
5028
+ }
5029
+ } ] ) ;
5030
+ } ] ) ;
5031
+
4954
5032
/**
4955
5033
* @private
4956
5034
* Parts of Ionic requires that $scope data is attached to the element.
@@ -6396,6 +6474,9 @@ function($scope, $element, $attrs, $compile, $controller, $ionicNavBarDelegate,
6396
6474
if ( viewLocals && viewLocals . $$controller ) {
6397
6475
viewLocals . $scope = viewScope ;
6398
6476
var controller = $controller ( viewLocals . $$controller , viewLocals ) ;
6477
+ if ( viewLocals . $$controllerAs ) {
6478
+ viewScope [ viewLocals . $$controllerAs ] = controller ;
6479
+ }
6399
6480
$element . children ( ) . data ( '$ngControllerController' , controller ) ;
6400
6481
}
6401
6482
@@ -8458,7 +8539,7 @@ IonicModule
8458
8539
* <ion-scroll direction="x" class="available-scroller">
8459
8540
* <div class="photo" collection-repeat="photo in main.photos"
8460
8541
* item-height="250" item-width="photo.width + 30">
8461
- * <img ng-src="{{ photo.src}}">
8542
+ * <img ng-src="{% raw %}{{ photo.src}}{% endraw % }">
8462
8543
* </div>
8463
8544
* </ion-scroll>
8464
8545
* </ion-content>
@@ -10124,6 +10205,12 @@ function headerFooterBarDirective(isHeader) {
10124
10205
$scope . $watch ( '$hasTabs' , function ( val ) {
10125
10206
$element . toggleClass ( 'has-tabs' , ! ! val ) ;
10126
10207
} ) ;
10208
+ ctrl . align ( ) ;
10209
+ $scope . $on ( '$ionicFooter.align' , function ( ) {
10210
+ ionic . requestAnimationFrame ( function ( ) {
10211
+ ctrl . align ( ) ;
10212
+ } ) ;
10213
+ } ) ;
10127
10214
}
10128
10215
}
10129
10216
}
@@ -10449,7 +10536,7 @@ var ITEM_TPL_OPTION_BUTTONS =
10449
10536
* @description
10450
10537
* Creates an option button inside a list item, that is visible when the item is swiped
10451
10538
* to the left by the user. Swiped open option buttons can be hidden with
10452
- * {@link ionic.service:$ionicListDelegate#closeOptionButtons $ionicListDelegate# closeOptionButtons}.
10539
+ * {@link ionic.service:$ionicListDelegate#closeOptionButtons $ionicListDelegate. closeOptionButtons}.
10453
10540
*
10454
10541
* Can be assigned any button class.
10455
10542
*
@@ -11766,13 +11853,16 @@ IonicModule
11766
11853
template :
11767
11854
'<label class="item item-radio">' +
11768
11855
'<input type="radio" name="radio-group">' +
11769
- '<div class="item-content disable-pointer-events" ng-transclude></div>' +
11770
- '<i class="radio-icon disable-pointer-events icon ion-checkmark"></i>' +
11856
+ '<div class="radio-content">' +
11857
+ '<div class="item-content disable-pointer-events" ng-transclude></div>' +
11858
+ '<i class="radio-icon disable-pointer-events icon ion-checkmark"></i>' +
11859
+ '</div>' +
11771
11860
'</label>' ,
11772
11861
11773
11862
compile : function ( element , attr ) {
11774
11863
if ( attr . icon ) {
11775
- element . children ( ) . eq ( 2 ) . removeClass ( 'ion-checkmark' ) . addClass ( attr . icon ) ;
11864
+ var iconElm = element . find ( 'i' ) ;
11865
+ iconElm . removeClass ( 'ion-checkmark' ) . addClass ( attr . icon ) ;
11776
11866
}
11777
11867
11778
11868
var input = element . find ( 'input' ) ;
0 commit comments