Fix margins in subjects
This commit is contained in:
parent
ffa7ab71a0
commit
ced4fe404d
|
@ -1 +1 @@
|
||||||
Subproject commit bd87a47795f8f9243e0a1129d715fcb96cf9b714
|
Subproject commit c321390ccbbe72515f336830c3aa54e3156379ef
|
|
@ -2,14 +2,13 @@ import {ChangeDetectorRef, Component, OnDestroy, OnInit, ViewChild} from "@angul
|
||||||
import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
|
import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
|
||||||
import {AdvancedCriteriaService} from "./advanced-criteria.service";
|
import {AdvancedCriteriaService} from "./advanced-criteria.service";
|
||||||
import {Subscription} from "rxjs";
|
import {Subscription} from "rxjs";
|
||||||
import {ContentProvider, SelectionCriteria} from "../../openaireLibrary/utils/entities/contentProvider";
|
import {SelectionCriteria} from "../../openaireLibrary/utils/entities/contentProvider";
|
||||||
import {
|
import {
|
||||||
FullScreenModalComponent
|
FullScreenModalComponent
|
||||||
} from "../../openaireLibrary/utils/modal/full-screen-modal/full-screen-modal.component";
|
} from "../../openaireLibrary/utils/modal/full-screen-modal/full-screen-modal.component";
|
||||||
import {NotificationHandler} from "../../openaireLibrary/utils/notification-handler";
|
import {NotificationHandler} from "../../openaireLibrary/utils/notification-handler";
|
||||||
import {CriteriaComponent} from "../content-providers/criteria/criteria.component";
|
import {CriteriaComponent} from "../content-providers/criteria/criteria.component";
|
||||||
import {CriteriaUtils} from "../content-providers/criteria-utils";
|
import {CriteriaUtils} from "../content-providers/criteria-utils";
|
||||||
import {OpenaireEntities} from "../../openaireLibrary/utils/properties/searchFields";
|
|
||||||
import {CommunityInfo} from "../../openaireLibrary/connect/community/communityInfo";
|
import {CommunityInfo} from "../../openaireLibrary/connect/community/communityInfo";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<div page-content>
|
<div page-content>
|
||||||
<div actions class="uk-margin-top">
|
<div actions>
|
||||||
<div class="uk-section-xsmall">
|
<div class="uk-section-xsmall uk-margin-top">
|
||||||
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-middle uk-grid uk-margin-top" uk-grid>
|
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-middle uk-grid" uk-grid>
|
||||||
<div [disabled]="showLoading" search-input class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"
|
<div [disabled]="loading" search-input class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"
|
||||||
[searchControl]="filterForm" [expandable]="true" placeholder="Search Subjects" searchInputClass="outer">
|
[searchControl]="filterForm" [expandable]="true" placeholder="Search Subjects" searchInputClass="outer">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button class="uk-button uk-button-default uk-flex uk-flex-middle"
|
<button class="uk-button uk-button-default uk-flex uk-flex-middle"
|
||||||
[disabled]="showLoading" [class.uk-disabled]="showLoading"
|
[disabled]="loading" [class.uk-disabled]="loading"
|
||||||
(click)="editAllSubjects()"
|
(click)="editAllSubjects()"
|
||||||
uk-tooltip="title:<div><div class='uk-margin-small-bottom uk-text-bold'>Add or edit subjects</div> All the research results associated to the subjects specified here will be automatically linked to the community dashboard in the next run of OpenAIRE workflows.</div>">
|
uk-tooltip="title:<div><div class='uk-margin-small-bottom uk-text-bold'>Add or edit subjects</div> All the research results associated to the subjects specified here will be automatically linked to the community dashboard in the next run of OpenAIRE workflows.</div>">
|
||||||
<span>Add/Edit Subjects</span>
|
<span>Add/Edit Subjects</span>
|
||||||
|
@ -18,10 +18,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div inner>
|
<div inner>
|
||||||
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
||||||
<div *ngIf="showLoading" class="uk-position-center">
|
<div *ngIf="loading" class="uk-position-center">
|
||||||
<loading></loading>
|
<loading></loading>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!showLoading">
|
<div *ngIf="!loading">
|
||||||
<div *ngIf="displayedSubjects?.length == 0 && displayedSdg?.length == 0 && displayedFos?.length == 0"
|
<div *ngIf="displayedSubjects?.length == 0 && displayedSdg?.length == 0 && displayedFos?.length == 0"
|
||||||
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
||||||
<div>No subjects</div>
|
<div>No subjects</div>
|
||||||
|
|
|
@ -28,7 +28,7 @@ export class SubjectsEditFormComponent implements OnInit {
|
||||||
properties: EnvProperties = properties;
|
properties: EnvProperties = properties;
|
||||||
communityId: string = null;
|
communityId: string = null;
|
||||||
community: CommunityInfo = null;
|
community: CommunityInfo = null;
|
||||||
showLoading = true;
|
loading = true;
|
||||||
params: any;
|
params: any;
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ export class SubjectsEditFormComponent implements OnInit {
|
||||||
params => {
|
params => {
|
||||||
this.communityId = params['community'];
|
this.communityId = params['community'];
|
||||||
this.title.setTitle(this.communityId.toUpperCase() + ' | Subjects');
|
this.title.setTitle(this.communityId.toUpperCase() + ' | Subjects');
|
||||||
this.showLoading = true;
|
this.loading = true;
|
||||||
this.subscriptions.push(this._communityService.getCommunityAsObservable().subscribe(
|
this.subscriptions.push(this._communityService.getCommunityAsObservable().subscribe(
|
||||||
community => {
|
community => {
|
||||||
this.community = community;
|
this.community = community;
|
||||||
|
@ -131,7 +131,7 @@ export class SubjectsEditFormComponent implements OnInit {
|
||||||
this.originalSubjects = HelperFunctions.copy(this.displayedSubjects);
|
this.originalSubjects = HelperFunctions.copy(this.displayedSubjects);
|
||||||
this.originalSdg = HelperFunctions.copy(this.displayedSdg);
|
this.originalSdg = HelperFunctions.copy(this.displayedSdg);
|
||||||
this.originalFos = HelperFunctions.copy(this.displayedFos);
|
this.originalFos = HelperFunctions.copy(this.displayedFos);
|
||||||
this.showLoading = false;
|
this.loading = false;
|
||||||
},
|
},
|
||||||
error => this.handleUpdateError('System error retrieving community profile', error)
|
error => this.handleUpdateError('System error retrieving community profile', error)
|
||||||
));
|
));
|
||||||
|
@ -305,7 +305,7 @@ export class SubjectsEditFormComponent implements OnInit {
|
||||||
|
|
||||||
public saveSubjects(subjects, displayedSubjects, type: string) {
|
public saveSubjects(subjects, displayedSubjects, type: string) {
|
||||||
if (this.communityId != null && this.communityId !== '') {
|
if (this.communityId != null && this.communityId !== '') {
|
||||||
this.showLoading = true;
|
this.loading = true;
|
||||||
const subjectsToDeleteAr = this.getSubjectsExistOnlyInFirst(subjects, displayedSubjects);
|
const subjectsToDeleteAr = this.getSubjectsExistOnlyInFirst(subjects, displayedSubjects);
|
||||||
const subjectsToAddAr = this.getSubjectsExistOnlyInFirst(displayedSubjects, subjects);
|
const subjectsToAddAr = this.getSubjectsExistOnlyInFirst(displayedSubjects, subjects);
|
||||||
const subjectsToDelete = this.getNonEmptyItems(subjectsToDeleteAr);
|
const subjectsToDelete = this.getNonEmptyItems(subjectsToDeleteAr);
|
||||||
|
@ -328,7 +328,7 @@ export class SubjectsEditFormComponent implements OnInit {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
}
|
}
|
||||||
NotificationHandler.rise(message, 'danger');
|
NotificationHandler.rise(message, 'danger');
|
||||||
this.showLoading = false;
|
this.loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
afterUpdateActions(response, message: string) {
|
afterUpdateActions(response, message: string) {
|
||||||
|
@ -344,7 +344,7 @@ export class SubjectsEditFormComponent implements OnInit {
|
||||||
this._communityService.updateSubjects(this.community.subjects, this.community.fos, this.community.sdg);
|
this._communityService.updateSubjects(this.community.subjects, this.community.fos, this.community.sdg);
|
||||||
this._clearCacheService.purgeBrowserCache("Subjects "+message, this.communityId);
|
this._clearCacheService.purgeBrowserCache("Subjects "+message, this.communityId);
|
||||||
NotificationHandler.rise('Subjects successfully ' + message + '!')
|
NotificationHandler.rise('Subjects successfully ' + message + '!')
|
||||||
this.showLoading = false;
|
this.loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue