-
Notifications
You must be signed in to change notification settings - Fork 555
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3788 from sbwalker/dev
force ModuleActions to interactive render mode
- Loading branch information
Showing
3 changed files
with
59 additions
and
43 deletions.
There are no files selected for viewing
48 changes: 9 additions & 39 deletions
48
Oqtane.Client/Themes/Controls/Container/ModuleActions.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,15 @@ | ||
@namespace Oqtane.Themes.Controls | ||
@inherits ModuleActionsBase | ||
@inherits ContainerBase | ||
@attribute [OqtaneIgnore] | ||
|
||
@if (PageState.EditMode && UserSecurity.IsAuthorized(PageState.User, PermissionNames.Edit, PageState.Page.PermissionList) && PageState.Action == Constants.DefaultAction) | ||
{ | ||
<div class="app-moduleactions py-2 px-3"> | ||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"></a> | ||
<ul class="dropdown-menu" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 37px, 0px);" role="button"> | ||
@foreach (var action in Actions.Where(item => !item.Name.Contains("Pane"))) | ||
{ | ||
if (string.IsNullOrEmpty(action.Name)) | ||
{ | ||
<li class="dropdown-divider"></li> | ||
} | ||
else | ||
{ | ||
<li> | ||
<a class="dropdown-item" @onclick="(async () => await ModuleAction(action))"> | ||
<span class="@action.Icon" aria-hidden="true"></span> @action.Name | ||
</a> | ||
</li> | ||
} | ||
} | ||
@if (Actions.Where(item => item.Name.Contains("Pane")).Any()) | ||
{ | ||
<li class="dropdown-submenu"> | ||
<a class="dropdown-item" onclick="return subMenu(this)"> | ||
<span class="@Icons.AccountLogin" aria-hidden="true"></span> Move To > | ||
</a> | ||
<ul class="dropdown-menu"> | ||
@foreach (var action in Actions.Where(item => item.Name.Contains("Pane"))) | ||
{ | ||
<li> | ||
<a class="dropdown-item" @onclick="(async () => await ModuleAction(action))"> | ||
<span class="@action.Icon" aria-hidden="true"></span> @action.Name | ||
</a> | ||
</li> | ||
} | ||
</ul> | ||
</li> | ||
} | ||
</ul> | ||
</div> | ||
@if (PageState.Site.RenderMode == RenderModes.Interactive) | ||
{ | ||
<ModuleActionsInteractive PageState="@PageState" ModuleState="@ModuleState" /> | ||
} | ||
else | ||
{ | ||
<ModuleActionsInteractive PageState="@PageState" ModuleState="@ModuleState" @rendermode="@InteractiveRenderMode.GetInteractiveRenderMode(PageState.Site.Runtime, PageState.Site.Prerender)" /> | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
Oqtane.Client/Themes/Controls/Container/ModuleActionsInteractive.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
@namespace Oqtane.Themes.Controls | ||
@inherits ModuleActionsBase | ||
@attribute [OqtaneIgnore] | ||
|
||
<div class="app-moduleactions py-2 px-3"> | ||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"></a> | ||
<ul class="dropdown-menu" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 37px, 0px);" role="button"> | ||
@foreach (var action in Actions.Where(item => !item.Name.Contains("Pane"))) | ||
{ | ||
if (string.IsNullOrEmpty(action.Name)) | ||
{ | ||
<li class="dropdown-divider"></li> | ||
} | ||
else | ||
{ | ||
<li> | ||
<a class="dropdown-item" @onclick="(async () => await ModuleAction(action))"> | ||
<span class="@action.Icon" aria-hidden="true"></span> @action.Name | ||
</a> | ||
</li> | ||
} | ||
} | ||
@if (Actions.Where(item => item.Name.Contains("Pane")).Any()) | ||
{ | ||
<li class="dropdown-submenu"> | ||
<a class="dropdown-item" onclick="return subMenu(this)"> | ||
<span class="@Icons.AccountLogin" aria-hidden="true"></span> Move To > | ||
</a> | ||
<ul class="dropdown-menu"> | ||
@foreach (var action in Actions.Where(item => item.Name.Contains("Pane"))) | ||
{ | ||
<li> | ||
<a class="dropdown-item" @onclick="(async () => await ModuleAction(action))"> | ||
<span class="@action.Icon" aria-hidden="true"></span> @action.Name | ||
</a> | ||
</li> | ||
} | ||
</ul> | ||
</li> | ||
} | ||
</ul> | ||
</div> |