22 * Copyright 2014 Drifty Co.
33 * http://drifty.com/
44 *
5- * Ionic, v1.0.0-rc.5
5+ * Ionic, v1.0.0
66 * A powerful HTML5 mobile app framework.
77 * http://ionicframework.com/
88 *
@@ -1537,6 +1537,15 @@ function($rootScope, $state, $location, $document, $ionicPlatform, $ionicHistory
15371537 * @returns {boolean }
15381538 */
15391539
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+
15401549/**
15411550 * @ngdoc method
15421551 * @name $ionicConfigProvider#backButton.icon
@@ -1795,9 +1804,9 @@ IonicModule
17951804 // Windows Phone
17961805 // -------------------------
17971806 setPlatformConfig ( 'windowsphone' , {
1798- scrolling : {
1799- jsScrolling : false
1800- }
1807+ // scrolling: {
1808+ // jsScrolling: false
1809+ // }
18011810 } ) ;
18021811
18031812
@@ -2068,8 +2077,8 @@ IonicModule
20682077// http://blogs.msdn.com/b/msdn_answers/archive/2015/02/10/
20692078// running-cordova-apps-on-windows-and-windows-phone-8-1-using-ionic-angularjs-and-other-frameworks.aspx
20702079. 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 \/ / ) ;
20732082} ] ) ;
20742083
20752084
@@ -5354,7 +5363,8 @@ function($scope, $attrs, $element, $timeout) {
53545363 $timeout ( function ( ) {
53555364 if ( self . jsScrolling ) self . scrollView . resize ( ) ;
53565365 // 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 ) {
53585368 self . checkBounds ( ) ;
53595369 }
53605370 } , 30 , false ) ;
@@ -7042,12 +7052,11 @@ function($scope,
70427052 return ;
70437053 }
70447054 var curElm = elm ;
7045- var scrollLeft = 0 , scrollTop = 0 , levelsClimbed = 0 ;
7055+ var scrollLeft = 0 , scrollTop = 0 ;
70467056 do {
70477057 if ( curElm !== null ) scrollLeft += curElm . offsetLeft ;
70487058 if ( curElm !== null ) scrollTop += curElm . offsetTop ;
70497059 curElm = curElm . offsetParent ;
7050- levelsClimbed ++ ;
70517060 } while ( curElm . attributes != self . element . attributes && curElm . offsetParent ) ;
70527061 scrollView . scrollTo ( scrollLeft , scrollTop , ! ! shouldAnimate ) ;
70537062 } ) ;
@@ -8023,7 +8032,7 @@ function($scope, $element, $ionicHistory) {
80238032 self . deselect ( tab ) ;
80248033 //Try to select a new tab if we're removing a tab
80258034 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
80278036 } else {
80288037 //Select previous tab if it's the last tab, else select next tab
80298038 var newTabIndex = tabIndex === self . tabs . length - 1 ? tabIndex - 1 : tabIndex + 1 ;
@@ -8323,7 +8332,9 @@ IonicModule
83238332 'ng-disabled' : attr . ngDisabled ,
83248333 'ng-true-value' : attr . ngTrueValue ,
83258334 'ng-false-value' : attr . ngFalseValue ,
8326- 'ng-change' : attr . ngChange
8335+ 'ng-change' : attr . ngChange ,
8336+ 'ng-required' : attr . ngRequired ,
8337+ 'required' : attr . required
83278338 } , function ( value , name ) {
83288339 if ( isDefined ( value ) ) {
83298340 input . attr ( name , value ) ;
@@ -9350,7 +9361,7 @@ function RepeatManagerFactory($rootScope, $window, $$rAF) {
93509361 * directive.
93519362 *
93529363 * 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.
93549365 *
93559366 * Be aware that this directive gets its own child scope. If you do not understand why this
93569367 * 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) {
93639374 * of the content. Defaults to true on iOS, false on Android.
93649375 * @param {boolean= } scroll Whether to allow scrolling of content. Defaults to true.
93659376 * @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.
93679378 * @param {boolean= } scrollbar-x Whether to show the horizontal scrollbar. Default true.
93689379 * @param {boolean= } scrollbar-y Whether to show the vertical scrollbar. Default true.
93699380 * @param {string= } start-x Initial horizontal scroll position. Default 0.
@@ -9402,6 +9413,13 @@ function($timeout, $controller, $ionicBind, $ionicConfig) {
94029413 element . addClass ( 'scroll-content-false' ) ;
94039414 }
94049415
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+
94059423 return { pre : prelink } ;
94069424 function prelink ( $scope , $element , $attr ) {
94079425 var parentScope = $scope . $parent ;
@@ -9447,7 +9465,8 @@ function($timeout, $controller, $ionicBind, $ionicConfig) {
94479465 } else {
94489466 var scrollViewOptions = { } ;
94499467
9450- if ( attr . overflowScroll === "true" || ! $ionicConfig . scrolling . jsScrolling ( ) ) {
9468+ // determined in compile phase above
9469+ if ( nativeScrolling ) {
94519470 // use native scrolling
94529471 $element . addClass ( 'overflow-scroll' ) ;
94539472
@@ -11655,7 +11674,9 @@ IonicModule
1165511674 'ng-value' : attr . ngValue ,
1165611675 'ng-model' : attr . ngModel ,
1165711676 'ng-disabled' : attr . ngDisabled ,
11658- 'ng-change' : attr . ngChange
11677+ 'ng-change' : attr . ngChange ,
11678+ 'ng-required' : attr . ngRequired ,
11679+ 'required' : attr . required
1165911680 } , function ( value , name ) {
1166011681 if ( isDefined ( value ) ) {
1166111682 input . attr ( name , value ) ;
@@ -12211,9 +12232,9 @@ IonicModule
1221112232 * - {@link ionic.directive:exposeAsideWhen}
1221212233 *
1221312234 * @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 .
1221712238 *
1221812239 * ```html
1221912240 * <ion-side-menus>
@@ -12228,6 +12249,10 @@ IonicModule
1222812249 * <!-- Right menu -->
1222912250 * <ion-side-menu side="right">
1223012251 * </ion-side-menu>
12252+ *
12253+ * <ion-side-menu-content>
12254+ * <!-- Main content, usually <ion-nav-view> -->
12255+ * </ion-side-menu-content>
1223112256 * </ion-side-menus>
1223212257 * ```
1223312258 * ```js
@@ -13142,7 +13167,9 @@ function($timeout, $ionicConfig) {
1314213167 'ng-disabled' : attr . ngDisabled ,
1314313168 'ng-true-value' : attr . ngTrueValue ,
1314413169 'ng-false-value' : attr . ngFalseValue ,
13145- 'ng-change' : attr . ngChange
13170+ 'ng-change' : attr . ngChange ,
13171+ 'ng-required' : attr . ngRequired ,
13172+ 'required' : attr . required
1314613173 } , function ( value , name ) {
1314713174 if ( isDefined ( value ) ) {
1314813175 input . attr ( name , value ) ;
0 commit comments