[Connect|Trunk]
Server.ts: allow iframes from d4science.org index.html: clean up js files git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@58821 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
65974a5f8d
commit
c012de18c2
|
@ -66,13 +66,13 @@ app.set('view engine', 'html');
|
|||
app.set('views', join(DIST_FOLDER, 'browser'));
|
||||
// Allow frames from specific domains
|
||||
app.use(function (req, res, next) {
|
||||
var XFRAME_WHITELIST = [ 'http://scoobydoo.di.uoa.gr/frames.html', 'http://scoobydoo.di.uoa.gr:5000/customize-layout', 'https://beta.admin.connect.openaire.eu/customize-layout','https://admin.connect.openaire.eu/customize-layout' ];
|
||||
var XFRAME_WHITELIST = [ 'http://scoobydoo.di.uoa.gr:5000/customize-layout', 'https://beta.admin.connect.openaire.eu/customize-layout','https://admin.connect.openaire.eu/customize-layout' ];
|
||||
let referer:string;
|
||||
if(req.headers.referer){
|
||||
referer = isArray(req.headers.referer)?req.headers.referer[0]:req.headers.referer;
|
||||
referer = referer.split("?")[0];
|
||||
}
|
||||
if ( referer && XFRAME_WHITELIST.indexOf(referer) != -1 ) {
|
||||
if ( referer && (XFRAME_WHITELIST.indexOf(referer) != -1 || referer.indexOf(".d4science.org") != -1)) {
|
||||
// res.header('X-FRAME-OPTIONS', 'allow from ' +req.headers.referer);
|
||||
}else {
|
||||
res.header('X-FRAME-OPTIONS', 'SAMEORIGIN');
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
|
||||
<ng-template #tab_content
|
||||
let-resultType="resultType" let-fetch="fetch" let-searchLinkToAdvancedPage="searchLinkToAdvancedPage"
|
||||
let-params="params" let-type="type" let-typeName="typeName">
|
||||
let-params="params" let-type="type" let-typeName="typeName" let-showImpactFactors="showImpactFactors">
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
<div class="uk-width-expand uk-padding">
|
||||
<search-tab [fetch]="fetch" [resultType]="resultType" [params]="params"
|
||||
[searchLinkToAdvancedPage]="searchLinkToAdvancedPage" [properties]="properties">
|
||||
[searchLinkToAdvancedPage]="searchLinkToAdvancedPage" [properties]="properties" [showImpactFactors]="showImpactFactors" >
|
||||
</search-tab>
|
||||
</div>
|
||||
|
||||
|
@ -368,7 +368,7 @@
|
|||
resultType: 'publication', fetch: fetchPublications,
|
||||
searchLinkToAdvancedPage: properties.searchLinkToAdvancedResults,
|
||||
params: getParamsForSearchLink('publications'),
|
||||
type: 'publication', typeName: 'publication'}">
|
||||
type: 'publication', typeName: 'publication', showImpactFactors:(community.communityId == 'elixir-gr')}">
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
<ng-template #datasets_tab>
|
||||
|
@ -376,7 +376,7 @@
|
|||
resultType: 'dataset', fetch: fetchDatasets,
|
||||
searchLinkToAdvancedPage: properties.searchLinkToAdvancedResults,
|
||||
params: getParamsForSearchLink('datasets'),
|
||||
type: 'dataset', typeName: 'research data'}">
|
||||
type: 'dataset', typeName: 'research data', showImpactFactors:(community.communityId == 'elixir-gr')}">
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
<ng-template #software_tab>
|
||||
|
@ -384,7 +384,7 @@
|
|||
resultType: 'software', fetch: fetchSoftware,
|
||||
searchLinkToAdvancedPage: properties.searchLinkToAdvancedResults,
|
||||
params: getParamsForSearchLink('software'),
|
||||
type: 'software', typeName: 'software'}">
|
||||
type: 'software', typeName: 'software', showImpactFactors:(community.communityId == 'elixir-gr')}">
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
<ng-template #other_tab>
|
||||
|
@ -392,7 +392,7 @@
|
|||
resultType: 'other', fetch: fetchOrps,
|
||||
searchLinkToAdvancedPage: properties.searchLinkToAdvancedResults,
|
||||
params: getParamsForSearchLink('other'),
|
||||
type: 'orp', typeName: 'other products'}">
|
||||
type: 'orp', typeName: 'other products', showImpactFactors:(community.communityId == 'elixir-gr')}">
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
<ng-template #analytics_tab>
|
||||
|
|
|
@ -5,7 +5,7 @@ import {PiwikHelper} from "../../utils/piwikHelper";
|
|||
|
||||
@Component({
|
||||
selector: 'openaire-publication',
|
||||
template: `<result-landing type="result" [activeTab]="'References'" [piwikSiteId]="piwikSiteId" [communityId]="communityId"></result-landing>`,
|
||||
template: `<result-landing type="result" [piwikSiteId]="piwikSiteId" [communityId]="communityId"></result-landing>`,
|
||||
})
|
||||
export class OpenaireResultComponent{
|
||||
piwikSiteId = null;
|
||||
|
|
|
@ -1,112 +0,0 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
import {CommunityInfo} from '../../openaireLibrary/connect/community/communityInfo';
|
||||
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
|
||||
import {SearchResult} from "../../openaireLibrary/utils/entities/searchResult";
|
||||
|
||||
@Component({
|
||||
selector: 'results-comp',
|
||||
template: `
|
||||
<div class="tab-header">Recent {{getEntityName(resultType, true, true)}}</div>
|
||||
<div *ngIf="!results && total != 0">
|
||||
<div *ngIf="showLoading" class="uk-animation-fade uk-width-1-1" role="alert"><span class="loading-gif uk-align-center"></span></div>
|
||||
</div>
|
||||
<div *ngIf="results != null && results.length > 0">
|
||||
<div class="uk-text-right">
|
||||
<div>
|
||||
<a class="el-content uk-button uk-button-text" [queryParams]="{type:getresultTypeLink(resultType, true), qf:false}" routerLinkActive="router-link-active" [routerLink]="properties.searchLinkToResults">
|
||||
View all {{getEntityName(resultType, true, true)}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="results != null && results.length > 0 && !showLoading">
|
||||
<!--<div class="uk-margin-remove-vertical uk-grid-match uk-child-width-1-1 uk-child-width-1-1@m uk-child-width-1-1@l uk-child-width-1-1@xl uk-grid-small uk-grid uk-grid-stack" uk-grid="">
|
||||
<li *ngFor="let item of results; let i = index">
|
||||
<div class="uk-first-column">
|
||||
<div class="el-item uk-panel">
|
||||
<h6 class="el-title uk-margin uk-h6 uk-text-primary uk-margin-remove-adjacent uk-margin-remove-bottom">
|
||||
<div *ngIf=" community != null && community.communityId != null">
|
||||
<a [queryParams]="getParamId(resultType,item.id)" routerLinkActive="router-link-active" [routerLink]="'/search/'+getresultTypeLink(resultType, false)" >
|
||||
{{item.title}} </a>
|
||||
</div>
|
||||
|
||||
</h6>
|
||||
<div *ngIf="item.accessRights" class="el-content"><span class=" uk-label label-{{item.accessRights}}">{{item.accessRights}}</span><br></div>
|
||||
<div>
|
||||
<span *ngIf="item.authors != null">
|
||||
<span class="el-meta uk-margin uk-text-meta" *ngFor='let author of item.authors; let i = index'>
|
||||
<span *ngIf="i < 10">
|
||||
<span>{{author}}<span *ngIf="i < (item.authors.length-1)">;</span></span>
|
||||
</span>
|
||||
<span *ngIf="i == 10">...</span>
|
||||
</span>
|
||||
</span>
|
||||
<span *ngIf="item.year !=''" class="el-meta uk-text-meta"> ({{item.year}}) </span>
|
||||
</div>
|
||||
<div class="text-justify descriptionText"> {{item.description}} </div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</div>-->
|
||||
<search-result [results]="results"
|
||||
[type]="resultType" [properties] = properties class="communityRecentResults" [showImpactFactors]="(community.communityId == 'elixir-gr')" >
|
||||
</search-result>
|
||||
</div>
|
||||
<div *ngIf="results != null && results.length > 0">
|
||||
<div class="uk-text-right">
|
||||
<div>
|
||||
<a class="el-content uk-button uk-button-text" [queryParams]="{type:getresultTypeLink(resultType, true), qf:false}" routerLinkActive="router-link-active" [routerLink]="properties.searchLinkToResults">
|
||||
View all {{getEntityName(resultType, true, true)}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="results != null && results.length == 0 || total == 0" class=" uk-alert uk-alert-primary"> No results available </div>
|
||||
|
||||
`
|
||||
|
||||
})
|
||||
|
||||
export class ResultsComponent {
|
||||
|
||||
@Input() public results : SearchResult[];
|
||||
@Input() public resultType: string;
|
||||
@Input() public params: any;
|
||||
@Input() public community: CommunityInfo;
|
||||
@Input() public total: any;
|
||||
@Input() showLoading: boolean = true;
|
||||
@Input() properties: EnvProperties;
|
||||
|
||||
getresultTypeLink(type:string, plural:boolean){
|
||||
if((type == "publication" || type == "dataset") && plural){
|
||||
return type + "s";
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
public getEntityName(entityType: string, plural: boolean, full: boolean): string {
|
||||
if (entityType == "publication") {
|
||||
return "publication" + (plural ? "s" : "");
|
||||
} else if (entityType == "dataset") {
|
||||
return (full ? "research data" : ("dataset" + (plural ? "s" : "")));
|
||||
} else if (entityType == "software") {
|
||||
return "software";
|
||||
} else if (entityType == "other") {
|
||||
return (full ? ("other research product" + (plural ? "s" : "")) : "other");
|
||||
} else if (entityType == "result") {
|
||||
return (full ? ("research outcome" + (plural ? "s" : "")) : "result");
|
||||
}
|
||||
}
|
||||
/* getParamId(type:string){
|
||||
let param ="";
|
||||
if(type == "publication"){
|
||||
param="article";
|
||||
}else if(type == "other"){
|
||||
param="other";
|
||||
}else{
|
||||
param=type;
|
||||
}
|
||||
return param+"Id";
|
||||
}*/
|
||||
}
|
|
@ -11,6 +11,7 @@
|
|||
"statisticsFrameAPIURL":"https://beta.openaire.eu/stats/",
|
||||
"statisticsFrameNewAPIURL": "https://stats.madgik.di.uoa.gr/stats-api/",
|
||||
"useNewStatistisTool":true,
|
||||
"impactFactorsAPIURL" :"https://bip-api.imsi.athenarc.gr/paper/scores/batch/",
|
||||
"claimsAPIURL" : "http://dl170.madgik.di.uoa.gr:8180/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/",
|
||||
"searchAPIURLLAst" : "https://beta.services.openaire.eu/search/v2/api/",
|
||||
"searchResourcesAPIURL" : "https://beta.services.openaire.eu/search/v2/api/resources",
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en-gb" dir="ltr" vocab="http://schema.org/">
|
||||
<head>
|
||||
<!--link href="http://demo.openaire.eu" rel="canonical" /-->
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<base href="/" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="description" content="OpenAIRE Connect, Connect,Community Dashboard, communities, open access, research, projects "/>
|
||||
|
||||
<meta name="google-site-verification" content="rZ-58gIX8IqzBte6Qv4J5yY9aSiDP15Dfc1Yr9yezqE" />
|
||||
|
||||
<meta property="og:description" content="OpenAIRE Connect, Connect,Community Dashboard, communities, open access, research, projects"/>
|
||||
<meta property="og:title" content="OpenAIRE - Connect "/>
|
||||
|
@ -41,40 +40,25 @@
|
|||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<!--title>OpenAIRE Connect</title-->
|
||||
<script src="assets/common-assets/common/jquery.js"></script>
|
||||
<script src="assets/common-assets/common/uikit.min.js?v=1"></script>
|
||||
<script src="assets/common-assets/common/uikit-icons.min.js?v=1"></script>
|
||||
<script href="https://cdn.ckeditor.com/4.5.11/full-all/ckeditor.js"></script>
|
||||
<script>
|
||||
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 ***********");
|
||||
$(document).ready(function(){
|
||||
console.log("Is ready - load uikit ***")
|
||||
$.getScript("assets/common-assets/common/uikit.min.js?v=1");
|
||||
$.getScript("assets/common-assets/common/uikit-icons.min.js?v=1");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="assets/common-assets/common/jquery.js"></script>
|
||||
<script src="assets/common-assets/citeproc.js"></script>
|
||||
<script src="assets/common-assets/common/uikit.min.js?v=1"></script>
|
||||
<script src="assets/common-assets/common/uikit-icons.min.js?v=1"></script>
|
||||
<script src="https://cdn.ckeditor.com/4.5.11/full-all/ckeditor.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
console.log("Is ready - load uikit ***")
|
||||
$.getScript("assets/common-assets/common/uikit.min.js?v=1");
|
||||
$.getScript("assets/common-assets/common/uikit-icons.min.js?v=1");
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<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=7">
|
||||
<link id="customCss" rel="stylesheet" href="">
|
||||
<script src="assets/common-assets/clipboard.min.js"></script>
|
||||
<link id="customCss" rel="stylesheet" href="">
|
||||
<!-- <script src="assets/common-assets/clipboard.min.js"></script>-->
|
||||
|
||||
|
||||
</head>
|
||||
|
@ -116,8 +100,5 @@ $(document).ready(function(){
|
|||
}
|
||||
|
||||
</script>
|
||||
<!-- Go to www.addthis.com/dashboard to customize your tools -->
|
||||
<!-- to update addThis: https://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-559d24521cd8c080-->
|
||||
<!--<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-559d24521cd8c080"></script>-->
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue