Linking: don't show modal when there are no additional paths
hide filter when there are no values available
This commit is contained in:
parent
561c15b8cd
commit
8ba0ce7730
|
@ -16,8 +16,7 @@
|
||||||
<button class="linking-add-button uk-icon-button-small" [class.uk-disabled]="(this.results.length>=basketLimit)" *ngIf="!isSelected(community.id)">
|
<button class="linking-add-button uk-icon-button-small" [class.uk-disabled]="(this.results.length>=basketLimit)" *ngIf="!isSelected(community.id)">
|
||||||
<icon name="add" [flex]="true"></icon>
|
<icon name="add" [flex]="true"></icon>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="isSelected(community.id)" class="linking-selected-button uk-icon-button-small"
|
<button *ngIf="isSelected(community.id)" class="linking-selected-button uk-icon-button-small">
|
||||||
(click)="openModal()">
|
|
||||||
<icon name="check" [flex]="true"></icon>
|
<icon name="check" [flex]="true"></icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -118,11 +118,10 @@ export class ClaimContextSearchFormComponent {
|
||||||
this.selectedCommunityLabel = communityLabel;
|
this.selectedCommunityLabel = communityLabel;
|
||||||
this.getCategories();
|
this.getCategories();
|
||||||
if (this.isSelected(communityId)) {
|
if (this.isSelected(communityId)) {
|
||||||
|
this.removeById(communityId);
|
||||||
} else {
|
} else {
|
||||||
this.addNewContext(communityLabel, null, {'id': communityId, 'label': communityLabel});
|
this.addNewContext(communityLabel, null, {'id': communityId, 'label': communityLabel});
|
||||||
}
|
}
|
||||||
this.openModal()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public openModal() {
|
public openModal() {
|
||||||
|
@ -217,11 +216,16 @@ export class ClaimContextSearchFormComponent {
|
||||||
} else {
|
} else {
|
||||||
if (this.categories[this.selectedCommunityId]) {
|
if (this.categories[this.selectedCommunityId]) {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
if(this.categories[this.selectedCommunityId].length > 0){
|
||||||
|
this.openModal()
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.subscriptions.push(this._contextService.getCategories(this.selectedCommunityId, this.properties.contextsAPI).subscribe(
|
this.subscriptions.push(this._contextService.getCategories(this.selectedCommunityId, this.properties.contextsAPI).subscribe(
|
||||||
data => {
|
data => {
|
||||||
|
if(data.length > 0){
|
||||||
|
this.openModal()
|
||||||
|
}
|
||||||
this.categories[this.selectedCommunityId] = data;
|
this.categories[this.selectedCommunityId] = data;
|
||||||
this.concepts = [];
|
this.concepts = [];
|
||||||
if (this.query !== "") {
|
if (this.query !== "") {
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngFor="let filter of openaireResultsfilters ">
|
<ng-container *ngFor="let filter of openaireResultsfilters ">
|
||||||
<div>
|
<div *ngIf="(filter.values.length != 0 )">
|
||||||
<dropdown-filter [count]="filter.countSelectedValues" [name]="filter.title"
|
<dropdown-filter [count]="filter.countSelectedValues" [name]="filter.title"
|
||||||
dropdownMinWidth="450">
|
dropdownMinWidth="450">
|
||||||
<div class="uk-padding-small">
|
<div class="uk-padding-small">
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
<div *ngIf="properties" class="uk-section uk-padding-remove-top">
|
<div *ngIf="properties" class="uk-section 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 basketContainer" *ngIf="showOptions.show!='claim'">
|
||||||
<div class="uk-width-2-3 uk-position-z-index">
|
<div class="uk-width-2-3 uk-position-z-index">
|
||||||
<div *ngIf="showOptions.show=='source'">
|
<div *ngIf="showOptions.show=='source'">
|
||||||
<claim-result-search-form [selectedResults]="sources" [properties]=properties
|
<claim-result-search-form [selectedResults]="sources" [properties]=properties
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- Basket-->
|
<!-- Basket-->
|
||||||
<div *ngIf="showOptions.show != 'claim'" class="uk-width-1-3">
|
<div *ngIf="showOptions.show != 'claim'" class="uk-width-1-3">
|
||||||
<div id="basket" uk-sticky=" offset: 220; top:#basketStickTop; bottom: #basketStickBottom; media: @m"
|
<div id="basket" uk-sticky=" offset: 220; top:#basketStickTop; end: .basketContainer; media: @m"
|
||||||
class="uk-card uk-card-default linkingBasket" style="z-index: 0!important;">
|
class="uk-card uk-card-default linkingBasket" style="z-index: 0!important;">
|
||||||
<div class="uk-card-body uk-padding-small">
|
<div class="uk-card-body uk-padding-small">
|
||||||
<div class="uk-margin-right">
|
<div class="uk-margin-right">
|
||||||
|
|
Loading…
Reference in New Issue