mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 05:58:26 +08:00
fix(button): remove unnecessary ion-button-effect elements
This commit is contained in:
@ -1,5 +1,4 @@
|
|||||||
import {Component, Renderer, ElementRef, HostListener, ChangeDetectionStrategy, ViewEncapsulation} from 'angular2/core';
|
import {Component, Renderer, ElementRef, HostListener, ViewEncapsulation} from 'angular2/core';
|
||||||
import {NgFor, NgIf} from 'angular2/common';
|
|
||||||
|
|
||||||
import {Animation} from '../../animations/animation';
|
import {Animation} from '../../animations/animation';
|
||||||
import {Transition, TransitionOptions} from '../../transitions/transition';
|
import {Transition, TransitionOptions} from '../../transitions/transition';
|
||||||
@ -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">' +
|
'<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> ' +
|
'<ion-icon [name]="b.icon" *ngIf="b.icon" class="action-sheet-icon"></ion-icon> ' +
|
||||||
'{{b.text}}' +
|
'{{b.text}}' +
|
||||||
'<ion-button-effect></ion-button-effect>' +
|
|
||||||
'</button>' +
|
'</button>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<div class="action-sheet-group" *ngIf="d.cancelButton">' +
|
'<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">' +
|
'<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> ' +
|
'<ion-icon [name]="d.cancelButton.icon" *ngIf="d.cancelButton.icon" class="action-sheet-icon"></ion-icon> ' +
|
||||||
'{{d.cancelButton.text}}' +
|
'{{d.cancelButton.text}}' +
|
||||||
'<ion-button-effect></ion-button-effect>' +
|
|
||||||
'</button>' +
|
'</button>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
@ -242,8 +239,6 @@ export class ActionSheet extends ViewController {
|
|||||||
'[attr.aria-labelledby]': 'hdrId',
|
'[attr.aria-labelledby]': 'hdrId',
|
||||||
'[attr.aria-describedby]': 'descId'
|
'[attr.aria-describedby]': 'descId'
|
||||||
},
|
},
|
||||||
directives: [NgFor, NgIf, Icon],
|
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
||||||
encapsulation: ViewEncapsulation.None,
|
encapsulation: ViewEncapsulation.None,
|
||||||
})
|
})
|
||||||
class ActionSheetCmp {
|
class ActionSheetCmp {
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import {Component, ElementRef, Renderer, HostListener, ChangeDetectionStrategy, ViewEncapsulation} from 'angular2/core';
|
import {Component, ElementRef, Renderer, HostListener, ViewEncapsulation} from 'angular2/core';
|
||||||
import {NgClass, NgSwitch, NgIf, NgFor} from 'angular2/common';
|
|
||||||
|
|
||||||
import {Animation} from '../../animations/animation';
|
import {Animation} from '../../animations/animation';
|
||||||
import {Transition, TransitionOptions} from '../../transitions/transition';
|
import {Transition, TransitionOptions} from '../../transitions/transition';
|
||||||
@ -355,7 +354,6 @@ export class Alert extends ViewController {
|
|||||||
'<div class="alert-button-group" [ngClass]="{vertical: d.buttons.length>2}">' +
|
'<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">' +
|
'<button category="alert-button" *ngFor="#b of d.buttons" (click)="btnClick(b)" [ngClass]="b.cssClass">' +
|
||||||
'{{b.text}}' +
|
'{{b.text}}' +
|
||||||
'<ion-button-effect></ion-button-effect>' +
|
|
||||||
'</button>' +
|
'</button>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'</div>',
|
'</div>',
|
||||||
@ -364,8 +362,6 @@ export class Alert extends ViewController {
|
|||||||
'[attr.aria-labelledby]': 'hdrId',
|
'[attr.aria-labelledby]': 'hdrId',
|
||||||
'[attr.aria-describedby]': 'descId'
|
'[attr.aria-describedby]': 'descId'
|
||||||
},
|
},
|
||||||
directives: [NgClass, NgSwitch, NgIf, NgFor],
|
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
||||||
encapsulation: ViewEncapsulation.None,
|
encapsulation: ViewEncapsulation.None,
|
||||||
})
|
})
|
||||||
class AlertCmp {
|
class AlertCmp {
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
import {Component, Renderer, ElementRef, HostListener, ChangeDetectionStrategy, ViewEncapsulation} from 'angular2/core';
|
import {Component, Renderer, ElementRef, HostListener, ViewEncapsulation} from 'angular2/core';
|
||||||
import {NgFor, NgIf} from 'angular2/common';
|
|
||||||
|
|
||||||
import {Animation} from '../../animations/animation';
|
import {Animation} from '../../animations/animation';
|
||||||
import {Transition, TransitionOptions} from '../../transitions/transition';
|
import {Transition, TransitionOptions} from '../../transitions/transition';
|
||||||
import {Config} from '../../config/config';
|
import {Config} from '../../config/config';
|
||||||
import {Spinner} from '../spinner/spinner';
|
|
||||||
import {isPresent, isUndefined, isDefined} from '../../util/util';
|
import {isPresent, isUndefined, isDefined} from '../../util/util';
|
||||||
import {NavParams} from '../nav/nav-params';
|
import {NavParams} from '../nav/nav-params';
|
||||||
import {ViewController} from '../nav/view-controller';
|
import {ViewController} from '../nav/view-controller';
|
||||||
@ -163,8 +161,6 @@ export class Loading extends ViewController {
|
|||||||
host: {
|
host: {
|
||||||
'role': 'dialog'
|
'role': 'dialog'
|
||||||
},
|
},
|
||||||
directives: [NgIf, Spinner],
|
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
||||||
encapsulation: ViewEncapsulation.None,
|
encapsulation: ViewEncapsulation.None,
|
||||||
})
|
})
|
||||||
class LoadingCmp {
|
class LoadingCmp {
|
||||||
|
@ -98,7 +98,6 @@ class ToolbarBackground {
|
|||||||
'<span class="back-default">{{_bbText}}</span>' +
|
'<span class="back-default">{{_bbText}}</span>' +
|
||||||
'</span>' +
|
'</span>' +
|
||||||
'</span>' +
|
'</span>' +
|
||||||
'<ion-button-effect></ion-button-effect>' +
|
|
||||||
'</button>' +
|
'</button>' +
|
||||||
'<ng-content select="[menuToggle],ion-buttons[left]"></ng-content>' +
|
'<ng-content select="[menuToggle],ion-buttons[left]"></ng-content>' +
|
||||||
'<ng-content select="ion-buttons[start]"></ng-content>' +
|
'<ng-content select="ion-buttons[start]"></ng-content>' +
|
||||||
@ -111,7 +110,7 @@ class ToolbarBackground {
|
|||||||
'class': 'toolbar',
|
'class': 'toolbar',
|
||||||
'[class.statusbar-padding]': '_sbPadding'
|
'[class.statusbar-padding]': '_sbPadding'
|
||||||
},
|
},
|
||||||
directives: [BackButton, BackButtonText, Icon, ToolbarBackground]
|
directives: [BackButton, BackButtonText, ToolbarBackground]
|
||||||
})
|
})
|
||||||
export class Navbar extends ToolbarBase {
|
export class Navbar extends ToolbarBase {
|
||||||
private _bbIcon: string;
|
private _bbIcon: string;
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
import {Component, ElementRef, Renderer, Output, EventEmitter} from 'angular2/core';
|
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 {ActionSheet, ActionSheetOptions} from '../action-sheet/action-sheet';
|
||||||
import {Animation} from '../../animations/animation';
|
import {Animation} from '../../animations/animation';
|
||||||
import {Transition, TransitionOptions} from '../../transitions/transition';
|
import {Transition, TransitionOptions} from '../../transitions/transition';
|
||||||
@ -131,7 +128,6 @@ export class Toast extends ViewController {
|
|||||||
<div class="toast-message" id="{{hdrId}}" *ngIf="d.message">{{d.message}}</div>
|
<div class="toast-message" id="{{hdrId}}" *ngIf="d.message">{{d.message}}</div>
|
||||||
<button clear class="toast-button" *ngIf="d.showCloseButton" (click)="cbClick()">
|
<button clear class="toast-button" *ngIf="d.showCloseButton" (click)="cbClick()">
|
||||||
{{ d.closeButtonText || 'Close' }}
|
{{ d.closeButtonText || 'Close' }}
|
||||||
<ion-button-effect></ion-button-effect>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -139,9 +135,8 @@ export class Toast extends ViewController {
|
|||||||
host: {
|
host: {
|
||||||
'role': 'dialog',
|
'role': 'dialog',
|
||||||
'[attr.aria-labelledby]': 'hdrId',
|
'[attr.aria-labelledby]': 'hdrId',
|
||||||
'[attr.aria-describedby]': 'descId'
|
'[attr.aria-describedby]': 'descId',
|
||||||
},
|
},
|
||||||
directives: [NgIf, Icon, Button]
|
|
||||||
})
|
})
|
||||||
class ToastCmp {
|
class ToastCmp {
|
||||||
private d: any;
|
private d: any;
|
||||||
|
Reference in New Issue
Block a user