Update multi select bottom bar for library.
This commit is contained in:
@@ -53,11 +53,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="book-browser-footer" *ngIf="selectedBooks.size > 0">
|
<div class="book-browser-footer" *ngIf="selectedBooks.size > 0">
|
||||||
<div class="footer-items-container">
|
<div class="footer-items-container">
|
||||||
<p-button *ngIf="(entityType$ | async) === 'Library'" icon="pi pi-ellipsis-v" label="Options" severity="info" (click)="menu.toggle($event)"></p-button>
|
<!--<p-button *ngIf="(entityType$ | async) === 'Library'" icon="pi pi-ellipsis-v" label="Options" severity="info" (click)="menu.toggle($event)"></p-button>-->
|
||||||
|
<p-button *ngIf="(entityType$ | async) === 'Library'" icon="pi pi-book" label="Assign Shelf" severity="info" (onClick)="openShelfAssigner()"></p-button>
|
||||||
<p-button *ngIf="(entityType$ | async) === 'Shelf'" icon="pi pi-minus-circle" label="Unshelf" severity="info" (click)="unshelfBooks()"></p-button>
|
<p-button *ngIf="(entityType$ | async) === 'Shelf'" icon="pi pi-minus-circle" label="Unshelf" severity="info" (click)="unshelfBooks()"></p-button>
|
||||||
<p-button icon="pi pi-times" label="Deselect" severity="warn" (click)="deselectAllBooks()"></p-button>
|
<p-button icon="pi pi-times" label="Deselect" severity="warn" (click)="deselectAllBooks()"></p-button>
|
||||||
</div>
|
</div>
|
||||||
<p-menu #menu [model]="multiSelectItems" [popup]="true" appendTo="body"></p-menu>
|
<!--<p-menu #menu [model]="multiSelectItems" [popup]="true" appendTo="body"></p-menu>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ export class BookBrowserComponent implements OnInit {
|
|||||||
this.bookTitle = '';
|
this.bookTitle = '';
|
||||||
});
|
});
|
||||||
|
|
||||||
this.setupMenu();
|
//this.setupMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
private getRouteParams(): Observable<{ libraryId: number; shelfId: number }> {
|
private getRouteParams(): Observable<{ libraryId: number; shelfId: number }> {
|
||||||
@@ -230,22 +230,19 @@ export class BookBrowserComponent implements OnInit {
|
|||||||
this.bookTitle$.next(newTitle);
|
this.bookTitle$.next(newTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
setupMenu(): void {
|
openShelfAssigner() {
|
||||||
this.multiSelectItems = [
|
|
||||||
{
|
|
||||||
label: 'Options',
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
label: 'Edit shelf',
|
|
||||||
icon: 'pi pi-folder',
|
|
||||||
command: () => {
|
|
||||||
this.ref = this.dialogService.open(ShelfAssignerComponent, {
|
this.ref = this.dialogService.open(ShelfAssignerComponent, {
|
||||||
header: `Update Books Shelves`,
|
header: `Update Books Shelves`,
|
||||||
modal: true,
|
modal: true,
|
||||||
|
closable: true,
|
||||||
width: '30%',
|
width: '30%',
|
||||||
height: '70%',
|
height: '60%',
|
||||||
contentStyle: {overflow: 'auto'},
|
contentStyle: {overflow: 'auto'},
|
||||||
baseZIndex: 10,
|
baseZIndex: 10,
|
||||||
|
style: {
|
||||||
|
position: 'absolute',
|
||||||
|
top: '15%',
|
||||||
|
},
|
||||||
data: {
|
data: {
|
||||||
isMultiBooks: true,
|
isMultiBooks: true,
|
||||||
bookIds: this.selectedBooks
|
bookIds: this.selectedBooks
|
||||||
@@ -255,11 +252,23 @@ export class BookBrowserComponent implements OnInit {
|
|||||||
this.selectedBooks.clear();
|
this.selectedBooks.clear();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*setupMenu(): void {
|
||||||
|
this.multiSelectItems = [
|
||||||
|
{
|
||||||
|
label: 'Options',
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
label: 'Edit shelf',
|
||||||
|
icon: 'pi pi-folder',
|
||||||
|
command: () => {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}*/
|
||||||
|
|
||||||
private initializeLibraryMenuItems(): void {
|
private initializeLibraryMenuItems(): void {
|
||||||
this.entityOptions = [
|
this.entityOptions = [
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
[title]="primaryColor.name"
|
[title]="primaryColor.name"
|
||||||
(click)="updateColors($event, 'primary', primaryColor)"
|
(click)="updateColors($event, 'primary', primaryColor)"
|
||||||
[ngClass]="{ 'active-color': primaryColor.name === selectedPrimaryColor() }"
|
[ngClass]="{ 'active-color': primaryColor.name === selectedPrimaryColor() }"
|
||||||
[style]="{ 'background-color': primaryColor.name === 'noir' ? 'var(--text-color)' : primaryColor.palette?.['500'] || 'transparent' }"
|
[style]="{ 'background-color': primaryColor.name === 'noir' ? 'var(--text-color)' : primaryColor.palette['500'] || 'transparent' }"
|
||||||
></button>
|
></button>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user