lpxxx Angular holdings maintenance wip
authorBill Erickson <berickxx@gmail.com>
Tue, 19 Mar 2019 20:07:26 +0000 (16:07 -0400)
committerBill Erickson <berickxx@gmail.com>
Tue, 19 Mar 2019 20:07:26 +0000 (16:07 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.css [new file with mode: 0644]
Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.ts

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 (file)
index 0000000..e0790c4
--- /dev/null
@@ -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);
+}
+*/
index ac67500..fab8003 100644 (file)
@@ -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';
             }
         }