[Library|Trunk]

apply in all pages domain and baseLink changes (part 4..)



git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59438 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-09-21 07:27:19 +00:00
parent 43ffddc480
commit 04ef1ba8cc
8 changed files with 23 additions and 18 deletions

View File

@ -362,7 +362,7 @@ export class ClaimContextSearchFormComponent {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.properties.domain + this.properties.baseLink + this.router.url
"redirectUrl": this.router.url
}
});
}

View File

@ -112,7 +112,7 @@ export class DivHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.properties.domain + this.properties.baseLink + this.router.url
"redirectUrl": this.router.url
}
});
} else {
@ -140,7 +140,7 @@ export class DivHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.properties.domain + this.properties.baseLink + this.router.url
"redirectUrl": this.router.url
}
});
} else {
@ -180,7 +180,7 @@ export class DivHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl":this.properties.domain + this.properties.baseLink + this.router.url
"redirectUrl": this.router.url
}
});
} else {
@ -246,7 +246,7 @@ export class DivHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl":this.properties.domain + this.properties.baseLink + this.router.url
"redirectUrl": this.router.url
}
});
} else {
@ -264,7 +264,7 @@ export class DivHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.properties.domain + this.properties.baseLink + this.router.url
"redirectUrl": this.router.url
}
});
} else {

View File

@ -10,6 +10,7 @@ import {Session} from '../../login/utils/helper.class';
import {LoginErrorCodes} from '../../login/utils/guardHelper.class';
import {HelperFunctions} from "../../utils/HelperFunctions.class";
import {Page} from "../../utils/entities/adminTool/page";
import {properties} from "../../../../environments/environment";
@Component({
selector: 'edit-page-help-content',
@ -97,7 +98,7 @@ export class EditPageHelpContentComponent implements OnInit, OnDestroy{
private getPageHelpContent(pageContentId: string) {
if(!Session.isLoggedIn()){
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.properties.baseLink + this.router.url} });
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
this.showLoading = true;
this.errorMessage = "";
@ -127,7 +128,7 @@ export class EditPageHelpContentComponent implements OnInit, OnDestroy{
public saveCustom() {
if(!Session.isLoggedIn()){
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.properties.baseLink + this.router.url} });
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
if(this.formComponent.myForm.valid) {
this.showLoading = true;

View File

@ -9,6 +9,7 @@ import {Session} from '../../login/utils/helper.class';
import {LoginErrorCodes} from '../../login/utils/guardHelper.class';
import {HelperFunctions} from "../../utils/HelperFunctions.class";
import {Page} from "../../utils/entities/adminTool/page";
import {properties} from "../../../../environments/environment";
@Component({
selector: 'new-page-help-content',
@ -78,7 +79,7 @@ export class NewPageHelpContentComponent {
public saveCustom() {
if(!Session.isLoggedIn()){
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.properties.baseLink + this.router.url} });
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
} else {
//this.errorMessage = null;

View File

@ -14,6 +14,7 @@ import {Session} from '../../login/utils/helper.class';
import {LoginErrorCodes} from '../../login/utils/guardHelper.class';
import {HelperFunctions} from "../../utils/HelperFunctions.class";
import {Subscriber} from "rxjs";
import {properties} from "../../../../environments/environment";
@Component({
selector: 'page-help-contents',
@ -104,7 +105,7 @@ export class PageHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.properties.baseLink + this.router.url
"redirectUrl": this.router.url
}
});
} else {
@ -132,7 +133,7 @@ export class PageHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.properties.baseLink + this.router.url
"redirectUrl": this.router.url
}
});
} else {
@ -172,7 +173,7 @@ export class PageHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.properties.baseLink + this.router.url
"redirectUrl": this.router.url
}
});
} else {
@ -242,7 +243,7 @@ export class PageHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.properties.baseLink + this.router.url
"redirectUrl": this.router.url
}
});
} else {
@ -260,7 +261,7 @@ export class PageHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.properties.baseLink + this.router.url
"redirectUrl": this.router.url
}
});
} else {
@ -312,7 +313,7 @@ export class PageHelpContentsComponent implements OnInit {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl":this.properties.baseLink + this.router.url
"redirectUrl": this.router.url
}
});
} else {

View File

@ -7,6 +7,7 @@ import {RouterHelper} from '../utils/routerHelper.class';
import {EnvProperties} from '../utils/properties/env-properties';
import {UserManagementService} from "../services/user-management.service";
import {properties} from "../../../environments/environment";
@Component({
selector: 'user',
@ -114,7 +115,7 @@ export class UserComponent {
queryParams = splits[1];
}
}
Session.setReloadUrl(location.protocol + "//" + location.host, baseUrl, queryParams);
Session.setReloadUrl(properties.domain, properties.baseLink + baseUrl, queryParams);
}
console.log(Session.getReloadUrl());
window.location.href = this.properties.loginUrl;

View File

@ -5,6 +5,7 @@ import {User, Session} from './utils/helper.class';
import {RouterHelper} from '../utils/routerHelper.class';
import {StringUtils} from '../utils/string-utils.class';
import {EnvProperties} from '../utils/properties/env-properties';
import {properties} from "../../../environments/environment";
// declare var logoutClicked;
@Component({
@ -238,7 +239,7 @@ export class UserMiniComponent implements OnInit, OnChanges {
}
logIn() {
Session.setReloadUrl(location.protocol + "//" + location.host, this.redirectUrl, this.search);
Session.setReloadUrl(properties.domain, properties.baseLink + this.redirectUrl, this.search);
window.location.href = this.logInUrl;
}

View File

@ -32,7 +32,7 @@ export class ReloadComponent {
var paramsObject = ((URL["params"] && URL["params"] != null)? Session.getParamsObj(URL["params"]):null);
if(host == (location.protocol+"//"+location.host)){
let baseUrl = (document && document.getElementsByTagName('base'))?document.getElementsByTagName('base')[0].href.split(document.location.host)[1]:"/";
url = (baseUrl.length>1)?"/"+url.split(baseUrl)[1]:url;
url = (baseUrl.length>1 && url.indexOf(baseUrl)!=-1 )?("/"+url.split(baseUrl)[1]):url;
if(paramsObject && paramsObject != null){
Session.setReloadUrl("","","")
this._router.navigate([url],{ queryParams: paramsObject});