Commit b384671c authored by prumde's avatar prumde

Minor changes


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@174332 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 421e877c
......@@ -2,5 +2,6 @@
width: 100%;
height: auto;
padding-bottom: 100px;
padding-bottom: 50px;
background-color: #FFF;
}
\ No newline at end of file
......@@ -8,7 +8,7 @@ import { Component, OnInit, Input } from '@angular/core';
export class ECMContentComponent implements OnInit {
constructor() { }
ngOnInit() {
console.log(' ECMContentComponent onInit scroll to window at ###:' + document.body.scrollHeight );
console.log('ECMContentComponent onInit');
}
}
......@@ -8,7 +8,7 @@ import { Component, OnInit } from '@angular/core';
export class ECMFooterComponent implements OnInit {
constructor() { }
ngOnInit() {
console.log(' ECMFooterComponent onInit scroll to window at ###:' + document.body.scrollHeight );
console.log(' ECMFooterComponent onInit ');
}
}
......@@ -65,19 +65,19 @@ import { DOCUMENT } from '@angular/platform-browser';
export class ECMHeaderComponent implements OnInit, AfterViewChecked, OnDestroy {
@Input() headerFadeState = 'false';
isScrollTopDone: boolean = false;
scrollTop: number;
userData: any;
constructor(@Inject(DOCUMENT) private document: Document) { }
ngOnInit() {
console.log(' ECMHeaderComponent onInit ###:' + document.body.scrollHeight );
console.log('ECMHeaderComponent onInit' );
this.createUserData();
}
ngAfterViewChecked(){
console.log('ECMHeaderComponent ngAfterViewChecked');
/*
let currScrollTop: string = localStorage.getItem('currentScrollTop') ? localStorage.getItem('currentScrollTop') : '0';
let prevScrollHeight: string = localStorage.getItem('scrollHeight') ? localStorage.getItem('scrollHeight') : '0';
......@@ -89,10 +89,11 @@ export class ECMHeaderComponent implements OnInit, AfterViewChecked, OnDestroy {
window.scrollTo(0, currScrollTopNum);
this.isScrollTopDone = true;
}
*/
}
ngOnDestroy(){
console.log('ECMHeaderComponent onDestroyed setting document.body.scrollHeight : ' + document.body.scrollHeight);
localStorage.setItem('currentScrollTop', this.scrollTop + '');
console.log('ECMHeaderComponent onDestroyed');
//localStorage.setItem('currentScrollTop', this.scrollTop + '');
}
createUserData(){
......@@ -134,8 +135,9 @@ export class ECMHeaderComponent implements OnInit, AfterViewChecked, OnDestroy {
this.headerFadeState = 'false';
}
console.log('headerFadeState[' + this.headerFadeState + ']' + document.body.scrollHeight );
this.scrollTop = scrollTop;
localStorage.setItem('scrollHeight', document.body.scrollHeight + '');
//console.log('headerFadeState[' + this.headerFadeState + ']' + scrollTop );
localStorage.setItem('scrollTop', scrollTop + '');
//this.scrollTop = scrollTop;
//localStorage.setItem('scrollHeight', document.body.scrollHeight + '');
}
}
import { Component, OnInit, OnDestroy, AfterViewChecked } from '@angular/core';
import { Router } from '@angular/router';
import { Router, ActivatedRoute } from '@angular/router';
import { JwtHelper } from 'angular2-jwt';
@Component({
......@@ -9,23 +9,24 @@ import { JwtHelper } from 'angular2-jwt';
})
export class ECMHomeComponent implements OnInit, OnDestroy, AfterViewChecked {
jwtHelper: JwtHelper = new JwtHelper();
constructor(private router: Router) { }
constructor(private router: Router, private route: ActivatedRoute) { }
ngOnInit() {
console.log(' ECMHomeComponent ngOnInit');
console.log( ' window.location[' + window.location + ' window.location.href [' + window.location.href + ']');
console.log(' ECMHomeComponent onInit scroll to window at ###:' + document.body.scrollHeight );
let appstateCahce: string = localStorage.getItem('appstate') ? localStorage.getItem('appstate') : 'no-appstate';
console.log(' ECMHomeComponent appstateCahce[' + appstateCahce + ']');
this.router.navigate(['/Home', {outlets:{content:['content']}}]);
this.router.navigate(['home', {relativeTo: this.route, outlets: {content: 'content'} }]);
if( appstateCahce !== 'undefined' && appstateCahce !== 'no-appstate' ){
this.goToLink(appstateCahce);
}
}
ngAfterViewChecked() {
let appstateCahce: string = localStorage.getItem('appstate') ? localStorage.getItem('appstate') : 'no-appstate';
/*
if ( appstateCahce === 'no-appstate' ) {
window.scrollBy(0, 1);
} else if ( appstateCahce !== 'undefined' && appstateCahce !== 'no-appstate' ) {
} else */if ( appstateCahce !== 'undefined' && appstateCahce !== 'no-appstate' ) {
this.goToLink(appstateCahce);
localStorage.setItem('appstate', 'undefined');
}
......
......@@ -5,7 +5,7 @@
}
.ecm-section-info {
padding: 10px;
max-width: 75rem;
max-width: 72rem;
margin-left: auto;
margin-right: auto;
}
......
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