2
2
* Copyright 2014 Drifty Co.
3
3
* http://drifty.com/
4
4
*
5
- * Ionic, v1.0.0-rc.5
5
+ * Ionic, v1.0.0
6
6
* A powerful HTML5 mobile app framework.
7
7
* http://ionicframework.com/
8
8
*
@@ -1537,6 +1537,15 @@ function($rootScope, $state, $location, $document, $ionicPlatform, $ionicHistory
1537
1537
* @returns {boolean }
1538
1538
*/
1539
1539
1540
+ /**
1541
+ * @ngdoc method
1542
+ * @name $ionicConfigProvider#scrolling.jsScrolling
1543
+ * @description Whether to use JS or Native scrolling. Defaults to JS scrolling. Setting this to
1544
+ * `false` has the same effect as setting each `ion-content` to have `overflow-scroll='true'`.
1545
+ * @param {boolean } value Defaults to `true`
1546
+ * @returns {boolean }
1547
+ */
1548
+
1540
1549
/**
1541
1550
* @ngdoc method
1542
1551
* @name $ionicConfigProvider#backButton.icon
@@ -1795,9 +1804,9 @@ IonicModule
1795
1804
// Windows Phone
1796
1805
// -------------------------
1797
1806
setPlatformConfig ( 'windowsphone' , {
1798
- scrolling : {
1799
- jsScrolling : false
1800
- }
1807
+ // scrolling: {
1808
+ // jsScrolling: false
1809
+ // }
1801
1810
} ) ;
1802
1811
1803
1812
@@ -2068,8 +2077,8 @@ IonicModule
2068
2077
// http://blogs.msdn.com/b/msdn_answers/archive/2015/02/10/
2069
2078
// running-cordova-apps-on-windows-and-windows-phone-8-1-using-ionic-angularjs-and-other-frameworks.aspx
2070
2079
. config ( [ '$compileProvider' , function ( $compileProvider ) {
2071
- $compileProvider . aHrefSanitizationWhitelist ( / ^ \s * ( h t t p s ? | 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 ) : / ) ;
2072
- $compileProvider . imgSrcSanitizationWhitelist ( / ^ \s * ( h t t p s ? | f t p | f i l e | m s - a p p x | x - w m a p p 0 ) : | d a t a : i m a g e \/ / ) ;
2080
+ $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 ) : / ) ;
2081
+ $compileProvider . imgSrcSanitizationWhitelist ( / ^ \s * ( h t t p s ? | t e l | f t p | f i l e | 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 \/ / ) ;
2073
2082
} ] ) ;
2074
2083
2075
2084
@@ -5354,7 +5363,8 @@ function($scope, $attrs, $element, $timeout) {
5354
5363
$timeout ( function ( ) {
5355
5364
if ( self . jsScrolling ) self . scrollView . resize ( ) ;
5356
5365
// only check bounds again immediately if the page isn't cached (scroll el has height)
5357
- if ( self . scrollView . __container && self . scrollView . __container . offsetHeight > 0 ) {
5366
+ if ( ( self . jsScrolling && self . scrollView . __container && self . scrollView . __container . offsetHeight > 0 ) ||
5367
+ ! self . jsScrolling ) {
5358
5368
self . checkBounds ( ) ;
5359
5369
}
5360
5370
} , 30 , false ) ;
@@ -7042,12 +7052,11 @@ function($scope,
7042
7052
return ;
7043
7053
}
7044
7054
var curElm = elm ;
7045
- var scrollLeft = 0 , scrollTop = 0 , levelsClimbed = 0 ;
7055
+ var scrollLeft = 0 , scrollTop = 0 ;
7046
7056
do {
7047
7057
if ( curElm !== null ) scrollLeft += curElm . offsetLeft ;
7048
7058
if ( curElm !== null ) scrollTop += curElm . offsetTop ;
7049
7059
curElm = curElm . offsetParent ;
7050
- levelsClimbed ++ ;
7051
7060
} while ( curElm . attributes != self . element . attributes && curElm . offsetParent ) ;
7052
7061
scrollView . scrollTo ( scrollLeft , scrollTop , ! ! shouldAnimate ) ;
7053
7062
} ) ;
@@ -8023,7 +8032,7 @@ function($scope, $element, $ionicHistory) {
8023
8032
self . deselect ( tab ) ;
8024
8033
//Try to select a new tab if we're removing a tab
8025
8034
if ( self . tabs . length === 1 ) {
8026
- //do nothing if there are no other tabs to select
8035
+ //Do nothing if there are no other tabs to select
8027
8036
} else {
8028
8037
//Select previous tab if it's the last tab, else select next tab
8029
8038
var newTabIndex = tabIndex === self . tabs . length - 1 ? tabIndex - 1 : tabIndex + 1 ;
@@ -8323,7 +8332,9 @@ IonicModule
8323
8332
'ng-disabled' : attr . ngDisabled ,
8324
8333
'ng-true-value' : attr . ngTrueValue ,
8325
8334
'ng-false-value' : attr . ngFalseValue ,
8326
- 'ng-change' : attr . ngChange
8335
+ 'ng-change' : attr . ngChange ,
8336
+ 'ng-required' : attr . ngRequired ,
8337
+ 'required' : attr . required
8327
8338
} , function ( value , name ) {
8328
8339
if ( isDefined ( value ) ) {
8329
8340
input . attr ( name , value ) ;
@@ -9350,7 +9361,7 @@ function RepeatManagerFactory($rootScope, $window, $$rAF) {
9350
9361
* directive.
9351
9362
*
9352
9363
* If there is any dynamic content inside the ion-content, be sure to call `.resize()` with {@link ionic.service:$ionicScrollDelegate}
9353
- * after the content as been added.
9364
+ * after the content has been added.
9354
9365
*
9355
9366
* Be aware that this directive gets its own child scope. If you do not understand why this
9356
9367
* is important, you can read [https://docs.angularjs.org/guide/scope](https://docs.angularjs.org/guide/scope).
@@ -9363,7 +9374,7 @@ function RepeatManagerFactory($rootScope, $window, $$rAF) {
9363
9374
* of the content. Defaults to true on iOS, false on Android.
9364
9375
* @param {boolean= } scroll Whether to allow scrolling of content. Defaults to true.
9365
9376
* @param {boolean= } overflow-scroll Whether to use overflow-scrolling instead of
9366
- * Ionic scroll.
9377
+ * Ionic scroll. See { @link ionic.provider:$ionicConfigProvider} to set this as the global default.
9367
9378
* @param {boolean= } scrollbar-x Whether to show the horizontal scrollbar. Default true.
9368
9379
* @param {boolean= } scrollbar-y Whether to show the vertical scrollbar. Default true.
9369
9380
* @param {string= } start-x Initial horizontal scroll position. Default 0.
@@ -9402,6 +9413,13 @@ function($timeout, $controller, $ionicBind, $ionicConfig) {
9402
9413
element . addClass ( 'scroll-content-false' ) ;
9403
9414
}
9404
9415
9416
+ var nativeScrolling = attr . overflowScroll === "true" || ! $ionicConfig . scrolling . jsScrolling ( ) ;
9417
+
9418
+ // collection-repeat requires JS scrolling
9419
+ if ( nativeScrolling ) {
9420
+ nativeScrolling = ! element [ 0 ] . querySelector ( '[collection-repeat]' ) ;
9421
+ }
9422
+
9405
9423
return { pre : prelink } ;
9406
9424
function prelink ( $scope , $element , $attr ) {
9407
9425
var parentScope = $scope . $parent ;
@@ -9447,7 +9465,8 @@ function($timeout, $controller, $ionicBind, $ionicConfig) {
9447
9465
} else {
9448
9466
var scrollViewOptions = { } ;
9449
9467
9450
- if ( attr . overflowScroll === "true" || ! $ionicConfig . scrolling . jsScrolling ( ) ) {
9468
+ // determined in compile phase above
9469
+ if ( nativeScrolling ) {
9451
9470
// use native scrolling
9452
9471
$element . addClass ( 'overflow-scroll' ) ;
9453
9472
@@ -11655,7 +11674,9 @@ IonicModule
11655
11674
'ng-value' : attr . ngValue ,
11656
11675
'ng-model' : attr . ngModel ,
11657
11676
'ng-disabled' : attr . ngDisabled ,
11658
- 'ng-change' : attr . ngChange
11677
+ 'ng-change' : attr . ngChange ,
11678
+ 'ng-required' : attr . ngRequired ,
11679
+ 'required' : attr . required
11659
11680
} , function ( value , name ) {
11660
11681
if ( isDefined ( value ) ) {
11661
11682
input . attr ( name , value ) ;
@@ -12211,9 +12232,9 @@ IonicModule
12211
12232
* - {@link ionic.directive:exposeAsideWhen}
12212
12233
*
12213
12234
* @usage
12214
- * To use side menus, add an `<ion-side-menus>` parent element,
12215
- * an `<ion-side-menu-content>` for the center content,
12216
- * and one or more `<ion-side-menu>` directives.
12235
+ * To use side menus, add an `<ion-side-menus>` parent element. This will encompass all pages that have a
12236
+ * side menu, and have at least 2 child elements: 1 `<ion-side-menu-content>` for the center content,
12237
+ * and one or more `<ion-side-menu>` directives for each side menu(left/right) that you wish to place .
12217
12238
*
12218
12239
* ```html
12219
12240
* <ion-side-menus>
@@ -12228,6 +12249,10 @@ IonicModule
12228
12249
* <!-- Right menu -->
12229
12250
* <ion-side-menu side="right">
12230
12251
* </ion-side-menu>
12252
+ *
12253
+ * <ion-side-menu-content>
12254
+ * <!-- Main content, usually <ion-nav-view> -->
12255
+ * </ion-side-menu-content>
12231
12256
* </ion-side-menus>
12232
12257
* ```
12233
12258
* ```js
@@ -13142,7 +13167,9 @@ function($timeout, $ionicConfig) {
13142
13167
'ng-disabled' : attr . ngDisabled ,
13143
13168
'ng-true-value' : attr . ngTrueValue ,
13144
13169
'ng-false-value' : attr . ngFalseValue ,
13145
- 'ng-change' : attr . ngChange
13170
+ 'ng-change' : attr . ngChange ,
13171
+ 'ng-required' : attr . ngRequired ,
13172
+ 'required' : attr . required
13146
13173
} , function ( value , name ) {
13147
13174
if ( isDefined ( value ) ) {
13148
13175
input . attr ( name , value ) ;
0 commit comments