Merge pull request #2470 from wknet123/master-endpoint-integration

Fix global message display issue
This commit is contained in:
Steven Zou 2017-06-09 13:09:50 +08:00 committed by GitHub
commit 65ef1f70c1
2 changed files with 2 additions and 6 deletions

View File

@ -1,4 +1,4 @@
<div class="global-message-alert" [hidden]="hideOuter"> <div [class.global-message-alert]="!isAppLevel">
<clr-alert [clrAlertType]="globalMessage.type" [clrAlertAppLevel]="isAppLevel" [(clrAlertClosed)]="!globalMessageOpened" (clrAlertClosedChange)="onClose()"> <clr-alert [clrAlertType]="globalMessage.type" [clrAlertAppLevel]="isAppLevel" [(clrAlertClosed)]="!globalMessageOpened" (clrAlertClosedChange)="onClose()">
<div class="alert-item"> <div class="alert-item">
<span class="alert-text"> <span class="alert-text">

View File

@ -33,7 +33,6 @@ export class MessageComponent implements OnInit, OnDestroy {
globalMessageOpened: boolean; globalMessageOpened: boolean;
messageText: string = ""; messageText: string = "";
timer: any = null; timer: any = null;
hideOuter: boolean = true;
appLevelMsgSub: Subscription; appLevelMsgSub: Subscription;
msgSub: Subscription; msgSub: Subscription;
@ -79,8 +78,6 @@ export class MessageComponent implements OnInit, OnDestroy {
let hackDom: any = queryDoms[0]; let hackDom: any = queryDoms[0];
hackDom.className += ' alert-global alert-global-align'; hackDom.className += ' alert-global alert-global-align';
} }
this.hideOuter = false;
}, 0); }, 0);
} }
@ -138,6 +135,5 @@ export class MessageComponent implements OnInit, OnDestroy {
clearTimeout(this.timer); clearTimeout(this.timer);
} }
this.globalMessageOpened = false; this.globalMessageOpened = false;
this.hideOuter = true;
} }
} }