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