Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oqtane controls updates #4307

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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