From bbb94fb6df0dc1f1bc6b63b60abff2996db4b07f Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 19 Mar 2019 16:07:26 -0400 Subject: [PATCH] lpxxx Angular holdings maintenance wip Signed-off-by: Bill Erickson --- .../staff/catalog/record/holdings.component.css | 26 ++++++++++++++++++++++ .../app/staff/catalog/record/holdings.component.ts | 13 ++++++++--- 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.css diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.css b/Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.css new file mode 100644 index 0000000000..e0790c4897 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.css @@ -0,0 +1,26 @@ +/* +:host /deep/ allows us to share style with child components. +In this case, the holdings components wants its grid to see +the CSS we have defined for different row types + +See https://v2.angular.io/docs/ts/latest/guide/component-styles.html +*/ + +/* grid row colors are bootstrap class="bg-info" with opacity */ +:host /deep/ .holdings-copy-row { + color: #004085; + background-color: rgb(23,162,184, 0.1); +} + + +:host /deep/ .holdings-volume-row { + color: #004085; + background-color: rgb(23,162,184, 0.8); +} + +/* +:host /deep/ .holdings-org-row { + color: #004085; + background-color: rgb(23,162,184, 0.7); +} +*/ diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.ts b/Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.ts index ac675004c4..fab8003c9a 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.ts @@ -57,7 +57,8 @@ class HoldingsEntry { @Component({ selector: 'eg-holdings-maintenance', - templateUrl: 'holdings.component.html' + templateUrl: 'holdings.component.html', + styleUrls: ['holdings.component.css'] }) export class HoldingsMaintenanceComponent implements OnInit { @@ -134,8 +135,14 @@ export class HoldingsMaintenanceComponent implements OnInit { this.contextOrg = this.staffCat.searchContext.searchOrg; this.rowClassCallback = (row: any): string => { - if (row.volume && !row.copy) { - return 'bg-info'; + if (row.volume) { + if (row.copy) { + return 'holdings-copy-row'; + } else { + return 'holdings-volume-row'; + } + } else { + return 'holdings-org-row'; } } -- 2.11.0