Skip to content

Commit

Permalink
fix(button): remove unnecessary ion-button-effect elements
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley committed Apr 29, 2016
1 parent 4c8ee95 commit 369d78b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 24 deletions.
7 changes: 1 addition & 6 deletions ionic/components/action-sheet/action-sheet.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {Component, Renderer, ElementRef, HostListener, ChangeDetectionStrategy, ViewEncapsulation} from 'angular2/core';
import {NgFor, NgIf} from 'angular2/common';
import {Component, Renderer, ElementRef, HostListener, ViewEncapsulation} from 'angular2/core';

import {Animation} from '../../animations/animation';
import {Transition, TransitionOptions} from '../../transitions/transition';
Expand Down Expand Up @@ -225,14 +224,12 @@ export class ActionSheet extends ViewController {
'<button category="action-sheet-button" (click)="click(b)" *ngFor="#b of d.buttons" class="disable-hover" [ngClass]="b.cssClass">' +
'<ion-icon [name]="b.icon" *ngIf="b.icon" class="action-sheet-icon"></ion-icon> ' +
'{{b.text}}' +
'<ion-button-effect></ion-button-effect>' +
'</button>' +
'</div>' +
'<div class="action-sheet-group" *ngIf="d.cancelButton">' +
'<button category="action-sheet-button" (click)="click(d.cancelButton)" class="action-sheet-cancel disable-hover" [ngClass]="d.cancelButton.cssClass">' +
'<ion-icon [name]="d.cancelButton.icon" *ngIf="d.cancelButton.icon" class="action-sheet-icon"></ion-icon> ' +
'{{d.cancelButton.text}}' +
'<ion-button-effect></ion-button-effect>' +
'</button>' +
'</div>' +
'</div>' +
Expand All @@ -242,8 +239,6 @@ export class ActionSheet extends ViewController {
'[attr.aria-labelledby]': 'hdrId',
'[attr.aria-describedby]': 'descId'
},
directives: [NgFor, NgIf, Icon],
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
})
class ActionSheetCmp {
Expand Down
6 changes: 1 addition & 5 deletions ionic/components/alert/alert.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {Component, ElementRef, Renderer, HostListener, ChangeDetectionStrategy, ViewEncapsulation} from 'angular2/core';
import {NgClass, NgSwitch, NgIf, NgFor} from 'angular2/common';
import {Component, ElementRef, Renderer, HostListener, ViewEncapsulation} from 'angular2/core';

import {Animation} from '../../animations/animation';
import {Transition, TransitionOptions} from '../../transitions/transition';
Expand Down Expand Up @@ -355,7 +354,6 @@ export class Alert extends ViewController {
'<div class="alert-button-group" [ngClass]="{vertical: d.buttons.length>2}">' +
'<button category="alert-button" *ngFor="#b of d.buttons" (click)="btnClick(b)" [ngClass]="b.cssClass">' +
'{{b.text}}' +
'<ion-button-effect></ion-button-effect>' +
'</button>' +
'</div>' +
'</div>',
Expand All @@ -364,8 +362,6 @@ export class Alert extends ViewController {
'[attr.aria-labelledby]': 'hdrId',
'[attr.aria-describedby]': 'descId'
},
directives: [NgClass, NgSwitch, NgIf, NgFor],
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
})
class AlertCmp {
Expand Down
6 changes: 1 addition & 5 deletions ionic/components/loading/loading.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import {Component, Renderer, ElementRef, HostListener, ChangeDetectionStrategy, ViewEncapsulation} from 'angular2/core';
import {NgFor, NgIf} from 'angular2/common';
import {Component, Renderer, ElementRef, HostListener, ViewEncapsulation} from 'angular2/core';

import {Animation} from '../../animations/animation';
import {Transition, TransitionOptions} from '../../transitions/transition';
import {Config} from '../../config/config';
import {Spinner} from '../spinner/spinner';
import {isPresent, isUndefined, isDefined} from '../../util/util';
import {NavParams} from '../nav/nav-params';
import {ViewController} from '../nav/view-controller';
Expand Down Expand Up @@ -163,8 +161,6 @@ export class Loading extends ViewController {
host: {
'role': 'dialog'
},
directives: [NgIf, Spinner],
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
})
class LoadingCmp {
Expand Down
3 changes: 1 addition & 2 deletions ionic/components/navbar/navbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ class ToolbarBackground {
'<span class="back-default">{{_bbText}}</span>' +
'</span>' +
'</span>' +
'<ion-button-effect></ion-button-effect>' +
'</button>' +
'<ng-content select="[menuToggle],ion-buttons[left]"></ng-content>' +
'<ng-content select="ion-buttons[start]"></ng-content>' +
Expand All @@ -111,7 +110,7 @@ class ToolbarBackground {
'class': 'toolbar',
'[class.statusbar-padding]': '_sbPadding'
},
directives: [BackButton, BackButtonText, Icon, ToolbarBackground]
directives: [BackButton, BackButtonText, ToolbarBackground]
})
export class Navbar extends ToolbarBase {
private _bbIcon: string;
Expand Down
7 changes: 1 addition & 6 deletions ionic/components/toast/toast.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import {Component, ElementRef, Renderer, Output, EventEmitter} from 'angular2/core';
import {NgClass, NgIf, NgFor} from 'angular2/common';

import {Button} from '../button/button';
import {Icon} from '../icon/icon';
import {ActionSheet, ActionSheetOptions} from '../action-sheet/action-sheet';
import {Animation} from '../../animations/animation';
import {Transition, TransitionOptions} from '../../transitions/transition';
Expand Down Expand Up @@ -131,17 +128,15 @@ export class Toast extends ViewController {
<div class="toast-message" id="{{hdrId}}" *ngIf="d.message">{{d.message}}</div>
<button clear class="toast-button" *ngIf="d.showCloseButton" (click)="cbClick()">
{{ d.closeButtonText || 'Close' }}
<ion-button-effect></ion-button-effect>
</button>
</div>
</div>
`,
host: {
'role': 'dialog',
'[attr.aria-labelledby]': 'hdrId',
'[attr.aria-describedby]': 'descId'
'[attr.aria-describedby]': 'descId',
},
directives: [NgIf, Icon, Button]
})
class ToastCmp {
private d: any;
Expand Down

0 comments on commit 369d78b

Please sign in to comment.