From 8048788042cc99a983b0b2b30dec5088b3ccebfe Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Tue, 4 Jun 2024 12:21:59 +0200 Subject: [PATCH] Oqtane controls updates ActionDialog and ActionLink now allow other icon sets whilst still adhering to the legacy "oi oi-" icon set. Pager added SearchBoxClass Class parameter to the Search div. TabStrip added a TabContentClass Class parameter to the tab content div. --- Oqtane.Client/Modules/Controls/ActionDialog.razor | 5 ++++- Oqtane.Client/Modules/Controls/ActionLink.razor | 5 ++++- Oqtane.Client/Modules/Controls/Pager.razor | 7 +++++-- Oqtane.Client/Modules/Controls/TabStrip.razor | 5 ++++- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Oqtane.Client/Modules/Controls/ActionDialog.razor b/Oqtane.Client/Modules/Controls/ActionDialog.razor index defb520d..b2308d3a 100644 --- a/Oqtane.Client/Modules/Controls/ActionDialog.razor +++ b/Oqtane.Client/Modules/Controls/ActionDialog.razor @@ -181,7 +181,10 @@ else _openText = string.Empty; } - if (!IconName.Contains(" ")) + // Check if IconName starts with "oi oi-" + bool startsWithOiOi = IconName.StartsWith("oi oi-"); + + if (!startsWithOiOi && !IconName.Contains(" ")) { IconName = "oi oi-" + IconName; } diff --git a/Oqtane.Client/Modules/Controls/ActionLink.razor b/Oqtane.Client/Modules/Controls/ActionLink.razor index 9517e275..545dca5c 100644 --- a/Oqtane.Client/Modules/Controls/ActionLink.razor +++ b/Oqtane.Client/Modules/Controls/ActionLink.razor @@ -145,7 +145,10 @@ if (!string.IsNullOrEmpty(IconName)) { - if (!IconName.Contains(" ")) + // Check if IconName starts with "oi oi-" + bool startsWithOiOi = IconName.StartsWith("oi oi-"); + + if (!startsWithOiOi && !IconName.Contains(" ")) { IconName = "oi oi-" + IconName; } diff --git a/Oqtane.Client/Modules/Controls/Pager.razor b/Oqtane.Client/Modules/Controls/Pager.razor index 8e643f17..ce14eed6 100644 --- a/Oqtane.Client/Modules/Controls/Pager.razor +++ b/Oqtane.Client/Modules/Controls/Pager.razor @@ -11,7 +11,7 @@ @if (!string.IsNullOrEmpty(SearchProperties)) {
-
+
@@ -74,7 +74,7 @@ { -
+
@SharedLocalizer["Reset"] @@ -359,6 +359,9 @@ [Parameter] public string SearchProperties { get; set; } // comma delimited list of property names to include in search + [Parameter] + public string SearchBoxClass { get; set; } // class for Search box + [Parameter] public string Parameters { get; set; } // optional - querystring parameters in the form of "id=x&name=y" used in static render mode diff --git a/Oqtane.Client/Modules/Controls/TabStrip.razor b/Oqtane.Client/Modules/Controls/TabStrip.razor index 90b3948a..e2a3c0f1 100644 --- a/Oqtane.Client/Modules/Controls/TabStrip.razor +++ b/Oqtane.Client/Modules/Controls/TabStrip.razor @@ -23,7 +23,7 @@ } -
+

@ChildContent
@@ -47,6 +47,9 @@ [Parameter] public string Id { get; set; } // optional - used to uniquely identify an instance of a tab strip component (will be set automatically if no value provided) + [Parameter] + public string TabContentClass { get; set; } // optional - to extend the TabContent div. + protected override void OnInitialized() { if (string.IsNullOrEmpty(Id))