Merge remote-tracking branch 'origin/new-theme' into new-theme
This commit is contained in:
commit
d46b03c31a
|
@ -1,4 +1,4 @@
|
||||||
<div class="linking">
|
<div class="linking uk-background-default">
|
||||||
<div class="uk-container uk-container-large uk-section uk-section-small uk-padding-remove-bottom">
|
<div class="uk-container uk-container-large uk-section uk-section-small uk-padding-remove-bottom">
|
||||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>
|
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
<div>
|
<div>
|
||||||
<schema2jsonld *ngIf="url" [URL]="url" name="Link your {{openaireEntities.RESULTS}}" type="other"></schema2jsonld>
|
<schema2jsonld *ngIf="url" [URL]="url" name="Link your {{openaireEntities.RESULTS}}" type="other"></schema2jsonld>
|
||||||
<div [class]="((showOptions.show == 'claim')?'':' uk-margin-top ')+' uk-container uk-container-large '">
|
<div [class]="((showOptions.show == 'claim')?'':' uk-margin-top ')+' uk-container uk-container-large '">
|
||||||
<div *ngIf="properties" class="uk-section uk-section-default white-box-with-border uk-padding-small uk-padding-remove-top">
|
<div *ngIf="properties" class="uk-padding-small uk-padding-remove-top">
|
||||||
<div [class]="((showOptions.show == 'claim')?'':' uk-margin-top ')+' uk-container uk-container-large '">
|
<div [class]="((showOptions.show == 'claim')?'':' uk-margin-top ')+' uk-container uk-container-large '">
|
||||||
<div id="basketStickTop"></div>
|
<div id="basketStickTop"></div>
|
||||||
<div class="uk-grid" *ngIf="showOptions.show!='claim'">
|
<div class="uk-grid" *ngIf="showOptions.show!='claim'">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="uk-section uk-margin-small-top uk-padding-remove-top">
|
<div class="uk-section uk-margin-small-top uk-padding-remove-top">
|
||||||
<div class="uk-container uk-container-large">
|
<div class="uk-container uk-container-large">
|
||||||
<div *ngIf="properties" class="uk-section uk-section-default uk-padding-remove-top">
|
<div *ngIf="properties" class="uk-section uk-padding-remove-top">
|
||||||
<div class="uk-margin-top">
|
<div class="uk-margin-top">
|
||||||
<div class="uk-grid" uk-grid>
|
<div class="uk-grid" uk-grid>
|
||||||
<div class="uk-width-expand">
|
<div class="uk-width-expand">
|
||||||
|
|
|
@ -23,6 +23,44 @@ export class Layout {
|
||||||
variables['@general-search-form-background-position'] = options.backgrounds.form.position;
|
variables['@general-search-form-background-position'] = options.backgrounds.form.position;
|
||||||
variables['@base-body-background'] = options.backgrounds.light.color;
|
variables['@base-body-background'] = options.backgrounds.light.color;
|
||||||
}
|
}
|
||||||
|
if(options.buttons){
|
||||||
|
//general
|
||||||
|
variables['@button-border-width'] = options.buttons.lightBackground.borderWidth + "px";
|
||||||
|
variables['@button-border-radius'] = options.buttons.lightBackground.borderRadius + "px";
|
||||||
|
// default -> on dark background todo check again when we have sucj=h buttons
|
||||||
|
variables['@button-default-background'] = options.buttons.darkBackground.backgroundColor;
|
||||||
|
variables['@button-default-color'] = options.buttons.darkBackground.color;
|
||||||
|
variables['@button-default-border'] = options.buttons.darkBackground.borderColor;
|
||||||
|
variables['@button-default-hover-background'] = options.buttons.darkBackground.onHover.backgroundColor;
|
||||||
|
variables['@button-default-hover-color'] = options.buttons.darkBackground.onHover.color;
|
||||||
|
variables['@button-default-hover-border'] = options.buttons.darkBackground.onHover.borderColor;
|
||||||
|
variables['@button-default-active-background'] = options.buttons.darkBackground.onHover.backgroundColor;
|
||||||
|
variables['@button-default-active-color'] = options.buttons.darkBackground.onHover.color;
|
||||||
|
variables['@button-default-active-border'] = options.buttons.darkBackground.onHover.borderColor;
|
||||||
|
|
||||||
|
// primary
|
||||||
|
variables['@button-primary-background'] = options.buttons.lightBackground.backgroundColor;
|
||||||
|
variables['@button-primary-color'] = options.buttons.lightBackground.color;
|
||||||
|
variables['@button-primary-border'] = options.buttons.lightBackground.borderColor;
|
||||||
|
variables['@button-primary-hover-background'] = options.buttons.lightBackground.onHover.backgroundColor;
|
||||||
|
variables['@button-primary-hover-color'] = options.buttons.lightBackground.onHover.color;
|
||||||
|
variables['@button-primary-hover-border'] = options.buttons.lightBackground.onHover.borderColor;
|
||||||
|
variables['@button-primary-active-background'] = options.buttons.lightBackground.onHover.backgroundColor;
|
||||||
|
variables['@button-primary-active-color'] = options.buttons.lightBackground.onHover.color;
|
||||||
|
variables['@button-primary-active-border'] = options.buttons.lightBackground.onHover.borderColor;
|
||||||
|
|
||||||
|
// secondary
|
||||||
|
variables['@button-secondary-background'] = options.buttons.lightBackground.color;
|
||||||
|
variables['@button-secondary-color'] = options.buttons.lightBackground.backgroundColor;
|
||||||
|
variables['@button-secondary-border'] = options.buttons.lightBackground.backgroundColor;
|
||||||
|
variables['@button-secondary-hover-background'] = options.buttons.lightBackground.backgroundColor;
|
||||||
|
variables['@button-secondary-hover-color'] = options.buttons.lightBackground.color;
|
||||||
|
variables['@button-secondary-hover-border'] = options.buttons.lightBackground.borderColor;
|
||||||
|
variables['@button-secondary-active-background'] = options.buttons.lightBackground.backgroundColor;
|
||||||
|
variables['@button-secondary-active-color'] = options.buttons.lightBackground.color;
|
||||||
|
variables['@button-secondary-active-border'] = options.buttons.lightBackground.borderColor;
|
||||||
|
|
||||||
|
}
|
||||||
return variables;
|
return variables;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<div>
|
<div>
|
||||||
<div class = "uk-animation-fade filterItem searchFilterItem uk-text-small">
|
<div class = "uk-animation-fade filterItem searchFilterItem uk-text-small">
|
||||||
<div class="searchFilterBoxValues ">
|
<div class="searchFilterBoxValues ">
|
||||||
<form [class]="(isDisabled ? 'uk-disabled' : '') + ' uk-flex uk-flex-middle uk-flex-wrap'" [formGroup]="rangeForm" >
|
<form [class]="(isDisabled ? 'uk-disabled' : '') + ' uk-flex uk-flex-middle uk-flex-wrap'" [formGroup]="rangeForm">
|
||||||
<div input [formInput]="rangeForm.get('yearFrom')" [placeholder]="{label: 'e.g. ' + yearMin, static: true}"
|
<div input [formInput]="rangeForm.get('yearFrom')" [placeholder]="{label: 'e.g. ' + yearMin, static: true}"
|
||||||
inputClass="inner small" class=" uk-width-1-3"></div>
|
inputClass="inner small" class=" uk-width-1-3"></div>
|
||||||
<span class="uk-margin-small-left uk-margin-small-right">-</span>
|
<span class="uk-margin-small-left uk-margin-small-right">-</span>
|
||||||
|
|
|
@ -3,7 +3,7 @@ import {RangeFilter} from './rangeFilterHelperClasses.class';
|
||||||
import {Dates, StringUtils} from "../string-utils.class";
|
import {Dates, StringUtils} from "../string-utils.class";
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
import {properties} from "../../../../environments/environment";
|
import {properties} from "../../../../environments/environment";
|
||||||
import {FormBuilder} from "@angular/forms";
|
import {FormBuilder, FormGroup} from "@angular/forms";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'range-filter',
|
selector: 'range-filter',
|
||||||
|
@ -23,7 +23,7 @@ export class RangeFilterComponent {
|
||||||
public currentYear: number = Dates.currentYear;
|
public currentYear: number = Dates.currentYear;
|
||||||
public yearValidators = [StringUtils.inValidYearValidator(this.yearMin, this.yearMax)];
|
public yearValidators = [StringUtils.inValidYearValidator(this.yearMin, this.yearMax)];
|
||||||
public formValidators = [StringUtils.fromYearAfterToYearValidator];
|
public formValidators = [StringUtils.fromYearAfterToYearValidator];
|
||||||
public rangeForm;
|
public rangeForm: FormGroup;
|
||||||
|
|
||||||
@Output() onFilterChange = new EventEmitter();
|
@Output() onFilterChange = new EventEmitter();
|
||||||
@Input() actionRoute:boolean = false;
|
@Input() actionRoute:boolean = false;
|
||||||
|
@ -51,6 +51,8 @@ export class RangeFilterComponent {
|
||||||
if(yearsSelected != null) {
|
if(yearsSelected != null) {
|
||||||
this.filter.selectedFromValue = (this.currentYear - yearsSelected) + "";
|
this.filter.selectedFromValue = (this.currentYear - yearsSelected) + "";
|
||||||
this.filter.selectedToValue = this.currentYear + "";
|
this.filter.selectedToValue = this.currentYear + "";
|
||||||
|
this.rangeForm.get('yearFrom').setValue(this.filter.selectedFromValue);
|
||||||
|
this.rangeForm.get('yearTo').setValue(this.filter.selectedToValue);
|
||||||
} else {
|
} else {
|
||||||
this.filter.selectedFromValue = this.rangeForm.get('yearFrom').value;
|
this.filter.selectedFromValue = this.rangeForm.get('yearFrom').value;
|
||||||
this.filter.selectedToValue = this.rangeForm.get('yearTo').value;
|
this.filter.selectedToValue = this.rangeForm.get('yearTo').value;
|
||||||
|
@ -63,25 +65,26 @@ export class RangeFilterComponent {
|
||||||
clearFilter() {
|
clearFilter() {
|
||||||
this.filter.selectedFromValue = null;
|
this.filter.selectedFromValue = null;
|
||||||
this.filter.selectedToValue = null;
|
this.filter.selectedToValue = null;
|
||||||
|
this.rangeForm.get('yearFrom').setValue(this.filter.selectedFromValue);
|
||||||
|
this.rangeForm.get('yearTo').setValue(this.filter.selectedToValue);
|
||||||
|
console.log(this.rangeForm);
|
||||||
this.onFilterChange.emit({
|
this.onFilterChange.emit({
|
||||||
value: this.filter
|
value: this.filter
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
getFilterName(value){
|
getFilterName(value){
|
||||||
let name = value.name +" ("+ value.number.format()+")";
|
return value.name + " (" + value.number.format() + ")";
|
||||||
return name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stringToNum(value: string): number {
|
stringToNum(value: string): number {
|
||||||
return +(value);
|
return +(value);
|
||||||
}
|
}
|
||||||
getFilterUrl(year:number, selected:boolean){
|
|
||||||
return properties.baseLink + (this._router.url.indexOf('year=range') == -1 ? this._router.url: (this._router.url.split("year=range"+this.filter.selectedFromValue+':'+this.filter.selectedToValue).join(''))) + (selected ? '' : (this._router.url.indexOf('?')!=-1?'&':'?') +'year=range'+(this.currentYear - year) + ':'+ this.currentYear);
|
|
||||||
}
|
|
||||||
getRoute(){
|
getRoute(){
|
||||||
return properties.baseLink + this._router.url.split("?")[0];
|
return properties.baseLink + this._router.url.split("?")[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
getParams(year:number, selected:boolean){
|
getParams(year:number, selected:boolean){
|
||||||
let params = Object.assign({}, this.queryParams);
|
let params = Object.assign({}, this.queryParams);
|
||||||
if(!selected){
|
if(!selected){
|
||||||
|
|
Loading…
Reference in New Issue