From 72d519bb4595d4774287d9b692941c141da86ce8 Mon Sep 17 00:00:00 2001 From: Andrew Camilleri Date: Mon, 19 Aug 2019 07:13:42 +0200 Subject: [PATCH] Add description and embedded css to POS (#970) * Add description and embedded css to POS * wrap embedded css props in + @Safe.Raw($""); } diff --git a/BTCPayServer/Views/AppsPublic/ViewPointOfSale.cshtml b/BTCPayServer/Views/AppsPublic/ViewPointOfSale.cshtml index dede86e3c..4394c0894 100644 --- a/BTCPayServer/Views/AppsPublic/ViewPointOfSale.cshtml +++ b/BTCPayServer/Views/AppsPublic/ViewPointOfSale.cshtml @@ -42,11 +42,16 @@ grid-gap: .5rem; } - .card-deck .card:only-of-type { - max-width: 320px; - margin: auto; - } + .card-deck .card:only-of-type { + max-width: 320px; + margin: auto; + } + @if (!string.IsNullOrEmpty(Model.EmbeddedCSS)) + { + @Safe.Raw($""); + } + @@ -258,8 +263,13 @@ + @if (!string.IsNullOrEmpty(Model.Description)) + { +
+
@Safe.Raw(Model.Description)
+
+ } -
@@ -335,7 +345,12 @@

@Model.Title

- + @if (!string.IsNullOrEmpty(Model.Description)) + { +
+
@Safe.Raw(Model.Description)
+
+ }
@for (int x = 0; x < Model.Items.Length; x++) { diff --git a/BTCPayServer/bundleconfig.json b/BTCPayServer/bundleconfig.json index 153757d3e..28eec7957 100644 --- a/BTCPayServer/bundleconfig.json +++ b/BTCPayServer/bundleconfig.json @@ -116,6 +116,24 @@ "wwwroot/vendor/summernote/summernote-bs4.css" ] }, + { + "outputFileName": "wwwroot/bundles/pos-admin-bundle.min.js", + "inputFiles": [ + "wwwroot/vendor/highlightjs/highlight.min.js", + "wwwroot/vendor/summernote/summernote-bs4.js", + "wwwroot/pos-admin/main.js", + "wwwroot/products/js/products.js", + "wwwroot/products/js/products.jquery.js" + ] + }, + { + "outputFileName": "wwwroot/bundles/pos-admin-bundle.min.css", + "inputFiles": [ + "wwwroot/vendor/highlightjs/default.min.css", + "wwwroot/vendor/summernote/summernote-bs4.css" + ] + }, + { "outputFileName": "wwwroot/bundles/crowdfund-bundle.min.css", "inputFiles": [ diff --git a/BTCPayServer/wwwroot/pos-admin/main.js b/BTCPayServer/wwwroot/pos-admin/main.js new file mode 100644 index 000000000..956f5a7d4 --- /dev/null +++ b/BTCPayServer/wwwroot/pos-admin/main.js @@ -0,0 +1,7 @@ +hljs.initHighlightingOnLoad(); +$(document).ready(function () { + + $(".richtext").summernote({ + minHeight: 300 + }); +});