[Trunk|Library]
Search pages: remove logs fix issue in /search/find when switch access mode filter search all: don't hide number when change tabs deposit results add space between cards git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58348 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
059db9755b
commit
cad0fe9061
|
@ -131,7 +131,7 @@
|
|||
<!-- </mat-select>-->
|
||||
|
||||
<mat-form-field class="matSelectionFormField">
|
||||
<mat-label>Type AA</mat-label>
|
||||
<mat-label>Type</mat-label>
|
||||
<mat-select [(ngModel)]="entity.type" name="{{'select_type_'+entity.id}}"
|
||||
class="matSelection"
|
||||
[disableOptionCentering]="true"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</a>
|
||||
</div>
|
||||
|
||||
<ul class="uk-margin-top uk-list uk-margin ">
|
||||
<ul class="uk-margin-top uk-list uk-margin search-results ">
|
||||
<li *ngFor="let result of results" class="uk-animation-fade">
|
||||
<div class="uk-card uk-card-default uk-padding uk-card-hover">
|
||||
<result-preview [properties]="properties" [showOrganizations]="true"
|
||||
|
|
|
@ -116,7 +116,6 @@ export class CiteThisComponent {
|
|||
|
||||
|
||||
this.data = citationData;
|
||||
console.log(this.data)
|
||||
// console.log(this.data);
|
||||
|
||||
}
|
||||
|
|
|
@ -650,7 +650,6 @@ export class ParsingFunctions {
|
|||
}
|
||||
references[citation.position - 1] = reference;
|
||||
});
|
||||
console.log(references);
|
||||
return references;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,16 +39,14 @@
|
|||
[class]="activeEntity == 'result'?'uk-active':''">
|
||||
<a>
|
||||
Research outcomes
|
||||
<span *ngIf="fetchPublications.searchUtils.status !=
|
||||
errorCodes.LOADING && fetchPublications.searchUtils.totalResults!=null">
|
||||
<span *ngIf=" fetchPublications.searchUtils.totalResults!=null">
|
||||
({{fetchPublications.searchUtils.totalResults | number}})</span>
|
||||
</a>
|
||||
</li>
|
||||
<li *ngIf="showProjects" (click)="entityChanged('projects')" [class]="activeEntity == 'projects'?'uk-active':''">
|
||||
<a>
|
||||
Projects
|
||||
<span *ngIf="fetchProjects.searchUtils.status !=
|
||||
errorCodes.LOADING && fetchProjects.searchUtils.totalResults!=null">
|
||||
<span *ngIf="fetchProjects.searchUtils.totalResults!=null">
|
||||
({{fetchProjects.searchUtils.totalResults | number}})</span>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -56,8 +54,7 @@
|
|||
[class]="activeEntity == 'datasources'?'uk-active':''">
|
||||
<a>
|
||||
Content Providers
|
||||
<span *ngIf="fetchDataproviders.searchUtils.status !=
|
||||
errorCodes.LOADING && fetchDataproviders.searchUtils.totalResults!=null">
|
||||
<span *ngIf="fetchDataproviders.searchUtils.totalResults!=null">
|
||||
({{fetchDataproviders.searchUtils.totalResults | number}})</span>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -65,8 +62,7 @@
|
|||
[class]="activeEntity == 'organizations'?'uk-active':''">
|
||||
<a>
|
||||
Organizations
|
||||
<span *ngIf="fetchOrganizations.searchUtils.status !=
|
||||
errorCodes.LOADING && fetchOrganizations.searchUtils.totalResults!=null">
|
||||
<span *ngIf="fetchOrganizations.searchUtils.totalResults!=null">
|
||||
({{fetchOrganizations.searchUtils.totalResults | number}})</span>
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -78,13 +78,6 @@ export class SearchAllComponent {
|
|||
public errorCodes: ErrorCodes = new ErrorCodes();
|
||||
public routerHelper: RouterHelper = new RouterHelper();
|
||||
|
||||
public publicationsSize: any = null;
|
||||
public datasetsSize: any = null;
|
||||
public softwareSize: any = null;
|
||||
public oprsSize: any = null;
|
||||
public fundersSize: any = null;
|
||||
public projectsSize: any = null;
|
||||
public datasourcesSize: any = null;
|
||||
showPublications: boolean = false;
|
||||
showDatasets: boolean = false;
|
||||
showSoftware: boolean = false;
|
||||
|
@ -214,7 +207,7 @@ export class SearchAllComponent {
|
|||
this.reloadTabs();
|
||||
this.sub = this.route.queryParams.subscribe(params => {
|
||||
this.parameters = Object.assign({}, params);
|
||||
this.keyword = (params['keyword']) ? params['keyword'] : (params["q"] ? params["q"] : "");
|
||||
this.keyword = (params['keyword']) ? params['keyword'] : (params["q"] ? params["q"] : (params["f0"] && params["f0"] == "q" && params["fv0"]?params["fv0"]:""));
|
||||
this.selectedFields[0].value = this.keyword;
|
||||
this.quickFilter.selected = ((params['qf']== undefined || params["qf"] == "true") == true);
|
||||
if (params["type"] && params["type"].length > 0) {
|
||||
|
@ -332,8 +325,8 @@ export class SearchAllComponent {
|
|||
delete this.parameters['q'];
|
||||
delete this.parameters['op'];
|
||||
} else {
|
||||
this.parameters["q"] = keyword;
|
||||
this.parameters["op"] = "and";
|
||||
this.parameters["fv0"] = keyword;
|
||||
this.parameters["f0"] = "q";
|
||||
}
|
||||
}
|
||||
private prepareResultParameters() {
|
||||
|
|
|
@ -125,7 +125,7 @@ export class SearchDataProvidersComponent {
|
|||
this.searchPage.keywordFields = this.searchFields.DEPOSIT_DATASOURCE_KEYWORD_FIELDS;
|
||||
this.searchPage.usedBy = "deposit";
|
||||
}
|
||||
console.log(this.refineFields)
|
||||
// console.log(this.refineFields)
|
||||
this.searchPage.prepareSearchPage(this.fieldIds, this.selectedFields, this.refineFields, [], this.fieldIdsMap,this.customFilter,params, "dataprovider");
|
||||
this.getResults(this.searchPage.getSearchAPIQueryForAdvancedSearhFields(), this.searchUtils.page, this.searchUtils.size, refine, this.searchPage.getSearchAPIQueryForRefineFields(params, firstLoad));
|
||||
});
|
||||
|
@ -164,7 +164,7 @@ export class SearchDataProvidersComponent {
|
|||
data => {
|
||||
this.searchUtils.totalResults = data[0];
|
||||
this.results = data[1];
|
||||
console.log(this.results);
|
||||
//console.log(this.results);
|
||||
if (refine) {
|
||||
this.filters = this.searchPage.prepareFiltersToShow((this.type=="all" || this.type == "deposit")?data[2]:this.filters);
|
||||
}else{
|
||||
|
|
|
@ -92,7 +92,6 @@ export class SearchResearchResultsComponent {
|
|||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.quickFilter);
|
||||
//TODO add checks about which result types are enabled!
|
||||
this.route.data.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.properties = data.envSpecific;
|
||||
|
|
|
@ -132,7 +132,7 @@
|
|||
<form class=" uk-margin-medium-bottom uk-margin-top ">
|
||||
<div class="uk-grid uk-margin-small-left">
|
||||
<div
|
||||
[class]="((entitiesSelection)?'':'uk-width-medium@m uk-width-small@s')+' uk-margin-small-top uk-padding-remove-left'">
|
||||
[class]="((entitiesSelection)?'':'uk-width-small@s')+' uk-margin-small-top uk-padding-remove-left'">
|
||||
<entities-selection *ngIf="entitiesSelection" [simpleView]="true" [currentEntity]="entityType"
|
||||
[properties]="properties"
|
||||
(selectionChange)=" simpleEntityChanged($event)"
|
||||
|
|
|
@ -4,7 +4,6 @@ import {SearchFields} from "../../utils/properties/searchFields";
|
|||
export class DatasourcesHelperClass {
|
||||
|
||||
public static getrefineFields(type: "all" | "registries" | "journals" | "compatible" | "deposit") {
|
||||
console.log("Get RF "+ type)
|
||||
let searchFields:SearchFields = new SearchFields();
|
||||
if (type == "registries") {
|
||||
return searchFields.ENTITY_REGISTRIES_FIELDS;
|
||||
|
|
|
@ -659,13 +659,13 @@ export class NewSearchPageComponent {
|
|||
}
|
||||
} else {
|
||||
if (this.selectedFields[i].id == "q") {
|
||||
console.log(this.selectedFields[i].value)
|
||||
// console.log(this.selectedFields[i].value)
|
||||
var op = "";
|
||||
var doisParams = "";
|
||||
if ((this.entityType == 'publication' || this.entityType == 'dataset' || this.entityType == 'software' || this.entityType == 'other' || this.entityType == "result")) {
|
||||
var DOIs: Identifier[] = Identifier.getIdentifiersFromString(this.selectedFields[i].value);
|
||||
for (let identifier of DOIs) {
|
||||
console.log(identifier)
|
||||
// console.log(identifier)
|
||||
// pidclassid exact \"doi\" and pid exact \"10.1016/j.nima.2015.11.134\"
|
||||
//and (authorid exact \"0000-0001-7291-3210 \" )"
|
||||
if(identifier.class == "ORCID"){
|
||||
|
@ -681,8 +681,8 @@ export class NewSearchPageComponent {
|
|||
params += this.createQuotedKeywordQuery(this.selectedFields[i].value, this.selectedFields[i].id, this.selectedFields[i].operatorId,countParams,true);
|
||||
}
|
||||
//TODO deposit case
|
||||
console.log(this.usedBy)
|
||||
console.log(this.keywordFields)
|
||||
// console.log(this.usedBy)
|
||||
// console.log(this.keywordFields)
|
||||
|
||||
if(this.usedBy == "deposit") {
|
||||
|
||||
|
@ -719,8 +719,8 @@ export class NewSearchPageComponent {
|
|||
if (this.customFilter) {
|
||||
params += (countParams == 0 ? "" : " and ") + this.customFilter.queryFieldName + " exact " + StringUtils.quote((this.customFilter.valueId));
|
||||
}
|
||||
console.log("ParameterS:")
|
||||
console.log(params)
|
||||
// console.log("ParameterS:")
|
||||
// console.log(params)
|
||||
return params;
|
||||
}
|
||||
|
||||
|
@ -787,7 +787,7 @@ export class NewSearchPageComponent {
|
|||
getSearchAPIQueryForRefineFields(URLparams, firstLoad: boolean) {
|
||||
|
||||
var allFqs = "";
|
||||
console.log(this.refineFields)
|
||||
// console.log(this.refineFields)
|
||||
for (var i = 0; i < this.refineFields.length; i++) {
|
||||
var filterId = this.refineFields[i];
|
||||
|
||||
|
@ -849,8 +849,8 @@ export class NewSearchPageComponent {
|
|||
} else if(this.entityType == "dataprovider") {
|
||||
allFqs += "&type=datasources";
|
||||
}
|
||||
console.log("AllFqs (check type): "+allFqs);
|
||||
console.log("type: "+this.entityType);
|
||||
// console.log("AllFqs (check type): "+allFqs);
|
||||
// console.log("type: "+this.entityType);
|
||||
// var keyword = URLparams['keyword'];
|
||||
// var doiQuery = "";
|
||||
// var keywordQuery = "";
|
||||
|
@ -1009,7 +1009,7 @@ export class NewSearchPageComponent {
|
|||
}
|
||||
|
||||
} else {
|
||||
console.log(this.selectedFields[i].value +" " + StringUtils.URIEncode(this.selectedFields[i].value))
|
||||
// console.log(this.selectedFields[i].value +" " + StringUtils.URIEncode(this.selectedFields[i].value))
|
||||
this.parameterValues.push(StringUtils.URIEncode(this.selectedFields[i].value));
|
||||
}
|
||||
}
|
||||
|
@ -1291,7 +1291,7 @@ export class NewSearchPageComponent {
|
|||
* @param quickFilter
|
||||
*/
|
||||
prepareSearchPage(fieldIds, selectedFields, refineFields, rangeFields, fieldIdsMap, customFilter, params, entityType, quickFilter=null){
|
||||
console.log(this.refineFields);
|
||||
// console.log(this.refineFields);
|
||||
this.entityType = entityType;
|
||||
this.fieldIds = fieldIds;
|
||||
this.selectedFields = selectedFields;
|
||||
|
|
|
@ -3,6 +3,8 @@ import {FormBuilder, FormGroup} from "@angular/forms";
|
|||
import {Filter} from "./searchHelperClasses.class";
|
||||
import {EnvProperties} from "../../utils/properties/env-properties";
|
||||
import {ConfigurationService} from "../../utils/configuration/configuration.service";
|
||||
import {Subject, Subscription} from "rxjs";
|
||||
import {debounceTime} from "rxjs/operators";
|
||||
|
||||
@Component({
|
||||
selector: 'quick-selections',
|
||||
|
@ -41,6 +43,8 @@ export class QuickSelectionsComponent implements OnChanges {
|
|||
showSoftware: boolean = false;
|
||||
showOrp: boolean = false;
|
||||
showEntities = false;
|
||||
resultTypesObs: Subscription ;
|
||||
private clicks = new Subject();
|
||||
constructor(private _fb: FormBuilder, private config: ConfigurationService) {
|
||||
|
||||
this.control = this._fb.group({
|
||||
|
@ -54,18 +58,21 @@ export class QuickSelectionsComponent implements OnChanges {
|
|||
|
||||
}
|
||||
|
||||
changed(typeChanged: boolean = true) {
|
||||
changed() {
|
||||
if (!this.initialized && this.isDisabled) {
|
||||
this.initialized = true;
|
||||
return;
|
||||
}
|
||||
this.clicks.next();
|
||||
}
|
||||
actuallyChanged(){
|
||||
|
||||
let value = this.control.getRawValue();
|
||||
this.resultTypes.publication = value.publication;
|
||||
this.resultTypes.dataset = value.dataset;
|
||||
this.resultTypes.software = value.software;
|
||||
this.resultTypes.other = value.other;
|
||||
// this.resultTypes.open = value.open;
|
||||
if (typeChanged && this.resultTypes && !this.resultTypes.publication && !this.resultTypes.dataset && !this.resultTypes.software && !this.resultTypes.other) {
|
||||
if (this.resultTypes && !this.resultTypes.publication && !this.resultTypes.dataset && !this.resultTypes.software && !this.resultTypes.other) {
|
||||
this.resultTypes.publication = true;
|
||||
this.resultTypes.dataset = true;
|
||||
this.resultTypes.software = true;
|
||||
|
@ -78,8 +85,8 @@ export class QuickSelectionsComponent implements OnChanges {
|
|||
quickFilterChanged() {
|
||||
let value = this.control.getRawValue();
|
||||
this.quickFilter.selected = value.QFselected;
|
||||
this.quickFilter.filter.countSelectedValues = 0;
|
||||
if(this.quickFilter.filter) {
|
||||
this.quickFilter.filter.countSelectedValues = 0;
|
||||
if (value.QFselected) {
|
||||
for (let filterValue of this.quickFilter.filter.values) {
|
||||
if((filterValue.name == this.quickFilter.value)) {
|
||||
|
@ -115,6 +122,10 @@ export class QuickSelectionsComponent implements OnChanges {
|
|||
this.showEntities = this.showPublications || this.showDatasets || this.showSoftware || this.showOrp;
|
||||
});
|
||||
}
|
||||
this.resultTypesObs = this.clicks.pipe(
|
||||
debounceTime(1000)
|
||||
).subscribe(e =>{this.actuallyChanged()} );
|
||||
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
|
|
|
@ -59,6 +59,7 @@ export class EnvironmentSpecificService {
|
|||
if (this.envSpecific === null || this.envSpecific === undefined) {
|
||||
var domain = this.getDomain();
|
||||
var location = this.getFullUrl();
|
||||
// location = "http://dl170.madgik.di.uoa.gr/monitor/assets/env-properties.json";
|
||||
// console.log('subscribeEnvironment: Loading '+ location);
|
||||
return this.http.get<EnvProperties>(location)
|
||||
.pipe(map((data) => {
|
||||
|
|
Loading…
Reference in New Issue