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)">
|
||||
<icon name="add" [flex]="true"></icon>
|
||||
</button>
|
||||
<button *ngIf="isSelected(community.id)" class="linking-selected-button uk-icon-button-small"
|
||||
(click)="openModal()">
|
||||
<button *ngIf="isSelected(community.id)" class="linking-selected-button uk-icon-button-small">
|
||||
<icon name="check" [flex]="true"></icon>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -118,11 +118,10 @@ export class ClaimContextSearchFormComponent {
|
|||
this.selectedCommunityLabel = communityLabel;
|
||||
this.getCategories();
|
||||
if (this.isSelected(communityId)) {
|
||||
|
||||
this.removeById(communityId);
|
||||
} else {
|
||||
this.addNewContext(communityLabel, null, {'id': communityId, 'label': communityLabel});
|
||||
}
|
||||
this.openModal()
|
||||
}
|
||||
|
||||
public openModal() {
|
||||
|
@ -217,11 +216,16 @@ export class ClaimContextSearchFormComponent {
|
|||
} else {
|
||||
if (this.categories[this.selectedCommunityId]) {
|
||||
this.loading = false;
|
||||
if(this.categories[this.selectedCommunityId].length > 0){
|
||||
this.openModal()
|
||||
}
|
||||
return;
|
||||
}
|
||||
this.subscriptions.push(this._contextService.getCategories(this.selectedCommunityId, this.properties.contextsAPI).subscribe(
|
||||
data => {
|
||||
|
||||
if(data.length > 0){
|
||||
this.openModal()
|
||||
}
|
||||
this.categories[this.selectedCommunityId] = data;
|
||||
this.concepts = [];
|
||||
if (this.query !== "") {
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
|
||||
</ng-container>
|
||||
<ng-container *ngFor="let filter of openaireResultsfilters ">
|
||||
<div>
|
||||
<div *ngIf="(filter.values.length != 0 )">
|
||||
<dropdown-filter [count]="filter.countSelectedValues" [name]="filter.title"
|
||||
dropdownMinWidth="450">
|
||||
<div class="uk-padding-small">
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<div *ngIf="properties" class="uk-section uk-padding-remove-top">
|
||||
<div [class]="((showOptions.show == 'claim')?'':' uk-margin-top ')+' uk-container uk-container-large '">
|
||||
<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 *ngIf="showOptions.show=='source'">
|
||||
<claim-result-search-form [selectedResults]="sources" [properties]=properties
|
||||
|
@ -66,7 +66,7 @@
|
|||
</div>
|
||||
<!-- Basket-->
|
||||
<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;">
|
||||
<div class="uk-card-body uk-padding-small">
|
||||
<div class="uk-margin-right">
|
||||
|
|
Loading…
Reference in New Issue