Merge pull request #872 from sbwalker/master
fixed issue where modulestate was being modified and not treated as a readonly cache
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
@namespace Oqtane.Themes.Controls
|
@namespace Oqtane.Themes.Controls
|
||||||
@inherits ContainerBase
|
@inherits ContainerBase
|
||||||
@attribute [OqtaneIgnore]
|
@attribute [OqtaneIgnore]
|
||||||
|
|
||||||
@ -17,6 +17,13 @@
|
|||||||
{
|
{
|
||||||
title = PageState.Action;
|
title = PageState.Action;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(ModuleState.ControlTitle))
|
||||||
|
{
|
||||||
|
title = ModuleState.ControlTitle;
|
||||||
|
}
|
||||||
|
}
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
@using Microsoft.AspNetCore.Components.Rendering
|
@using Microsoft.AspNetCore.Components.Rendering
|
||||||
@namespace Oqtane.UI
|
@namespace Oqtane.UI
|
||||||
@inject IUserService UserService
|
@inject IUserService UserService
|
||||||
@inject IModuleService ModuleService
|
@inject IModuleService ModuleService
|
||||||
@ -53,8 +53,8 @@ else
|
|||||||
if (module != null && !module.IsDeleted)
|
if (module != null && !module.IsDeleted)
|
||||||
{
|
{
|
||||||
var typename = module.ModuleType;
|
var typename = module.ModuleType;
|
||||||
// check for core module actions component
|
// check for core module actions component
|
||||||
if (Constants.DefaultModuleActions.Contains(PageState.Action))
|
if (Constants.DefaultModuleActions.Contains(PageState.Action))
|
||||||
{
|
{
|
||||||
typename = Constants.DefaultModuleActionsTemplate.Replace(Constants.ActionToken, PageState.Action);
|
typename = Constants.DefaultModuleActionsTemplate.Replace(Constants.ActionToken, PageState.Action);
|
||||||
}
|
}
|
||||||
@ -91,17 +91,13 @@ else
|
|||||||
|
|
||||||
if (authorized)
|
if (authorized)
|
||||||
{
|
{
|
||||||
if (!Constants.DefaultModuleActions.Contains(PageState.Action) && module.ControlTitle != "")
|
|
||||||
{
|
|
||||||
module.Title = module.ControlTitle;
|
|
||||||
}
|
|
||||||
CreateComponent(builder, module);
|
CreateComponent(builder, module);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// module control does not exist with name specified
|
// module control does not exist with name specified
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -442,6 +442,12 @@
|
|||||||
var paneindex = new Dictionary<string, int>();
|
var paneindex = new Dictionary<string, int>();
|
||||||
foreach (Module module in modules)
|
foreach (Module module in modules)
|
||||||
{
|
{
|
||||||
|
// initialize module control properties
|
||||||
|
module.SecurityAccessLevel = SecurityAccessLevel.Host;
|
||||||
|
module.ControlTitle = "";
|
||||||
|
module.Actions = "";
|
||||||
|
module.UseAdminContainer = false;
|
||||||
|
|
||||||
if ((module.PageId == page.PageId || module.ModuleId == moduleid) && module.ModuleDefinition != null)
|
if ((module.PageId == page.PageId || module.ModuleId == moduleid) && module.ModuleDefinition != null)
|
||||||
{
|
{
|
||||||
var typename = string.Empty;
|
var typename = string.Empty;
|
||||||
@ -520,6 +526,7 @@
|
|||||||
|
|
||||||
module.PaneModuleIndex = paneindex[module.Pane.ToLower()];
|
module.PaneModuleIndex = paneindex[module.Pane.ToLower()];
|
||||||
|
|
||||||
|
// container fallback
|
||||||
if (string.IsNullOrEmpty(module.ContainerType))
|
if (string.IsNullOrEmpty(module.ContainerType))
|
||||||
{
|
{
|
||||||
module.ContainerType = defaultcontainertype;
|
module.ContainerType = defaultcontainertype;
|
||||||
|
Reference in New Issue
Block a user