InputSize simplification
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Data.SqlTypes;
|
||||
using System.Linq;
|
||||
@@ -8,9 +7,7 @@ using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using MileageTraker.Web.Models;
|
||||
using MiscUtil.Collections;
|
||||
|
||||
namespace MileageTraker.Web.Utility
|
||||
{
|
||||
@@ -53,6 +50,15 @@ namespace MileageTraker.Web.Utility
|
||||
: enumeration.ToString();
|
||||
}
|
||||
|
||||
public static Dictionary<string, object> GetInputSizeClass(this HtmlHelper helper)
|
||||
{
|
||||
var inputSize = (string)helper.ViewData.ModelMetadata.AdditionalValues["InputSize"];
|
||||
//var cls = !string.IsNullOrEmpty(inputSize) ? new { @class = inputSize } : null;
|
||||
|
||||
var dictionary = new Dictionary<string, object> {{"class", inputSize}};
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
public static IEnumerable<SelectListItem> GetSelectListItems(this Enum enumeration)
|
||||
{
|
||||
var type = enumeration.GetType();
|
||||
|
||||
Reference in New Issue
Block a user