Skip to content

Commit

Permalink
Merge branch '2.0' into ion-range
Browse files Browse the repository at this point in the history
  • Loading branch information
brandyscarney committed May 31, 2016
2 parents af6d5e4 + 6bd91f0 commit f239b72
Show file tree
Hide file tree
Showing 62 changed files with 792 additions and 360 deletions.
2 changes: 1 addition & 1 deletion demos/infinite-scroll/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ion-item>
</ion-list>

<ion-infinite-scroll (infinite)="doInfinite($event)" threshold="100px">
<ion-infinite-scroll (ionInfinite)="doInfinite($event)" threshold="100px">
<ion-infinite-scroll-content
loadingSpinner="bubbles"
loadingText="Loading more data...">
Expand Down
2 changes: 1 addition & 1 deletion demos/popover/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {App, Page, Popover, NavController, Content, NavParams} from 'ionic-angul

@Page({
template: `
<ion-list radio-group [(ngModel)]="fontFamily" (change)="changeFontFamily()">
<ion-list radio-group [(ngModel)]="fontFamily" (ionChange)="changeFontFamily()">
<ion-row>
<ion-col>
<button (click)="changeFontSize('smaller')" ion-item detail-none class="text-button text-smaller">A</button>
Expand Down
2 changes: 1 addition & 1 deletion demos/radio/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

<ion-item>
<ion-label>Enable "Never"</ion-label>
<ion-toggle (change)="isDisabled = !isDisabled"></ion-toggle>
<ion-toggle (ionChange)="isDisabled = !isDisabled"></ion-toggle>
</ion-item>

<ion-item>
Expand Down
2 changes: 1 addition & 1 deletion demos/refresher/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


<ion-content>
<ion-refresher (refresh)="doRefresh($event)" (pulling)="doPulling($event)">
<ion-refresher (ionRefresh)="doRefresh($event)" (ionPull)="doPulling($event)">
<ion-refresher-content
pullingText="Pull to refresh..."
refreshingText="Refreshing...">
Expand Down
4 changes: 2 additions & 2 deletions demos/select/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<ion-item>
<ion-label>Date</ion-label>
<ion-select (change)="monthChange($event)">
<ion-select (ionChange)="monthChange($event)">
<ion-option value="01">January</ion-option>
<ion-option value="02">February</ion-option>
<ion-option value="03" checked="true">March</ion-option>
Expand All @@ -43,7 +43,7 @@
<ion-option value="11">November</ion-option>
<ion-option value="12">December</ion-option>
</ion-select>
<ion-select (change)="yearChange($event)">
<ion-select (ionChange)="yearChange($event)">
<ion-option>1989</ion-option>
<ion-option>1990</ion-option>
<ion-option>1991</ion-option>
Expand Down
4 changes: 2 additions & 2 deletions src/components/checkbox/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class Checkbox {
/**
* @output {Checkbox} expression to evaluate when the checkbox value changes
*/
@Output() change: EventEmitter<Checkbox> = new EventEmitter();
@Output() ionChange: EventEmitter<Checkbox> = new EventEmitter();

constructor(
private _form: Form,
Expand Down Expand Up @@ -129,7 +129,7 @@ export class Checkbox {
if (isChecked !== this._checked) {
this._checked = isChecked;
if (this._init) {
this.change.emit(this);
this.ionChange.emit(this);
}
this._item && this._item.setCssClass('item-checkbox-checked', isChecked);
}
Expand Down
8 changes: 4 additions & 4 deletions src/components/checkbox/test/basic/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
</ion-item>

<ion-item>
<ion-label>Kiwi, (change) Secondary color</ion-label>
<ion-checkbox secondary (change)="kiwiChange($event)"></ion-checkbox>
<ion-label>Kiwi, (ionChange) Secondary color</ion-label>
<ion-checkbox secondary (ionChange)="kiwiChange($event)"></ion-checkbox>
</ion-item>

<ion-item>
<ion-label>Strawberry, (change) [checked]="true"</ion-label>
<ion-checkbox light (change)="strawberryChange($event)" [checked]="true"></ion-checkbox>
<ion-label>Strawberry, (ionChange) [checked]="true"</ion-label>
<ion-checkbox light (ionChange)="strawberryChange($event)" [checked]="true"></ion-checkbox>
</ion-item>

<ion-item>
Expand Down
10 changes: 5 additions & 5 deletions src/components/datetime/datetime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,12 @@ export class DateTime {
/**
* @output {any} Any expression to evaluate when the datetime selection has changed.
*/
@Output() change: EventEmitter<any> = new EventEmitter();
@Output() ionChange: EventEmitter<any> = new EventEmitter();

/**
* @output {any} Any expression to evaluate when the datetime selection was cancelled.
*/
@Output() cancel: EventEmitter<any> = new EventEmitter();
@Output() ionCancel: EventEmitter<any> = new EventEmitter();

constructor(
private _form: Form,
Expand Down Expand Up @@ -469,23 +469,23 @@ export class DateTime {
text: this.cancelText,
role: 'cancel',
handler: () => {
this.cancel.emit(null);
this.ionCancel.emit(null);
}
},
{
text: this.doneText,
handler: (data) => {
console.log('datetime, done', data);
this.onChange(data);
this.change.emit(data);
this.ionChange.emit(data);
}
}
];

this.generate(picker);
this.validate(picker);

picker.change.subscribe(() => {
picker.ionChange.subscribe(() => {
this.validate(picker);
});

Expand Down
8 changes: 8 additions & 0 deletions src/components/datetime/test/basic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ class E2EPage {
'l\u00f8r'
];

onChange(ev) {
console.log("Changed", ev);
}

onCancel(ev) {
console.log("Canceled", ev);
}

}


Expand Down
2 changes: 1 addition & 1 deletion src/components/datetime/test/basic/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

<ion-item>
<ion-label>h:mm a</ion-label>
<ion-datetime displayFormat="h:mm a" [(ngModel)]="time"></ion-datetime>
<ion-datetime (ionChange)="onChange($event)" (ionCancel)="onCancel($event)" displayFormat="h:mm a" [(ngModel)]="time"></ion-datetime>
</ion-item>

<ion-item>
Expand Down
8 changes: 4 additions & 4 deletions src/components/infinite-scroll/infinite-scroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {Content} from '../content/content';
* <ion-item *ngFor="let i of items">{% raw %}{{i}}{% endraw %}</ion-item>
* </ion-list>
*
* <ion-infinite-scroll (infinite)="doInfinite($event)">
* <ion-infinite-scroll (ionInfinite)="doInfinite($event)">
* <ion-infinite-scroll-content></ion-infinite-scroll-content>
* </ion-infinite-scroll>
*
Expand Down Expand Up @@ -67,7 +67,7 @@ import {Content} from '../content/content';
* ```html
* <ion-content>
*
* <ion-infinite-scroll (infinite)="doInfinite($event)">
* <ion-infinite-scroll (ionInfinite)="doInfinite($event)">
* <ion-infinite-scroll-content
* loadingSpinner="bubbles"
* loadingText="Loading more data...">
Expand Down Expand Up @@ -137,7 +137,7 @@ export class InfiniteScroll {
* you must call the infinite scroll's `complete()` method when
* your async operation has completed.
*/
@Output() infinite: EventEmitter<InfiniteScroll> = new EventEmitter();
@Output() ionInfinite: EventEmitter<InfiniteScroll> = new EventEmitter();

constructor(
@Host() private _content: Content,
Expand Down Expand Up @@ -179,7 +179,7 @@ export class InfiniteScroll {
if (distanceFromInfinite < 0) {
this._zone.run(() => {
this.state = STATE_LOADING;
this.infinite.emit(this);
this.ionInfinite.emit(this);
});
return 5;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/infinite-scroll/test/basic/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</button>
</ion-list>

<ion-infinite-scroll (infinite)="doInfinite($event)" threshold="100px">
<ion-infinite-scroll (ionInfinite)="doInfinite($event)" threshold="100px">
<ion-infinite-scroll-content
loadingSpinner="bubbles"
loadingText="Loading more data...">
Expand Down
2 changes: 1 addition & 1 deletion src/components/infinite-scroll/test/short-list/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</ion-item>
</ion-list>

<ion-infinite-scroll (infinite)="doInfinite($event)" threshold="100px">
<ion-infinite-scroll (ionInfinite)="doInfinite($event)" threshold="100px">
<ion-infinite-scroll-content
loadingSpinner="bubbles"
loadingText="Loading more data...">
Expand Down
2 changes: 1 addition & 1 deletion src/components/input/input.wp.scss
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ ion-input[clearInput] {
.text-input-clear-icon {
@include svg-background-image($text-input-wp-input-clear-icon-svg);

top: $item-wp-padding-top;
right: ($item-wp-padding-right / 2);
bottom: 7px;

width: $text-input-wp-input-clear-icon-width;

Expand Down
12 changes: 6 additions & 6 deletions src/components/menu/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,17 +283,17 @@ export class Menu extends Ion {
/**
* @output {event} When the menu is being dragged open.
*/
@Output() opening: EventEmitter<number> = new EventEmitter();
@Output() ionDrag: EventEmitter<number> = new EventEmitter();

/**
* @output {event} When the menu has been opened.
*/
@Output() opened: EventEmitter<boolean> = new EventEmitter();
@Output() ionOpen: EventEmitter<boolean> = new EventEmitter();

/**
* @output {event} When the menu has been closed.
*/
@Output() closed: EventEmitter<boolean> = new EventEmitter();
@Output() ionClose: EventEmitter<boolean> = new EventEmitter();

constructor(
private _menuCtrl: MenuController,
Expand Down Expand Up @@ -444,7 +444,7 @@ export class Menu extends Ion {
if (this._isEnabled && this._isSwipeEnabled) {
this._prevent();
this._getType().setProgessStep(stepValue);
this.opening.next(stepValue);
this.ionDrag.emit(stepValue);
}
}

Expand Down Expand Up @@ -490,12 +490,12 @@ export class Menu extends Ion {

if (isOpen) {
this._cntEle.addEventListener('click', this.onContentClick);
this.opened.emit(true);
this.ionOpen.emit(true);

} else {
this.getNativeElement().classList.remove('show-menu');
this.getBackdropElement().classList.remove('show-backdrop');
this.closed.emit(true);
this.ionClose.emit(true);
}
}
}
Expand Down
12 changes: 10 additions & 2 deletions src/components/menu/test/basic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,16 @@ class E2EApp {
});
}

onMenuOpening(ev) {
console.log('onMenuOpening', ev);
onDrag(ev) {
console.log('Menu is being dragged', ev);
}

onOpen(ev) {
console.log('Menu is open', ev);
}

onClose(ev) {
console.log('Menu is closed', ev);
}

isChangeDetecting() {
Expand Down
4 changes: 2 additions & 2 deletions src/components/menu/test/basic/main.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<ion-menu [content]="content" side="left" persistent="true">
<ion-menu [content]="content" side="left" persistent="true" (ionDrag)="onDrag($event)" (ionOpen)="onOpen($event)"(ionClose)="onClose($event)">

<ion-toolbar secondary>
<ion-title>Left Menu</ion-title>
Expand Down Expand Up @@ -140,4 +140,4 @@

<ion-nav id="nav" [root]="rootPage" #content></ion-nav>

<div [hidden]="isChangeDetecting()"></div>
<div [hidden]="isChangeDetecting()"></div>
9 changes: 1 addition & 8 deletions src/components/modal/modal.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,7 @@
$modal-ios-background-color: $background-ios-color !default;
$modal-ios-border-radius: 5px !default;

.modal ion-page {
background-color: $modal-ios-background-color;
}

.modal-wrapper {
@media only screen and (min-width: 768px) and (min-height: 600px) {
overflow: hidden;

border-radius: $modal-ios-border-radius;
}
background-color: $modal-ios-background-color;
}
2 changes: 1 addition & 1 deletion src/components/modal/modal.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
$modal-md-background-color: $background-md-color !default;


.modal ion-page {
.modal-wrapper {
background-color: $modal-md-background-color;
}
Loading

0 comments on commit f239b72

Please sign in to comment.