Merge pull request #11 from mitchelsellers/ThemeServiceChanges
ThemeService Improvements
This commit is contained in:
		| @ -80,14 +80,7 @@ | ||||
|     protected override async Task OnInitAsync() | ||||
|     { | ||||
|         title = ModuleState.Title; | ||||
|         List<Theme> Themes = await ThemeService.GetThemesAsync(); | ||||
|         foreach (Theme theme in Themes) | ||||
|         { | ||||
|             foreach (string container in theme.ContainerControls.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries)) | ||||
|             { | ||||
|                 containers.Add(container, theme.Name + " - " + @Utilities.GetTypeNameClass(container)); | ||||
|             } | ||||
|         } | ||||
|         containers = ThemeService.GetContainerTypes(await ThemeService.GetThemesAsync()); | ||||
|         containertype = ModuleState.ContainerType; | ||||
|         viewpermissions = ModuleState.ViewPermissions; | ||||
|         editpermissions = ModuleState.EditPermissions; | ||||
|  | ||||
| @ -134,18 +134,9 @@ | ||||
|  | ||||
|     protected override async Task OnInitAsync() | ||||
|     { | ||||
|         List<Theme> Themes = await ThemeService.GetThemesAsync(); | ||||
|         foreach (Theme theme in Themes) | ||||
|         { | ||||
|             foreach (string themecontrol in theme.ThemeControls.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries)) | ||||
|             { | ||||
|                 themes.Add(themecontrol, theme.Name + " - " + @Utilities.GetTypeNameClass(themecontrol)); | ||||
|             } | ||||
|             foreach (string panelayout in theme.PaneLayouts.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries)) | ||||
|             { | ||||
|                 panelayouts.Add(panelayout, theme.Name + " - " + @Utilities.GetTypeNameClass(panelayout)); | ||||
|             } | ||||
|         } | ||||
|         var Themes = await ThemeService.GetThemesAsync(); | ||||
|         themes = ThemeService.GetThemeTypes(Themes); | ||||
|         panelayouts = ThemeService.GetPaneLayoutTypes(Themes); | ||||
|     } | ||||
|  | ||||
|     private async Task SavePage() | ||||
|  | ||||
| @ -136,17 +136,8 @@ | ||||
|     protected override async Task OnInitAsync() | ||||
|     { | ||||
|         List<Theme> Themes = await ThemeService.GetThemesAsync(); | ||||
|         foreach (Theme theme in Themes) | ||||
|         { | ||||
|             foreach (string themecontrol in theme.ThemeControls.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries)) | ||||
|             { | ||||
|                 themes.Add(themecontrol, theme.Name + " - " + @Utilities.GetTypeNameClass(themecontrol)); | ||||
|             } | ||||
|             foreach (string panelayout in theme.PaneLayouts.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries)) | ||||
|             { | ||||
|                 panelayouts.Add(panelayout, theme.Name + " - " + @Utilities.GetTypeNameClass(panelayout)); | ||||
|             } | ||||
|         } | ||||
|         themes = ThemeService.GetThemeTypes(Themes); | ||||
|         panelayouts = ThemeService.GetPaneLayoutTypes(Themes); | ||||
|  | ||||
|         PageId = Int32.Parse(PageState.QueryString["id"]); | ||||
|         Page p = PageState.Pages.Where(item => item.PageId == PageId).FirstOrDefault(); | ||||
|  | ||||
| @ -136,17 +136,8 @@ | ||||
|     protected override async Task OnInitAsync() | ||||
|     { | ||||
|         List<Theme> Themes = await ThemeService.GetThemesAsync(); | ||||
|         foreach (Theme theme in Themes) | ||||
|         { | ||||
|             foreach (string themeControl in theme.ThemeControls.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries)) | ||||
|             { | ||||
|                 themes.Add(themeControl, theme.Name + " - " + @Utilities.GetTypeNameClass(themeControl)); | ||||
|             } | ||||
|             foreach (string panelayout in theme.PaneLayouts.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries)) | ||||
|             { | ||||
|                 panelayouts.Add(panelayout, theme.Name + " - " + @Utilities.GetTypeNameClass(panelayout)); | ||||
|             } | ||||
|         } | ||||
|         themes = ThemeService.GetThemeTypes(Themes); | ||||
|         panelayouts = ThemeService.GetPaneLayoutTypes(Themes); | ||||
|  | ||||
|         PageId = Int32.Parse(PageState.QueryString["id"]); | ||||
|         Page p = PageState.Pages.Where(item => item.PageId == PageId).FirstOrDefault(); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Shaun Walker
					Shaun Walker