fix issue with confict in close dropdown and modal

This commit is contained in:
argirok 2022-05-30 13:56:14 +03:00
parent da16692d14
commit 5667a94756
2 changed files with 9 additions and 21 deletions

View File

@ -22,7 +22,7 @@ declare var UIkit;
<!-- This is the modal -->
<modal-alert #egiTransferModal large="true" emitHidden="true" (alertHidden)="close()">
<modal-alert #egiTransferModal large="true" >
<div *ngIf="!accessToken" class="">
<div class="uk-width-1-1 uk-margin-top uk-margin-bottom uk-text-center">
In order to send data to a Cloud Storage, you would need to be authenticated, please login via EGI check-in.
@ -149,6 +149,11 @@ export class EGIDataTransferComponent {
this.egiTransferModal.cancelButton = false;
this.egiTransferModal.okButton = false;
this.egiTransferModal.alertTitle = "EOSC data transfer service [demo]";
this.destinationPath = "";
this.selectedDestination = this.destinationOptions[0].value;
this.selectedSourceUrl = this.sourceUrls[0];
this.message = null;
this.status = "init";
this.egiTransferModal.open();
}
close(){
@ -168,7 +173,7 @@ export class EGIDataTransferComponent {
}
checkin(){
window.location.href = this.loginURL+"?redirect="+ encodeURIComponent(window.location.href + "&egiTransfer=t");
window.location.href = this.loginURL+"?redirect="+ encodeURIComponent(window.location.href + (window.location.href.indexOf("&egiTransfer=t")!=-1?"":"&egiTransfer=t"));
}
parse(){

View File

@ -115,12 +115,6 @@ export class AlertModal {
@Input()
public choice: boolean = false;
/**
* If the value is true, on the hidden event the alertHidden Output is emitted
*/
@Input()
public emitHidden: boolean = false;
/**
* if the value is true then on ok clicked, modal will stay open.
*/
@ -135,24 +129,13 @@ export class AlertModal {
* or when Ok method is called.
*/
@Output() public alertOutput: EventEmitter<any> = new EventEmitter();
/**
* If emitHidden is true, this output is emitted when modal is hidden.
*/
@Output() public alertHidden: EventEmitter<any> = new EventEmitter();
@ViewChild('element') element: ElementRef;
constructor() {
}
ngAfterViewInit() {
if(this.emitHidden) {
UIkit.util.on('#' + this.id, 'hidden', () => {
this.alertHidden.emit(true);
});
}
}
/**
* Opens a alert window creating backdrop.