Commit 0b8e6211 authored by prumde's avatar prumde

Updated ecm-header.component.html and ecm-header.component.ts .


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@174511 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3fc6f7a5
......@@ -32,7 +32,7 @@ Overlay End -->
<div class="input-container-bg" [@fadeState]="headerFadeState"></div>
<div class="input-container">
<span>
<img *ngIf="userData" (click)="userAction();" [src]="profileImageLink" onerror="this.src = '/ecm/assets/images/w_user_128_128.png'; " class="user-adj user-image-128" title= "{{userData.name}}" [@userState]="headerFadeState" />
<img *ngIf="userData" (click)="userAction();" [src]="profileImageLink" onerror="this.src = hostUrl + '/ecm/assets/images/w_user_128_128.png'; " class="user-adj user-image-128" title= "{{userData.name}}" [@userState]="headerFadeState" />
<img *ngIf="!userData" (click)="userAction();" class="img-user user-adj" [@userState]="headerFadeState" src="w_user_128_128.png"/>
</span>
<div class="row">
......@@ -77,7 +77,7 @@ Overlay End -->
</span>
<span (click)="userAction();" [mdTooltip]="userToolTipText" [mdTooltipPosition]="'below'">
<button md-button class="square-button">
<img *ngIf="userData" [src]="profileImageLink" onerror="this.src = '/ecm/assets/images/svg/user_32_32.svg'; this.className = 'fixed-header-no-user'" title="{{userData.name}}" [ngClass]="( userImage.src.indexOf('/ibase/') > 0 ) ? 'fixed-header-user' : 'fixed-header-no-user' " #userImage/>
<img *ngIf="userData" [src]="profileImageLink" onerror="this.src = hostUrl + '/ecm/assets/images/svg/user_32_32.svg'; this.className = 'fixed-header-no-user'" title="{{userData.name}}" [ngClass]="( userImage.src.indexOf('/ibase/') > 0 ) ? 'fixed-header-user' : 'fixed-header-no-user' " #userImage/>
<img *ngIf="!userData" class="fixed-header-no-user img-user-32" src="user_32_32.svg"/>
<!--<md-icon class="example-icon">account_circle</md-icon>-->
</button>
......@@ -110,7 +110,7 @@ Overlay End -->
</span>
<span (click)="userAction();" [mdTooltip]="userToolTipText" [mdTooltipPosition]="'below'" >
<button md-button class="square-button">
<img *ngIf="userData" [src]="profileImageLink" onerror="this.src = '/ecm/assets/images/svg/user_32_32.svg'; this.className = 'fixed-header-no-user'" title="{{userData.name}}" [ngClass]="( userImage.src.indexOf('/ibase/') > 0 ) ? 'fixed-header-user' : 'fixed-header-no-user' " #userImage/>
<img *ngIf="userData" [src]="profileImageLink" onerror="this.src = hostUrl +'/ecm/assets/images/svg/user_32_32.svg'; this.className = 'fixed-header-no-user'" title="{{userData.name}}" [ngClass]="( userImage.src.indexOf('/ibase/') > 0 ) ? 'fixed-header-user' : 'fixed-header-no-user' " #userImage/>
<img *ngIf="!userData" class="fixed-header-no-user img-user-32" src="user_32_32.svg"/>
<!--<md-icon class="example-icon">account_circle</md-icon>-->
</button>
......
......@@ -11,6 +11,7 @@ import { EcmPanelComponent } from '../ecm-view/ecm-panel/ecm-panel.component';
import { ScrollService } from '../scroll.service';
import 'rxjs/add/operator/filter';
import { HostUrlService } from '../host-url.service';
//declare var initSearch: any;
declare var disableScroll: any;
......@@ -94,10 +95,13 @@ export class ECMHeaderComponent implements OnInit, OnDestroy {
cartCounter: number;
profileImageLink : string;
clientWidth: any;
constructor( @Inject( DOCUMENT ) private document: Document, private route: ActivatedRoute, private router: Router, private scroll_service: ScrollService, private store: Store<AppState>) { }
hostUrl;
constructor(public hostUrlService : HostUrlService, @Inject( DOCUMENT ) private document: Document, private route: ActivatedRoute, private router: Router, private scroll_service: ScrollService, private store: Store<AppState>) {
this.hostUrl=this.hostUrlService.hostUrl;
}
ngOnInit() {
console.log( 'ECMHeaderComponent onInit' );
console.log( 'ECMHeaderComponent onInit hostUrl' , this.hostUrl);
this.createUserData();
this.clientWidth = document.documentElement.clientWidth;
RESIZE_EVENT.subscribe(data => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment