diff options
author | elisa castro <elisa.castro@iot.bzh> | 2018-12-26 15:52:28 +0100 |
---|---|---|
committer | elisa castro <elisa.castro@iot.bzh> | 2019-01-10 10:26:31 +0100 |
commit | 3009a190cb8984201693a1cf8ecff72f32c7a3b8 (patch) | |
tree | 7a6aecf0864df841e5c5cad956404c93d85ef704 /webapp | |
parent | 6d14032f41c785bb397509f17764eb29b087ff0f (diff) |
Fix button visibility issueguppy_6.99.4guppy/6.99.46.99.4
Uniformisation of button modal from Nebular and confirm modal component
(primary-secondary) instead of (primary-default)
Also remove useless textBtn type
Bug-AGL: SPEC-2036
Change-Id: Ice1b629018624fde2576dd70d307a6d7e72ea930
Signed-off-by: elisa castro <elisa.castro@iot.bzh>
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/src/app/pages/confirm/confirm-modal/confirm-modal.component.ts | 30 | ||||
-rw-r--r-- | webapp/src/app/pages/sdks/sdk-management/sdk-install.component.ts | 4 |
2 files changed, 21 insertions, 13 deletions
diff --git a/webapp/src/app/pages/confirm/confirm-modal/confirm-modal.component.ts b/webapp/src/app/pages/confirm/confirm-modal/confirm-modal.component.ts index d3fec86..3de9035 100644 --- a/webapp/src/app/pages/confirm/confirm-modal/confirm-modal.component.ts +++ b/webapp/src/app/pages/confirm/confirm-modal/confirm-modal.component.ts @@ -39,12 +39,19 @@ export enum EType { <div [innerHtml]="question"></div> </div> <div class="col-12 text-center" style="margin-top: 2em;"> - <button *ngIf="textBtn[0] != ''" type="button" class="btn btn-primary" tabindex="2" - (click)="onClick(textBtn[0])">{{textBtn[0]}}</button> - <button *ngIf="textBtn[1] != ''" type="button" class="btn btn-default" tabindex="1" - (click)="onClick(textBtn[1])">{{textBtn[1]}}</button> - <button *ngIf="textBtn[2] != ''" type="button" class="btn btn-default" tabindex="3" - (click)="onClick(textBtn[2])">{{textBtn[2]}}</button> + <button *ngIf="textBtn[0] != ''" + type="button" + class="btn btn-md btn-primary" + tabindex="2" + (click)="onClick(textBtn[0])"> {{textBtn[0]}} + </button> + + <button *ngIf="textBtn[1] != ''" + type="button" + class="btn btn-md btn-secondary" + tabindex="1" + (click)="onClick(textBtn[1])"> {{textBtn[1]}} + </button> </div> </div> @@ -64,29 +71,30 @@ export class ConfirmModalComponent implements OnInit { @Input() question; bodyQuestion = ''; - textBtn: Array<string> = ['', '', '']; + textBtn: Array<string> = ['', '']; constructor( private modalRef: NgbActiveModal, ) { } + ngOnInit() { switch (this.type) { case EType.OK: - this.textBtn = [ 'OK', '', '' ]; + this.textBtn = [ 'OK', '' ]; break; case EType.Cancel: - this.textBtn = [ '', 'Cancel', '' ]; + this.textBtn = [ '', 'Cancel' ]; break; case EType.OKCancel: - this.textBtn = [ 'OK', 'Cancel', '' ]; + this.textBtn = [ 'OK', 'Cancel' ]; break; default: case EType.YesNo: - this.textBtn = [ 'Yes', 'No', '' ]; + this.textBtn = [ 'Yes', 'No' ]; break; } } diff --git a/webapp/src/app/pages/sdks/sdk-management/sdk-install.component.ts b/webapp/src/app/pages/sdks/sdk-management/sdk-install.component.ts index c21cb66..68d87d1 100644 --- a/webapp/src/app/pages/sdks/sdk-management/sdk-install.component.ts +++ b/webapp/src/app/pages/sdks/sdk-management/sdk-install.component.ts @@ -42,8 +42,8 @@ import 'rxjs/add/operator/bufferTime'; <textarea rows="20" class="textarea-scroll" #scrollOutput [innerHtml]="installOutput"></textarea> </div> <div class="col-12 text-center"> - <button type="button" class="btn" tabindex="1" - [ngClass]="(btnName=='Cancel')?'btn-default':'btn-primary'" + <button type="button" class="btn btn-md" tabindex="1" + [ngClass]="(btnName=='Cancel')?'btn-secondary':'btn-primary'" (click)="onBtnClick()">{{ btnName }}</button> </div> </div> |