Changes to method names per request

This commit is contained in:
Mitchel Sellers 2019-05-19 21:05:10 -05:00
parent 86adae19c1
commit 4d55c68e4b
7 changed files with 14 additions and 14 deletions

View File

@ -80,7 +80,7 @@
protected override async Task OnInitAsync() protected override async Task OnInitAsync()
{ {
title = ModuleState.Title; title = ModuleState.Title;
containers = ThemeService.CalculateSelectableContainers(await ThemeService.GetThemesAsync()); containers = ThemeService.GetContainerTypes(await ThemeService.GetThemesAsync());
containertype = ModuleState.ContainerType; containertype = ModuleState.ContainerType;
viewpermissions = ModuleState.ViewPermissions; viewpermissions = ModuleState.ViewPermissions;
editpermissions = ModuleState.EditPermissions; editpermissions = ModuleState.EditPermissions;

View File

@ -135,8 +135,8 @@
protected override async Task OnInitAsync() protected override async Task OnInitAsync()
{ {
var Themes = await ThemeService.GetThemesAsync(); var Themes = await ThemeService.GetThemesAsync();
themes = ThemeService.CalculateSelectableThemes(Themes); themes = ThemeService.GetThemeTypes(Themes);
panelayouts = ThemeService.CalculateSelectablePaneLayouts(Themes); panelayouts = ThemeService.GetPaneLayoutTypes(Themes);
} }
private async Task SavePage() private async Task SavePage()

View File

@ -136,8 +136,8 @@
protected override async Task OnInitAsync() protected override async Task OnInitAsync()
{ {
List<Theme> Themes = await ThemeService.GetThemesAsync(); List<Theme> Themes = await ThemeService.GetThemesAsync();
themes = ThemeService.CalculateSelectableThemes(Themes); themes = ThemeService.GetThemeTypes(Themes);
panelayouts = ThemeService.CalculateSelectablePaneLayouts(Themes); panelayouts = ThemeService.GetPaneLayoutTypes(Themes);
PageId = Int32.Parse(PageState.QueryString["id"]); PageId = Int32.Parse(PageState.QueryString["id"]);
Page p = PageState.Pages.Where(item => item.PageId == PageId).FirstOrDefault(); Page p = PageState.Pages.Where(item => item.PageId == PageId).FirstOrDefault();

View File

@ -136,8 +136,8 @@
protected override async Task OnInitAsync() protected override async Task OnInitAsync()
{ {
List<Theme> Themes = await ThemeService.GetThemesAsync(); List<Theme> Themes = await ThemeService.GetThemesAsync();
themes = ThemeService.CalculateSelectableThemes(Themes); themes = ThemeService.GetThemeTypes(Themes);
panelayouts = ThemeService.CalculateSelectablePaneLayouts(Themes); panelayouts = ThemeService.GetPaneLayoutTypes(Themes);
PageId = Int32.Parse(PageState.QueryString["id"]); PageId = Int32.Parse(PageState.QueryString["id"]);
Page p = PageState.Pages.Where(item => item.PageId == PageId).FirstOrDefault(); Page p = PageState.Pages.Where(item => item.PageId == PageId).FirstOrDefault();

View File

@ -7,8 +7,8 @@ namespace Oqtane.Services
public interface IThemeService public interface IThemeService
{ {
Task<List<Theme>> GetThemesAsync(); Task<List<Theme>> GetThemesAsync();
Dictionary<string, string> CalculateSelectableThemes(List<Theme> themes); Dictionary<string, string> GetThemeTypes(List<Theme> themes);
Dictionary<string, string> CalculateSelectablePaneLayouts(List<Theme> themes); Dictionary<string, string> GetPaneLayoutTypes(List<Theme> themes);
Dictionary<string, string> CalculateSelectableContainers(List<Theme> themes); Dictionary<string, string> GetContainerTypes(List<Theme> themes);
} }
} }

View File

@ -58,7 +58,7 @@ namespace Oqtane.Services
return themes.OrderBy(item => item.Name).ToList(); return themes.OrderBy(item => item.Name).ToList();
} }
public Dictionary<string, string> CalculateSelectableThemes(List<Theme> themes) public Dictionary<string, string> GetThemeTypes(List<Theme> themes)
{ {
var selectableThemes = new Dictionary<string, string>(); var selectableThemes = new Dictionary<string, string>();
foreach (Theme theme in themes) foreach (Theme theme in themes)
@ -71,7 +71,7 @@ namespace Oqtane.Services
return selectableThemes; return selectableThemes;
} }
public Dictionary<string, string> CalculateSelectablePaneLayouts(List<Theme> themes) public Dictionary<string, string> GetPaneLayoutTypes(List<Theme> themes)
{ {
var selectablePaneLayouts = new Dictionary<string, string>(); var selectablePaneLayouts = new Dictionary<string, string>();
foreach (Theme theme in themes) foreach (Theme theme in themes)
@ -84,7 +84,7 @@ namespace Oqtane.Services
return selectablePaneLayouts; return selectablePaneLayouts;
} }
public Dictionary<string, string> CalculateSelectableContainers(List<Theme> themes) public Dictionary<string, string> GetContainerTypes(List<Theme> themes)
{ {
var selectableContainers = new Dictionary<string, string>(); var selectableContainers = new Dictionary<string, string>();
foreach (Theme theme in themes) foreach (Theme theme in themes)

View File

@ -84,7 +84,7 @@
{ {
//TODO: Move this to shared component. This is used in this control Add, Edit, and Delete controls as well //TODO: Move this to shared component. This is used in this control Add, Edit, and Delete controls as well
moduledefinitions = await ModuleDefinitionService.GetModuleDefinitionsAsync(); moduledefinitions = await ModuleDefinitionService.GetModuleDefinitionsAsync();
containers = ThemeService.CalculateSelectableContainers(await ThemeService.GetThemesAsync()); containers = ThemeService.GetContainerTypes(await ThemeService.GetThemesAsync());
List<Module> modules = await ModuleService.GetModulesAsync(PageState.Site.SiteId, Constants.PageManagementModule); List<Module> modules = await ModuleService.GetModulesAsync(PageState.Site.SiteId, Constants.PageManagementModule);
pagemanagementmoduleid = modules.FirstOrDefault().ModuleId; pagemanagementmoduleid = modules.FirstOrDefault().ModuleId;
if (UserService.IsAuthorized(PageState.User, PageState.Page.EditPermissions)) if (UserService.IsAuthorized(PageState.User, PageState.Page.EditPermissions))