diff --git a/ang/mjwshared.css b/ang/mjwshared.css
index 71d0ccbe355d10e1a2248b16deeb1b18fad66e21..027b59137c9b5a7647424f38693cedc16594e343 100644
--- a/ang/mjwshared.css
+++ b/ang/mjwshared.css
@@ -6,9 +6,19 @@
#paymentprocessor-webhooks-table tbody>tr { position: relative; }
#paymentprocessor-webhooks-table tbody>tr.selected { position: relative; background-color: white; }
+
+/* Hack for Greenwich theme which sets color white */
+#paymentprocessor-webhooks-table tbody>tr.selected td { color: inherit; background-color: inherit; }
+/*
+* the following fixes Greenwich but will break other themes...
+#paymentprocessor-webhooks-table tbody>tr.selected td a:link,
+#paymentprocessor-webhooks-table tbody>tr.selected td a:visited,
+#paymentprocessor-webhooks-table tbody>tr.selected td a:active { color: inherit; background-color: inherit; }
+*/
+
#paymentprocessor-webhooks-table div.details { position: absolute; left: 0; right: 0; top: 100%; background: white; padding: 1.6rem; z-index: 1; box-shadow: 0 1rem 2rem rgba(0,0,0,0.4); }
-#paymentprocessor-webhooks-table div.details .message { padding: 1.6rem; background: #fafafa; white-space: pre-wrap; font-size: 1.4rem;}
-#paymentprocessor-webhooks-table div.details .raw { padding: 1.6rem; background: #fafafa; white-space: pre-wrap; font-size: 1.4rem; color: #444;}
+#paymentprocessor-webhooks-table div.details .message { padding: 1.6rem; background: #fafafa; white-space: pre-wrap; font-size: 0.875em;}
+#paymentprocessor-webhooks-table div.details .raw { padding: 1.6rem; background: #fafafa; white-space: pre-wrap; font-size: 0.875em; color: #444; line-height: 1.3; overflow: auto; font-family: monospace, monospace; }
#paymentprocessor-webhooks div.pager {
display: flex;
diff --git a/ang/mjwshared/PaymentprocessorWebhook.html b/ang/mjwshared/PaymentprocessorWebhook.html
index c28c02e2fbb08ee6c1eb68eca7d51038e85db0b6..ee0bb37e42fe5d406aeb421e2ff9bb460c137468 100644
--- a/ang/mjwshared/PaymentprocessorWebhook.html
+++ b/ang/mjwshared/PaymentprocessorWebhook.html
@@ -95,7 +95,7 @@
Type: {{row.trigger}}
Full message:
- +Raw data:
diff --git a/ang/mjwshared/PaymentprocessorWebhook.js b/ang/mjwshared/PaymentprocessorWebhook.js index 5ed8ae6baaeb7f9eab7d57e0894ff12f05a6eec4..494cc6bacf1cc40450d86500cc71b7395240b16a 100644 --- a/ang/mjwshared/PaymentprocessorWebhook.js +++ b/ang/mjwshared/PaymentprocessorWebhook.js @@ -91,7 +91,19 @@ crmApi4('PaymentprocessorWebhook', 'get', params) .then(r => { ctrl.resultsCount = r.count; - ctrl.events = r; + ctrl.events = r.map(row => { + // See if we can pretty up the raw data. + if (row.data) { + try { + const parsed = JSON.parse(row.data); + if (parsed) { + row.data = JSON.stringify(parsed, null, 2); + } + } + catch (e) { } + } + return row; + }); }) ); };