Fix for add to collection visibility issue (#990)

* Fix for add to collection visibility issue

#Fixed
- Fixed: Fixed a bug where users couldn't select a collection when they had a lot of them.

* Adding settings from documentation, fixing code
This commit is contained in:
Robbie Davis 2022-01-27 08:39:57 -05:00 committed by GitHub
parent 9ee1125636
commit bfb2dbbd4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 3 deletions

View File

@ -375,7 +375,7 @@ export class ActionService implements OnDestroy {
*/ */
addMultipleSeriesToCollectionTag(series: Array<Series>, callback?: VoidActionCallback) { addMultipleSeriesToCollectionTag(series: Array<Series>, callback?: VoidActionCallback) {
if (this.collectionModalRef != null) { return; } if (this.collectionModalRef != null) { return; }
this.collectionModalRef = this.modalService.open(BulkAddToCollectionComponent, { scrollable: true, size: 'md' }); this.collectionModalRef = this.modalService.open(BulkAddToCollectionComponent, { scrollable: true, size: 'md', windowClass: 'collection' });
this.collectionModalRef.componentInstance.seriesIds = series.map(v => v.id); this.collectionModalRef.componentInstance.seriesIds = series.map(v => v.id);
this.collectionModalRef.componentInstance.title = 'New Collection'; this.collectionModalRef.componentInstance.title = 'New Collection';

View File

@ -5,3 +5,16 @@
.clickable:hover, .clickable:focus { .clickable:hover, .clickable:focus {
background-color: lightgreen; background-color: lightgreen;
} }
.collection {
overflow: auto;
.modal-body {
height: calc(100vh - 235px);
min-height: 150px;
.list-group {
overflow: auto;
height: calc(100vh - 355px);
min-height: 32px;
}
}
}

View File

@ -1,4 +1,4 @@
import { Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core'; import { Component, ElementRef, Input, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { FormGroup, FormControl } from '@angular/forms'; import { FormGroup, FormControl } from '@angular/forms';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ToastrService } from 'ngx-toastr'; import { ToastrService } from 'ngx-toastr';
@ -9,6 +9,7 @@ import { CollectionTagService } from 'src/app/_services/collection-tag.service';
@Component({ @Component({
selector: 'app-bulk-add-to-collection', selector: 'app-bulk-add-to-collection',
templateUrl: './bulk-add-to-collection.component.html', templateUrl: './bulk-add-to-collection.component.html',
encapsulation: ViewEncapsulation.None, // This is needed as per the bootstrap modal documentation to get styles to work.
styleUrls: ['./bulk-add-to-collection.component.scss'] styleUrls: ['./bulk-add-to-collection.component.scss']
}) })
export class BulkAddToCollectionComponent implements OnInit { export class BulkAddToCollectionComponent implements OnInit {