mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
Merge branch '2.0' into sass-color-map
This commit is contained in:
@ -67,7 +67,7 @@ ion-action-sheet {
|
||||
|
||||
.action-sheet-button {
|
||||
padding: $action-sheet-ios-button-padding;
|
||||
|
||||
margin: 0;
|
||||
min-height: $action-sheet-ios-button-min-height;
|
||||
|
||||
border-bottom: $action-sheet-ios-button-border-width $action-sheet-ios-button-border-style $action-sheet-ios-border-color;
|
||||
|
@ -140,7 +140,7 @@ export class ActionSheet extends ViewController {
|
||||
* |----------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
* | text | `string` | The buttons text |
|
||||
* | icon | `icon` | The buttons icons |
|
||||
* | handler | `any` | An express the button shoule evaluate |
|
||||
* | handler | `any` | An express the button should evaluate |
|
||||
* | cssClass | `string` | An additional class for custom styles |
|
||||
* | role | `string` | How the button should be displayed, `destructive` or `cancel`. If not role is provided, it will display the button without any additional styles |
|
||||
*
|
||||
|
@ -138,6 +138,6 @@
|
||||
|
||||
</ion-menu>
|
||||
|
||||
<ion-nav id="nav" [root]="rootPage" #content swipe-back-enabled="false"></ion-nav>
|
||||
<ion-nav id="nav" [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>
|
||||
|
||||
<div [hidden]="isChangeDetecting()"></div>
|
@ -33,4 +33,4 @@
|
||||
|
||||
</ion-menu>
|
||||
|
||||
<ion-nav id="nav" [root]="rootView" #content swipe-back-enabled="false"></ion-nav>
|
||||
<ion-nav id="nav" [root]="rootView" #content swipeBackEnabled="false"></ion-nav>
|
||||
|
@ -76,4 +76,4 @@
|
||||
</ion-menu>
|
||||
|
||||
|
||||
<ion-nav id="nav" [root]="rootPage" #content swipe-back-enabled="false"></ion-nav>
|
||||
<ion-nav id="nav" [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>
|
||||
|
@ -33,4 +33,4 @@
|
||||
</ion-menu>
|
||||
|
||||
|
||||
<ion-nav [root]="rootPage" #content swipe-back-enabled="false"></ion-nav>
|
||||
<ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>
|
||||
|
@ -37,4 +37,4 @@
|
||||
</ion-menu>
|
||||
|
||||
|
||||
<ion-nav id="nav" [root]="rootView" #content swipe-back-enabled="false"></ion-nav>
|
||||
<ion-nav id="nav" [root]="rootView" #content swipeBackEnabled="false"></ion-nav>
|
||||
|
@ -37,4 +37,4 @@
|
||||
</ion-menu>
|
||||
|
||||
|
||||
<ion-nav id="nav" [root]="rootView" #content swipe-back-enabled="false"></ion-nav>
|
||||
<ion-nav id="nav" [root]="rootView" #content swipeBackEnabled="false"></ion-nav>
|
||||
|
@ -36,4 +36,4 @@
|
||||
|
||||
</ion-menu>
|
||||
|
||||
<ion-nav id="nav" [root]="rootView" #content swipe-back-enabled="false"></ion-nav>
|
||||
<ion-nav id="nav" [root]="rootView" #content swipeBackEnabled="false"></ion-nav>
|
@ -108,9 +108,9 @@ export class NavController extends Ion {
|
||||
private _init = false;
|
||||
private _trans: Transition;
|
||||
private _sbGesture: SwipeBackGesture;
|
||||
private _sbEnabled: boolean;
|
||||
private _sbThreshold: number;
|
||||
|
||||
protected _sbEnabled: boolean;
|
||||
protected _ids: number = -1;
|
||||
protected _trnsDelay: any;
|
||||
protected _trnsTime: number = 0;
|
||||
@ -1288,7 +1288,7 @@ export class NavController extends Ion {
|
||||
let shouldResetZIndex = this._views.some(v => v.zIndex < 0);
|
||||
if (shouldResetZIndex) {
|
||||
this._views.forEach(view => {
|
||||
view.setZIndex( view.zIndex + INIT_ZINDEX + 1, this._renderer );
|
||||
view.setZIndex(view.zIndex + INIT_ZINDEX + 1, this._renderer);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -1401,7 +1401,7 @@ export class NavController extends Ion {
|
||||
// start the transition, fire callback when done...
|
||||
this._transition(enteringView, leavingView, opts, (hasCompleted: boolean) => {
|
||||
// swipe back has finished!!
|
||||
console.debug('swipeBack, hasCompleted', hasCompleted);
|
||||
console.debug('swipeBack, hasCompleted', hasCompleted);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -1465,18 +1465,6 @@ export class NavController extends Ion {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @input {boolean} Whether it's possible to swipe-to-go-back on this nav controller or not.
|
||||
*/
|
||||
@Input()
|
||||
get swipeBackEnabled(): boolean {
|
||||
return this._sbEnabled;
|
||||
}
|
||||
|
||||
set swipeBackEnabled(val: boolean) {
|
||||
this._sbEnabled = isTrueProperty(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* If it's possible to use swipe back or not. If it's not possible
|
||||
* to go back, or swipe back is not enable then this will return false.
|
||||
@ -1572,7 +1560,7 @@ export class NavController extends Ion {
|
||||
* @returns {viewController}
|
||||
*/
|
||||
getPrevious(view: ViewController): ViewController {
|
||||
return this.getByIndex( this.indexOf(view) - 1 );
|
||||
return this.getByIndex(this.indexOf(view) - 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,6 +3,7 @@ import {Component, ElementRef, Input, Optional, NgZone, Compiler, AppViewManager
|
||||
import {IonicApp} from '../app/app';
|
||||
import {Config} from '../../config/config';
|
||||
import {Keyboard} from '../../util/keyboard';
|
||||
import {isTrueProperty} from '../../util/util';
|
||||
import {NavController} from './nav-controller';
|
||||
import {ViewController} from './view-controller';
|
||||
|
||||
@ -42,10 +43,10 @@ import {ViewController} from './view-controller';
|
||||
* Nav will automatically add a back button to it if there is a page
|
||||
* before the one you are navigating to in the navigation stack.
|
||||
*
|
||||
* Additionally, specifying the `swipe-back-enabled` property will allow you to
|
||||
* Additionally, specifying the `swipeBackEnabled` property will allow you to
|
||||
* swipe to go back:
|
||||
* ```html
|
||||
* <ion-nav swipe-back-enabled="false" [root]="rootPage"></ion-nav>
|
||||
* <ion-nav swipeBackEnabled="false" [root]="rootPage"></ion-nav>
|
||||
* ```
|
||||
*
|
||||
* Here is a diagram of how Nav animates smoothly between pages:
|
||||
@ -146,6 +147,18 @@ export class Nav extends NavController {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @input {boolean} Whether it's possible to swipe-to-go-back on this nav controller or not.
|
||||
*/
|
||||
@Input()
|
||||
get swipeBackEnabled(): boolean {
|
||||
return this._sbEnabled;
|
||||
}
|
||||
|
||||
set swipeBackEnabled(val: boolean) {
|
||||
this._sbEnabled = isTrueProperty(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
|
@ -44,7 +44,7 @@ export class Login {
|
||||
</ion-content>
|
||||
</ion-menu>
|
||||
|
||||
<ion-nav id="account-nav" [root]="rootPage" #content swipe-back-enabled="false"></ion-nav>
|
||||
<ion-nav id="account-nav" [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>
|
||||
`
|
||||
})
|
||||
export class Account {
|
||||
@ -135,7 +135,7 @@ export class Profile {
|
||||
|
||||
|
||||
@App({
|
||||
template: `<ion-nav id="root-nav" [root]="rootPage" swipe-back-enabled="false"></ion-nav>`
|
||||
template: `<ion-nav id="root-nav" [root]="rootPage" swipeBackEnabled="false"></ion-nav>`
|
||||
})
|
||||
class E2EApp {
|
||||
constructor() {
|
||||
|
Reference in New Issue
Block a user