[Library|Trunk]
Dashboard sidebar: add input option for queryparamsHandling. Default is "" to keep the query params of current route "preserve" Parsing functions: parseTypes add a check if instance exist Search Filter: for radio button filters when value change countSelectedValues should be 0 or 1 git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59223 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
6ea9cce2a8
commit
405f5e6017
|
@ -16,7 +16,8 @@
|
|||
[class.act_section]="item.open"
|
||||
[title]="item.title"
|
||||
[class.submenu_trigger]="item.items.length > 1">
|
||||
<a *ngIf="item.items.length <= 1" [routerLink]="(item.route && !isTheActiveMenuItem(item))?item.route:null" [queryParams]=item.params>
|
||||
<a *ngIf="item.items.length <= 1" [routerLink]="(item.route && !isTheActiveMenuItem(item))?item.route:null"
|
||||
[queryParams]=item.params [queryParamsHandling]="queryParamsHandling">
|
||||
<span *ngIf="item.icon" class="menu_icon">
|
||||
<span [innerHTML]="satinizeHTML(item.icon)"></span>
|
||||
</span>
|
||||
|
@ -33,7 +34,8 @@
|
|||
<ul [style.display]="(item.open?'block':'none')">
|
||||
<ng-template ngFor [ngForOf]="item.items" let-subItem let-j="index">
|
||||
<li *ngIf="subItem.route" [class.act_item]="isTheActiveMenuItem(item, subItem)">
|
||||
<a [routerLink]="!isTheActiveMenuItem(item, subItem)?subItem.route:null" [queryParams]=subItem.params>
|
||||
<a [routerLink]="!isTheActiveMenuItem(item, subItem)?subItem.route:null"
|
||||
[queryParams]=subItem.params [queryParamsHandling]="queryParamsHandling">
|
||||
<span *ngIf="subItem.icon" class="menu_icon"><i class="material-icons">{{subItem.icon}}</i></span>
|
||||
<span class="menu_title">{{subItem.title}}</span>
|
||||
</a>
|
||||
|
|
|
@ -19,6 +19,7 @@ export class SideBarComponent implements OnInit {
|
|||
@Input() activeSubItem: string = '';
|
||||
@Input() searchLink = null;
|
||||
@Input() searchParams = {};
|
||||
@Input() queryParamsHandling = "";
|
||||
properties;
|
||||
constructor(private router: Router, private sanitizer: DomSanitizer) {
|
||||
this.properties = properties;
|
||||
|
|
|
@ -599,7 +599,7 @@ export class ParsingFunctions {
|
|||
}
|
||||
|
||||
parseTypes(types: string[], uniqueTypes: Set<string>, instance: any) {
|
||||
if (instance.hasOwnProperty("instancetype") && instance['instancetype'].classname) {
|
||||
if (instance && instance.hasOwnProperty("instancetype") && instance['instancetype'].classname) {
|
||||
if (!uniqueTypes.has(instance['instancetype'].classname)) {
|
||||
types.push(instance['instancetype'].classname);
|
||||
uniqueTypes.add(instance['instancetype'].classname);
|
||||
|
|
|
@ -107,9 +107,9 @@ export class SearchFilterComponent implements OnInit, OnChanges{
|
|||
value.selected = !tmp;
|
||||
|
||||
if(value.selected){
|
||||
this.filter.countSelectedValues++;
|
||||
this.filter.countSelectedValues = 1;
|
||||
}else{
|
||||
this.filter.countSelectedValues--;
|
||||
this.filter.countSelectedValues = 0;
|
||||
}
|
||||
|
||||
this.filter.values.forEach(value => {
|
||||
|
|
Loading…
Reference in New Issue