[Connect|Trunk]
Merging branch newlinking into Trunk 55132:56708 git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@56715 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
8a4ea7d70e
commit
76ba5568b9
|
@ -8,7 +8,7 @@
|
||||||
"framesAPIURL" : "https://beta.openaire.eu/stats3/",
|
"framesAPIURL" : "https://beta.openaire.eu/stats3/",
|
||||||
"statisticsAPIURL" : "https://beta.services.openaire.eu/stats-api/",
|
"statisticsAPIURL" : "https://beta.services.openaire.eu/stats-api/",
|
||||||
"statisticsFrameAPIURL":"https://beta.openaire.eu/stats/",
|
"statisticsFrameAPIURL":"https://beta.openaire.eu/stats/",
|
||||||
"statisticsFrameNewAPIURL": "",
|
"statisticsFrameNewAPIURL": "http://marilyn.athenarc.gr:8080/stats-api/",
|
||||||
"useNewStatistisTool":false,
|
"useNewStatistisTool":false,
|
||||||
"claimsAPIURL" : "https://beta.services.openaire.eu/claims/rest/claimsService/",
|
"claimsAPIURL" : "https://beta.services.openaire.eu/claims/rest/claimsService/",
|
||||||
"searchAPIURLLAst" : "https://beta.services.openaire.eu/search/v2/api/",
|
"searchAPIURLLAst" : "https://beta.services.openaire.eu/search/v2/api/",
|
||||||
|
@ -53,7 +53,6 @@
|
||||||
|
|
||||||
"cacheUrl" :"https://demo.openaire.eu/cache/get?url=",
|
"cacheUrl" :"https://demo.openaire.eu/cache/get?url=",
|
||||||
|
|
||||||
|
|
||||||
"adminToolsAPIURL" :"https://beta.services.openaire.eu/uoa-admin-tools",
|
"adminToolsAPIURL" :"https://beta.services.openaire.eu/uoa-admin-tools",
|
||||||
|
|
||||||
"adminToolsCommunity" :"connect",
|
"adminToolsCommunity" :"connect",
|
||||||
|
@ -97,6 +96,7 @@
|
||||||
"searchLinkToAdvancedOrps" : "/search/advanced/other",
|
"searchLinkToAdvancedOrps" : "/search/advanced/other",
|
||||||
"searchLinkToAdvancedDataProviders" : "/search/advanced/dataproviders",
|
"searchLinkToAdvancedDataProviders" : "/search/advanced/dataproviders",
|
||||||
"searchLinkToAdvancedOrganizations" : "/search/advanced/organizations",
|
"searchLinkToAdvancedOrganizations" : "/search/advanced/organizations",
|
||||||
|
|
||||||
"sendMailUrl": "https://beta.services.openaire.eu/uoa-admin-tools/sendMail/",
|
"sendMailUrl": "https://beta.services.openaire.eu/uoa-admin-tools/sendMail/",
|
||||||
"notifyForNewManagers": "https://beta.services.openaire.eu/uoa-admin-tools/notifyForNewManagers/",
|
"notifyForNewManagers": "https://beta.services.openaire.eu/uoa-admin-tools/notifyForNewManagers/",
|
||||||
"notifyForNewSubscribers": "https://beta.services.openaire.eu/uoa-admin-tools/notifyForNewSubscribers/",
|
"notifyForNewSubscribers": "https://beta.services.openaire.eu/uoa-admin-tools/notifyForNewSubscribers/",
|
||||||
|
|
|
@ -101,10 +101,11 @@ export class AppComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
public buildMenu(communityId: string) {
|
public buildMenu(communityId: string) {
|
||||||
var community = null;
|
let community = null;
|
||||||
this.community = null;
|
this.community = null;
|
||||||
this._communitiesService.getCommunitiesState().subscribe (
|
this._communitiesService.getCommunitiesState().subscribe (
|
||||||
communities => {
|
communities => {
|
||||||
|
|
||||||
if(communities.length === 0 && communityId !== null && communityId !== '') {
|
if(communities.length === 0 && communityId !== null && communityId !== '') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -161,7 +162,10 @@ export class AppComponent {
|
||||||
this.menuItems.push(
|
this.menuItems.push(
|
||||||
{
|
{
|
||||||
rootItem: new MenuItem("link","Link","","/participate/claim",false,[],["/participate/claim"],this.properties.environment!="development"?{}:{communityId:community.communityId}),
|
rootItem: new MenuItem("link","Link","","/participate/claim",false,[],["/participate/claim"],this.properties.environment!="development"?{}:{communityId:community.communityId}),
|
||||||
items: []
|
items: [
|
||||||
|
new MenuItem("","Start linking","","/participate/claim",false,[],["/participate/claim"],this.properties.environment!="development"?{}:{communityId:community.communityId}),
|
||||||
|
new MenuItem("","Learn more",this.properties.claimsInformationLink,"",false,[],[],{})
|
||||||
|
]
|
||||||
});
|
});
|
||||||
if(isCommunityManager){
|
if(isCommunityManager){
|
||||||
this.menuItems.push(
|
this.menuItems.push(
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
import {Component, Input} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import {ActivatedRoute} from '@angular/router';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
|
||||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'openaire-directLinking',
|
selector: 'openaire-directLinking',
|
||||||
template: `<directLinking [communityId]=communityId></directLinking>`
|
template: `
|
||||||
|
<directLinking [communityId]=communityId></directLinking>`
|
||||||
})
|
})
|
||||||
export class OpenaireDirectLinkingComponent {
|
export class OpenaireDirectLinkingComponent {
|
||||||
communityId:string;
|
communityId: string;
|
||||||
constructor (
|
|
||||||
private route: ActivatedRoute,
|
|
||||||
private _router: Router
|
|
||||||
|
|
||||||
) {
|
constructor(private route: ActivatedRoute) {
|
||||||
this.route.data
|
|
||||||
.subscribe((data: { envSpecific: any }) => {
|
|
||||||
this.route.queryParams.subscribe(
|
|
||||||
communityId => {
|
|
||||||
this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
|
||||||
if(!this.communityId) {
|
|
||||||
this.communityId = communityId['communityId'];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ngOnInit() {
|
||||||
|
this.route.data
|
||||||
|
.subscribe((data: { envSpecific: any }) => {
|
||||||
|
this.route.queryParams.subscribe(
|
||||||
|
communityId => {
|
||||||
|
this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||||
|
if (!this.communityId) {
|
||||||
|
this.communityId = communityId['communityId'];
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import {Component, Input} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import {ActivatedRoute} from '@angular/router';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
|
||||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -10,11 +9,7 @@ import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||||
})
|
})
|
||||||
export class OpenaireLinkingComponent {
|
export class OpenaireLinkingComponent {
|
||||||
communityId:string;
|
communityId:string;
|
||||||
constructor (
|
constructor (private route: ActivatedRoute) {
|
||||||
private route: ActivatedRoute,
|
|
||||||
private _router: Router
|
|
||||||
|
|
||||||
) {
|
|
||||||
this.route.data
|
this.route.data
|
||||||
.subscribe((data: { envSpecific: any }) => {
|
.subscribe((data: { envSpecific: any }) => {
|
||||||
this.route.queryParams.subscribe(
|
this.route.queryParams.subscribe(
|
||||||
|
|
|
@ -15,96 +15,92 @@ import {ConnectHelper} from '../openaireLibrary/connect/connectHelper';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'openaire-user',
|
selector: 'openaire-user',
|
||||||
template: `
|
template: `
|
||||||
<div id="tm-main" class="uk-section uk-margin-small-top tm-middle">
|
<div id="tm-main" class="uk-section uk-margin-small-top tm-middle">
|
||||||
|
|
||||||
<user [mainComponent]=false></user>
|
<user [mainComponent]=false></user>
|
||||||
<div *ngIf="!server" class=" uk-container uk-container-small uk-position-relative">
|
<div *ngIf="!server" class=" uk-container uk-container-small uk-position-relative">
|
||||||
|
|
||||||
<div *ngIf="usercomponent.errorCode == '6'" class="uk-alert uk-alert-warning">
|
<div *ngIf="usercomponent.errorCode == '6' && !isSubscribed" class="uk-alert uk-alert-warning">
|
||||||
|
<span *ngIf="!isSubscribed ">For this action you have to <span *ngIf="!loggedIn">login and</span> subscribe to the research community.
|
||||||
<span *ngIf="!isSubscribed">For this action you have to login and subscribe to research community.
|
<span *ngIf="subscribe && !subscribeLoading "> <span *ngIf="!loggedIn">Login and </span>Subscribe <a [class]="'' + (subscribe.loading ? ' uk-disabled' : '')" (click)="subscribeTo()" > here</a>.</span>
|
||||||
<span *ngIf="subscribe && !subscribeLoading ">Login and Subscribe <a
|
|
||||||
[class]="'' + (subscribe.loading ? ' uk-disabled' : '')" (click)="subscribeTo()">here</a>.</span>
|
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="subscribeLoading ">Subscribing to community....</span>
|
<span *ngIf="subscribeLoading ">Subscribing to community....</span>
|
||||||
<span *ngIf="subscribeError ">An error occured while trying to subscribe to community....</span>
|
<span *ngIf="subscribeError ">An error occured while trying to subscribe to community....</span>
|
||||||
|
|
||||||
</div>
|
|
||||||
<div *ngIf="usercomponent.errorCode == '7'" class="uk-alert uk-alert-warning">
|
|
||||||
This action requires authentication.
|
|
||||||
<span *ngIf="!loggedIn">
|
|
||||||
Please <a class="" (click)="login()"> sign in</a> to continue.
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<subscribe [communityId]="communityId" [showTemplate]=false class=""
|
<div *ngIf="usercomponent.errorCode == '7'" class="uk-alert uk-alert-warning">
|
||||||
(subscribeEvent)="afterSubscibeEvent($event)"></subscribe>
|
This action requires authentication.
|
||||||
`
|
<span *ngIf="!loggedIn">
|
||||||
|
Please <a class="" (click)="login()" > sign in</a> to continue.
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<subscribe [communityId]="communityId" [showTemplate]= false class="" (subscribeEvent)="afterSubscibeEvent($event)"></subscribe>
|
||||||
|
`
|
||||||
})
|
})
|
||||||
|
|
||||||
export class OpenaireUserComponent {
|
export class OpenaireUserComponent {
|
||||||
@ViewChild(UserComponent) usercomponent: UserComponent;
|
@ViewChild(UserComponent) usercomponent:UserComponent;
|
||||||
@ViewChild(SubscribeComponent) subscribe: SubscribeComponent;
|
@ViewChild(SubscribeComponent) subscribe:SubscribeComponent;
|
||||||
properties: EnvProperties;
|
properties:EnvProperties;
|
||||||
communityId = null;
|
communityId = null;
|
||||||
subscribeLoading: boolean = false;
|
subscribeLoading:boolean = false;
|
||||||
subscribeError: boolean = false;
|
subscribeError:boolean = false;
|
||||||
isSubscribed: boolean = false;
|
isSubscribed:boolean = false;
|
||||||
public server: boolean = true;
|
public server: boolean = true;
|
||||||
|
loggedIn:boolean = false;
|
||||||
constructor(private _subscribeService: SubscribeService,
|
constructor(private _subscribeService: SubscribeService,
|
||||||
private _emailService: EmailService, private route: ActivatedRoute) {
|
private _emailService: EmailService, private route: ActivatedRoute){}
|
||||||
}
|
|
||||||
|
|
||||||
public ngOnInit() {
|
public ngOnInit() {
|
||||||
if (typeof document !== 'undefined') {
|
if( typeof document !== 'undefined') {
|
||||||
this.server = false;
|
this.server = false;
|
||||||
|
this.loggedIn = Session.isLoggedIn();
|
||||||
}
|
}
|
||||||
this.route.data
|
this.route.data
|
||||||
.subscribe((data: { envSpecific: any }) => {
|
.subscribe((data: { envSpecific: any }) => {
|
||||||
this.route.queryParams.subscribe(
|
this.route.queryParams.subscribe(
|
||||||
communityId => {
|
communityId => {
|
||||||
this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||||
if (!this.communityId) {
|
if(!this.communityId) {
|
||||||
this.communityId = communityId['communityId'];
|
this.communityId = communityId['communityId'];
|
||||||
}
|
}
|
||||||
|
if(this.subscribe.subscribed){
|
||||||
|
this.usercomponent.redirect();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
login() {
|
}
|
||||||
|
login(){
|
||||||
this.usercomponent.logIn();
|
this.usercomponent.logIn();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
subscribeTo(){
|
||||||
subscribeTo() {
|
if(this.subscribe && this.communityId){
|
||||||
if (this.subscribe && this.communityId) {
|
|
||||||
this.subscribeLoading = true;
|
this.subscribeLoading = true;
|
||||||
this.subscribe.subscribe();
|
this.subscribe.subscribe();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
afterSubscibeEvent($event){
|
||||||
afterSubscibeEvent($event) {
|
|
||||||
var res = $event.value;
|
var res = $event.value;
|
||||||
this.subscribeLoading = false;
|
this.subscribeLoading = false;
|
||||||
if (res == "ok") {
|
this.isSubscribed = this.subscribe.subscribed;
|
||||||
|
if(res == "ok"){
|
||||||
this.isSubscribed = true;
|
this.isSubscribed = true;
|
||||||
this.usercomponent.redirect();
|
this.usercomponent.redirect();
|
||||||
} else {
|
}else{
|
||||||
this.subscribeError = true;
|
this.subscribeError = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loginAndsubscribe() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,6 +71,11 @@ export class SubscribeComponent {
|
||||||
this._subscribeService.isSubscribedToCommunity(this.properties, this.communityId, email).subscribe (
|
this._subscribeService.isSubscribedToCommunity(this.properties, this.communityId, email).subscribe (
|
||||||
res => {
|
res => {
|
||||||
this.subscribed = res;
|
this.subscribed = res;
|
||||||
|
if(this.subscribed){
|
||||||
|
this.subscribeEvent.emit({
|
||||||
|
value: "ok"
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
this.handleError("Error getting response if email: "+email+" is subscribed to community with id: "+this.communityId, error);
|
this.handleError("Error getting response if email: "+email+" is subscribed to community with id: "+this.communityId, error);
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
|
|
||||||
"cacheUrl" :"http://scoobydoo.di.uoa.gr:3000/get?url=",
|
"cacheUrl" :"http://scoobydoo.di.uoa.gr:3000/get?url=",
|
||||||
|
|
||||||
"adminToolsAPIURL" :"http://mpagasas.di.uoa.gr:8080/uoa-admin-tools",
|
"adminToolsAPIURL" :"http://duffy.di.uoa.gr:8080/uoa-admin-tools",
|
||||||
|
|
||||||
"adminToolsCommunity" :"connect",
|
"adminToolsCommunity" :"connect",
|
||||||
"datasourcesAPI": "https://beta.services.openaire.eu/openaire/ds/search/",
|
"datasourcesAPI": "https://beta.services.openaire.eu/openaire/ds/search/",
|
||||||
|
@ -99,7 +99,6 @@
|
||||||
"searchLinkToAdvancedOrps" : "/search/advanced/other",
|
"searchLinkToAdvancedOrps" : "/search/advanced/other",
|
||||||
"searchLinkToAdvancedDataProviders" : "/search/advanced/dataproviders",
|
"searchLinkToAdvancedDataProviders" : "/search/advanced/dataproviders",
|
||||||
"searchLinkToAdvancedOrganizations" : "/search/advanced/organizations",
|
"searchLinkToAdvancedOrganizations" : "/search/advanced/organizations",
|
||||||
"searchLinkToAdvancedPeople" : "/search/advanced/people",
|
|
||||||
|
|
||||||
|
|
||||||
"sendMailUrl": "http://scoobydoo.di.uoa.gr:8080/uoa-admin-tools/sendMail/",
|
"sendMailUrl": "http://scoobydoo.di.uoa.gr:8080/uoa-admin-tools/sendMail/",
|
||||||
|
@ -116,5 +115,7 @@
|
||||||
|
|
||||||
"reCaptchaSiteKey": "6LcVtFIUAAAAAB2ac6xYivHxYXKoUvYRPi-6_rLu",
|
"reCaptchaSiteKey": "6LcVtFIUAAAAAB2ac6xYivHxYXKoUvYRPi-6_rLu",
|
||||||
|
|
||||||
"admins" : ["kostis30fylloy@gmail.com"]
|
"admins" : ["kostis30fylloy@gmail.com","argirok@di.uoa.gr"],
|
||||||
|
"lastIndexUpdate": "2019-05-16",
|
||||||
|
"indexInfoAPI": "http://beta.services.openaire.eu/openaire/info/"
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,9 +44,9 @@
|
||||||
|
|
||||||
<!--title>OpenAIRE Connect</title-->
|
<!--title>OpenAIRE Connect</title-->
|
||||||
<script>
|
<script>
|
||||||
window.onerror = function (errorMsg, url, lineNumber, column, errorObj) {
|
window.onerror = function (errorMsg) {
|
||||||
// console.log(errorMsg + " __" + url + " __" + lineNumber + " __" + column + " __" + errorObj);
|
if(errorMsg !=null && (errorMsg.message && errorMsg.message.indexOf("uikit.js") != -1) || (errorMsg.url &&
|
||||||
if((errorMsg && errorMsg.indexOf("uikit.js") != -1) || url.indexOf("uikit.js") != -1 ){
|
errorMsg.url.indexOf("uikit.js") != -1 )){
|
||||||
console.log("********UIKIT Error ***********");
|
console.log("********UIKIT Error ***********");
|
||||||
$.getScript("assets/common-assets/common/uikit.min.js?v=1");
|
$.getScript("assets/common-assets/common/uikit.min.js?v=1");
|
||||||
$.getScript("assets/common-assets/common/uikit-icons.min.js?v=1");
|
$.getScript("assets/common-assets/common/uikit-icons.min.js?v=1");
|
||||||
|
@ -69,9 +69,9 @@ $(document).ready(function(){
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<link rel="stylesheet" href="assets/common-assets/common/theme.css">
|
<link rel="stylesheet" href="assets/common-assets/common/theme.css?v=1">
|
||||||
<link rel="stylesheet" href="assets/common-assets/common/custom.css">
|
<link rel="stylesheet" href="assets/common-assets/common/custom.css?v=1">
|
||||||
<link rel="stylesheet" href="assets/common-assets/library.css?v=3">
|
<link rel="stylesheet" href="assets/common-assets/library.css?v=4">
|
||||||
<link rel="stylesheet" href="assets/connect-custom.css?v=5">
|
<link rel="stylesheet" href="assets/connect-custom.css?v=5">
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
/* You can add global styles to this file, and also import other style files */
|
/* You can add global styles to this file, and also import other style files */
|
||||||
@import '~@angular/material/prebuilt-themes/indigo-pink.css';
|
@import "~@angular/material/prebuilt-themes/indigo-pink.css";
|
||||||
|
|
Loading…
Reference in New Issue