[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/",
|
||||
"statisticsAPIURL" : "https://beta.services.openaire.eu/stats-api/",
|
||||
"statisticsFrameAPIURL":"https://beta.openaire.eu/stats/",
|
||||
"statisticsFrameNewAPIURL": "",
|
||||
"statisticsFrameNewAPIURL": "http://marilyn.athenarc.gr:8080/stats-api/",
|
||||
"useNewStatistisTool":false,
|
||||
"claimsAPIURL" : "https://beta.services.openaire.eu/claims/rest/claimsService/",
|
||||
"searchAPIURLLAst" : "https://beta.services.openaire.eu/search/v2/api/",
|
||||
|
@ -53,7 +53,6 @@
|
|||
|
||||
"cacheUrl" :"https://demo.openaire.eu/cache/get?url=",
|
||||
|
||||
|
||||
"adminToolsAPIURL" :"https://beta.services.openaire.eu/uoa-admin-tools",
|
||||
|
||||
"adminToolsCommunity" :"connect",
|
||||
|
@ -97,6 +96,7 @@
|
|||
"searchLinkToAdvancedOrps" : "/search/advanced/other",
|
||||
"searchLinkToAdvancedDataProviders" : "/search/advanced/dataproviders",
|
||||
"searchLinkToAdvancedOrganizations" : "/search/advanced/organizations",
|
||||
|
||||
"sendMailUrl": "https://beta.services.openaire.eu/uoa-admin-tools/sendMail/",
|
||||
"notifyForNewManagers": "https://beta.services.openaire.eu/uoa-admin-tools/notifyForNewManagers/",
|
||||
"notifyForNewSubscribers": "https://beta.services.openaire.eu/uoa-admin-tools/notifyForNewSubscribers/",
|
||||
|
|
|
@ -101,10 +101,11 @@ export class AppComponent {
|
|||
}
|
||||
|
||||
public buildMenu(communityId: string) {
|
||||
var community = null;
|
||||
let community = null;
|
||||
this.community = null;
|
||||
this._communitiesService.getCommunitiesState().subscribe (
|
||||
communities => {
|
||||
|
||||
if(communities.length === 0 && communityId !== null && communityId !== '') {
|
||||
return;
|
||||
}
|
||||
|
@ -161,7 +162,10 @@ export class AppComponent {
|
|||
this.menuItems.push(
|
||||
{
|
||||
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){
|
||||
this.menuItems.push(
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-directLinking',
|
||||
template: `<directLinking [communityId]=communityId></directLinking>`
|
||||
selector: 'openaire-directLinking',
|
||||
template: `
|
||||
<directLinking [communityId]=communityId></directLinking>`
|
||||
})
|
||||
export class OpenaireDirectLinkingComponent {
|
||||
communityId:string;
|
||||
constructor (
|
||||
private route: ActivatedRoute,
|
||||
private _router: Router
|
||||
communityId: string;
|
||||
|
||||
) {
|
||||
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'];
|
||||
}
|
||||
});
|
||||
});
|
||||
constructor(private route: ActivatedRoute) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
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 {Observable} from 'rxjs/Observable';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
|
||||
@Component({
|
||||
|
@ -10,11 +9,7 @@ import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
|||
})
|
||||
export class OpenaireLinkingComponent {
|
||||
communityId:string;
|
||||
constructor (
|
||||
private route: ActivatedRoute,
|
||||
private _router: Router
|
||||
|
||||
) {
|
||||
constructor (private route: ActivatedRoute) {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: any }) => {
|
||||
this.route.queryParams.subscribe(
|
||||
|
|
|
@ -15,96 +15,92 @@ import {ConnectHelper} from '../openaireLibrary/connect/connectHelper';
|
|||
@Component({
|
||||
selector: 'openaire-user',
|
||||
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>
|
||||
<div *ngIf="!server" class=" uk-container uk-container-small uk-position-relative">
|
||||
<user [mainComponent]=false></user>
|
||||
<div *ngIf="!server" class=" uk-container uk-container-small uk-position-relative">
|
||||
|
||||
<div *ngIf="usercomponent.errorCode == '6'" class="uk-alert uk-alert-warning">
|
||||
|
||||
<span *ngIf="!isSubscribed">For this action you have to login and subscribe to research community.
|
||||
<span *ngIf="subscribe && !subscribeLoading ">Login and Subscribe <a
|
||||
[class]="'' + (subscribe.loading ? ' uk-disabled' : '')" (click)="subscribeTo()">here</a>.</span>
|
||||
<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="subscribe && !subscribeLoading "> <span *ngIf="!loggedIn">Login and </span>Subscribe <a [class]="'' + (subscribe.loading ? ' uk-disabled' : '')" (click)="subscribeTo()" > here</a>.</span>
|
||||
</span>
|
||||
<span *ngIf="subscribeLoading ">Subscribing to community....</span>
|
||||
<span *ngIf="subscribeError ">An error occured while trying to subscribe to community....</span>
|
||||
<span *ngIf="subscribeLoading ">Subscribing 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>
|
||||
<subscribe [communityId]="communityId" [showTemplate]=false class=""
|
||||
(subscribeEvent)="afterSubscibeEvent($event)"></subscribe>
|
||||
`
|
||||
<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>
|
||||
<subscribe [communityId]="communityId" [showTemplate]= false class="" (subscribeEvent)="afterSubscibeEvent($event)"></subscribe>
|
||||
`
|
||||
})
|
||||
|
||||
export class OpenaireUserComponent {
|
||||
@ViewChild(UserComponent) usercomponent: UserComponent;
|
||||
@ViewChild(SubscribeComponent) subscribe: SubscribeComponent;
|
||||
properties: EnvProperties;
|
||||
@ViewChild(UserComponent) usercomponent:UserComponent;
|
||||
@ViewChild(SubscribeComponent) subscribe:SubscribeComponent;
|
||||
properties:EnvProperties;
|
||||
communityId = null;
|
||||
subscribeLoading: boolean = false;
|
||||
subscribeError: boolean = false;
|
||||
isSubscribed: boolean = false;
|
||||
subscribeLoading:boolean = false;
|
||||
subscribeError:boolean = false;
|
||||
isSubscribed:boolean = false;
|
||||
public server: boolean = true;
|
||||
|
||||
loggedIn:boolean = false;
|
||||
constructor(private _subscribeService: SubscribeService,
|
||||
private _emailService: EmailService, private route: ActivatedRoute) {
|
||||
}
|
||||
|
||||
private _emailService: EmailService, private route: ActivatedRoute){}
|
||||
public ngOnInit() {
|
||||
if (typeof document !== 'undefined') {
|
||||
if( typeof document !== 'undefined') {
|
||||
this.server = false;
|
||||
this.loggedIn = Session.isLoggedIn();
|
||||
}
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: any }) => {
|
||||
this.route.queryParams.subscribe(
|
||||
communityId => {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||
if (!this.communityId) {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||
if(!this.communityId) {
|
||||
this.communityId = communityId['communityId'];
|
||||
}
|
||||
if(this.subscribe.subscribed){
|
||||
this.usercomponent.redirect();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
login() {
|
||||
}
|
||||
login(){
|
||||
this.usercomponent.logIn();
|
||||
|
||||
}
|
||||
|
||||
subscribeTo() {
|
||||
if (this.subscribe && this.communityId) {
|
||||
subscribeTo(){
|
||||
if(this.subscribe && this.communityId){
|
||||
this.subscribeLoading = true;
|
||||
this.subscribe.subscribe();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
afterSubscibeEvent($event) {
|
||||
afterSubscibeEvent($event){
|
||||
var res = $event.value;
|
||||
this.subscribeLoading = false;
|
||||
if (res == "ok") {
|
||||
this.isSubscribed = this.subscribe.subscribed;
|
||||
if(res == "ok"){
|
||||
this.isSubscribed = true;
|
||||
this.usercomponent.redirect();
|
||||
} else {
|
||||
}else{
|
||||
this.subscribeError = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
loginAndsubscribe() {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,6 +71,11 @@ export class SubscribeComponent {
|
|||
this._subscribeService.isSubscribedToCommunity(this.properties, this.communityId, email).subscribe (
|
||||
res => {
|
||||
this.subscribed = res;
|
||||
if(this.subscribed){
|
||||
this.subscribeEvent.emit({
|
||||
value: "ok"
|
||||
});
|
||||
}
|
||||
},
|
||||
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=",
|
||||
|
||||
"adminToolsAPIURL" :"http://mpagasas.di.uoa.gr:8080/uoa-admin-tools",
|
||||
"adminToolsAPIURL" :"http://duffy.di.uoa.gr:8080/uoa-admin-tools",
|
||||
|
||||
"adminToolsCommunity" :"connect",
|
||||
"datasourcesAPI": "https://beta.services.openaire.eu/openaire/ds/search/",
|
||||
|
@ -99,7 +99,6 @@
|
|||
"searchLinkToAdvancedOrps" : "/search/advanced/other",
|
||||
"searchLinkToAdvancedDataProviders" : "/search/advanced/dataproviders",
|
||||
"searchLinkToAdvancedOrganizations" : "/search/advanced/organizations",
|
||||
"searchLinkToAdvancedPeople" : "/search/advanced/people",
|
||||
|
||||
|
||||
"sendMailUrl": "http://scoobydoo.di.uoa.gr:8080/uoa-admin-tools/sendMail/",
|
||||
|
@ -116,5 +115,7 @@
|
|||
|
||||
"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-->
|
||||
<script>
|
||||
window.onerror = function (errorMsg, url, lineNumber, column, errorObj) {
|
||||
// console.log(errorMsg + " __" + url + " __" + lineNumber + " __" + column + " __" + errorObj);
|
||||
if((errorMsg && errorMsg.indexOf("uikit.js") != -1) || url.indexOf("uikit.js") != -1 ){
|
||||
window.onerror = function (errorMsg) {
|
||||
if(errorMsg !=null && (errorMsg.message && errorMsg.message.indexOf("uikit.js") != -1) || (errorMsg.url &&
|
||||
errorMsg.url.indexOf("uikit.js") != -1 )){
|
||||
console.log("********UIKIT Error ***********");
|
||||
$.getScript("assets/common-assets/common/uikit.min.js?v=1");
|
||||
$.getScript("assets/common-assets/common/uikit-icons.min.js?v=1");
|
||||
|
@ -69,9 +69,9 @@ $(document).ready(function(){
|
|||
|
||||
</script>
|
||||
|
||||
<link rel="stylesheet" href="assets/common-assets/common/theme.css">
|
||||
<link rel="stylesheet" href="assets/common-assets/common/custom.css">
|
||||
<link rel="stylesheet" href="assets/common-assets/library.css?v=3">
|
||||
<link rel="stylesheet" href="assets/common-assets/common/theme.css?v=1">
|
||||
<link rel="stylesheet" href="assets/common-assets/common/custom.css?v=1">
|
||||
<link rel="stylesheet" href="assets/common-assets/library.css?v=4">
|
||||
<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 */
|
||||
@import '~@angular/material/prebuilt-themes/indigo-pink.css';
|
||||
@import "~@angular/material/prebuilt-themes/indigo-pink.css";
|
||||
|
|
Loading…
Reference in New Issue