From 5247cf6328e83ebd05a9f77a1f1f9e960965068d Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Wed, 19 Dec 2018 10:01:24 +0300 Subject: [PATCH] Removed redundant code --- .../TagHelpers/Table/AbpTableStyleTagHelper.cs | 4 +--- .../Table/AbpTableStyleTagHelperService.cs | 12 ++---------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Table/AbpTableStyleTagHelper.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Table/AbpTableStyleTagHelper.cs index dadb22af1c..53452e9c68 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Table/AbpTableStyleTagHelper.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Table/AbpTableStyleTagHelper.cs @@ -6,9 +6,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Table [HtmlTargetElement("td")] public class AbpTableStyleTagHelper : AbpTagHelper { - public AbpTableStyle AbpTableStyle { get; set; } = AbpTableStyle.Default; - - public AbpTableStyle AbpDarkTableStyle { get; set; } = AbpTableStyle.Default; + public AbpTableStyle TableStyle { get; set; } = AbpTableStyle.Default; public AbpTableStyleTagHelper(AbpTableStyleTagHelperService tagHelperService) : base(tagHelperService) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Table/AbpTableStyleTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Table/AbpTableStyleTagHelperService.cs index 716233b888..fe93d7273e 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Table/AbpTableStyleTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Table/AbpTableStyleTagHelperService.cs @@ -12,17 +12,9 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Table protected virtual void SetStyle(TagHelperContext context, TagHelperOutput output) { - if (TagHelper.AbpTableStyle != AbpTableStyle.Default) + if (TagHelper.TableStyle != AbpTableStyle.Default) { - output.Attributes.AddClass("table-" + TagHelper.AbpTableStyle.ToString().ToLowerInvariant()); - } - } - - protected virtual void SetDarkTableStyle(TagHelperContext context, TagHelperOutput output) - { - if (TagHelper.AbpDarkTableStyle != AbpTableStyle.Default) - { - output.Attributes.AddClass("bg-" + TagHelper.AbpDarkTableStyle.ToString().ToLowerInvariant()); + output.Attributes.AddClass("table-" + TagHelper.TableStyle.ToString().ToLowerInvariant()); } } }