Merge pull request #767 from PoisnFang/fix-pane-div-default-class
add default class 'container' for div in pane to avoid content squishing
This commit is contained in:
commit
bc72e28d11
|
@ -4,16 +4,21 @@
|
||||||
@inject IModuleService ModuleService
|
@inject IModuleService ModuleService
|
||||||
@inject IModuleDefinitionService ModuleDefinitionService
|
@inject IModuleDefinitionService ModuleDefinitionService
|
||||||
|
|
||||||
<div class="@_paneadminborder">
|
@if (_useadminborder)
|
||||||
@if (_panetitle != "")
|
{
|
||||||
{
|
<div class="@_paneadminborder">
|
||||||
@((MarkupString)_panetitle)
|
@((MarkupString)_panetitle)
|
||||||
}
|
@DynamicComponent
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
@DynamicComponent
|
@DynamicComponent
|
||||||
</div>
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
private string _paneadminborder = "";
|
private bool _useadminborder = false;
|
||||||
|
private string _paneadminborder = "container";
|
||||||
private string _panetitle = "";
|
private string _panetitle = "";
|
||||||
|
|
||||||
[CascadingParameter]
|
[CascadingParameter]
|
||||||
|
@ -26,14 +31,15 @@
|
||||||
|
|
||||||
protected override void OnParametersSet()
|
protected override void OnParametersSet()
|
||||||
{
|
{
|
||||||
if (PageState.EditMode && UserSecurity.IsAuthorized(PageState.User,PermissionNames.Edit, PageState.Page.Permissions) && Name != Constants.AdminPane)
|
if (PageState.EditMode && UserSecurity.IsAuthorized(PageState.User, PermissionNames.Edit, PageState.Page.Permissions) && Name != Constants.AdminPane)
|
||||||
{
|
{
|
||||||
|
_useadminborder = true;
|
||||||
_paneadminborder = "app-pane-admin-border";
|
_paneadminborder = "app-pane-admin-border";
|
||||||
_panetitle = "<div class=\"app-pane-admin-title\">" + Name + " Pane</div>";
|
_panetitle = "<div class=\"app-pane-admin-title\">" + Name + " Pane</div>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_paneadminborder = "";
|
_paneadminborder = "container";
|
||||||
_panetitle = "";
|
_panetitle = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,8 +53,8 @@
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
@ -94,8 +100,8 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// module control does not exist with name specified
|
// module control does not exist with name specified
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,8 +112,8 @@
|
||||||
Module module = PageState.Modules.FirstOrDefault(item => item.ModuleId == PageState.ModuleId);
|
Module module = PageState.Modules.FirstOrDefault(item => item.ModuleId == PageState.ModuleId);
|
||||||
if (module != null && module.Pane.ToLower() == Name.ToLower() && !module.IsDeleted)
|
if (module != null && module.Pane.ToLower() == Name.ToLower() && !module.IsDeleted)
|
||||||
{
|
{
|
||||||
// check if user is authorized to view module
|
// check if user is authorized to view module
|
||||||
if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, module.Permissions))
|
if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, module.Permissions))
|
||||||
{
|
{
|
||||||
CreateComponent(builder, module);
|
CreateComponent(builder, module);
|
||||||
}
|
}
|
||||||
|
@ -117,8 +123,8 @@
|
||||||
{
|
{
|
||||||
foreach (Module module in PageState.Modules.Where(item => item.PageId == PageState.Page.PageId && item.Pane.ToLower() == Name.ToLower() && !item.IsDeleted).OrderBy(x => x.Order).ToArray())
|
foreach (Module module in PageState.Modules.Where(item => item.PageId == PageState.Page.PageId && item.Pane.ToLower() == Name.ToLower() && !item.IsDeleted).OrderBy(x => x.Order).ToArray())
|
||||||
{
|
{
|
||||||
// check if user is authorized to view module
|
// check if user is authorized to view module
|
||||||
if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, module.Permissions))
|
if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, module.Permissions))
|
||||||
{
|
{
|
||||||
CreateComponent(builder, module);
|
CreateComponent(builder, module);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user