Skip to content

Commit

Permalink
Merge pull request #4307 from leigh-pointer/OqtaneControls
Browse files Browse the repository at this point in the history
Oqtane controls updates
  • Loading branch information
sbwalker authored Jun 4, 2024
2 parents d75e3ac + 8048788 commit 532a87d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
5 changes: 4 additions & 1 deletion Oqtane.Client/Modules/Controls/ActionDialog.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
5 changes: 4 additions & 1 deletion Oqtane.Client/Modules/Controls/ActionLink.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
7 changes: 5 additions & 2 deletions Oqtane.Client/Modules/Controls/Pager.razor
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@if (!string.IsNullOrEmpty(SearchProperties))
{
<form autocomplete="off">
<div class="input-group my-3">
<div class="input-group my-3 @SearchBoxClass">
<input type="text" id="pagersearch" class="form-control" placeholder=@string.Format(Localizer["SearchPlaceholder"], FormatSearchProperties()) @bind="@_search" />
<button type="button" class="btn btn-primary" @onclick="Search">@SharedLocalizer["Search"]</button>
<button type="button" class="btn btn-secondary" @onclick="Reset">@SharedLocalizer["Reset"]</button>
Expand Down Expand Up @@ -74,7 +74,7 @@
{
<form method="post" autocomplete="off" @formname="PagerForm" @onsubmit="Search" data-enhance>
<input type="hidden" name="@Constants.RequestVerificationToken" value="@SiteState.AntiForgeryToken" />
<div class="input-group my-3">
<div class="input-group my-3 @SearchBoxClass">
<input type="text" id="pagersearch" name="_search" class="form-control" placeholder=@string.Format(Localizer["SearchPlaceholder"], FormatSearchProperties()) @bind="@_search" />
<button type="submit" class="btn btn-primary">@SharedLocalizer["Search"]</button>
<a class="btn btn-secondary" href="@PageUrl(1, "")">@SharedLocalizer["Reset"]</a>
Expand Down Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion Oqtane.Client/Modules/Controls/TabStrip.razor
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</li>
}
</ul>
<div class="tab-content">
<div class="tab-content @TabContentClass">
<br />
@ChildContent
</div>
Expand All @@ -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))
Expand Down

0 comments on commit 532a87d

Please sign in to comment.