New style partially complete

This commit is contained in:
2012-12-12 15:32:03 -05:00
parent 86ee45c184
commit 14d8054f22
85 changed files with 10261 additions and 1081 deletions
@@ -1,4 +1,12 @@
@{
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
var inputSize = (string)ViewData.ModelMetadata.AdditionalValues["InputSize"];
}
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue)
@if (!string.IsNullOrEmpty(inputSize))
{
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, new { @class = inputSize})
}
else
{
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue)
}
+4 -4
View File
@@ -9,10 +9,10 @@
foreach (var li in listItems)
{
var fieldName = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}_{1}", prefix.Replace('.', '_'), index++);
<span class="radiobutton">
@Html.RadioButton(prefix, li.Value, li.Selected, new { @id = fieldName })
@Html.Label(fieldName, li.Text)
</span>
<label class="radio">
@Html.RadioButton(prefix, li.Value, li.Selected, new { @id = fieldName })
@li.Text
</label>
}
ViewData.TemplateInfo.HtmlFieldPrefix = prefix;
}
@@ -2,6 +2,6 @@
@using MileageTraker.Web.Utility
@model MileageTraker.Web.ViewModels.LogResultsViewModel
@Html.DropDownList("Year", new SelectList(Model.Years, Model.SelectedYear))
@Html.DropDownList("Month", new SelectList(Model.Months, Model.SelectedMonth))
@Html.DropDownList("LogType", typeof(MileageLogType).ToSelectList(Model.SelectedLogType, "Log Type"))
@Html.DropDownList("Year", new SelectList(Model.Years, Model.SelectedYear), new { @class = "input-small" })
@Html.DropDownList("Month", new SelectList(Model.Months, Model.SelectedMonth), new { @class = "input-mini" })
@Html.DropDownList("LogType", typeof(MileageLogType).ToSelectList(Model.SelectedLogType, "Log Type"), new { @class = "input-medium" })
@@ -1,9 +1,17 @@
@{
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
var inputSize = (string)ViewData.ModelMetadata.AdditionalValues["InputSize"];
}
@if (!(Model is Enum))
{
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue)
if (!string.IsNullOrEmpty(inputSize))
{
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, new { @class = inputSize})
}
else
{
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue)
}
}
else
{
@@ -7,20 +7,27 @@
var editLabel = (bool)ViewData.ModelMetadata.AdditionalValues["EditLabel"];
}
<div class="editor-field-container @lowerPropertyName">
<div class="control-group @lowerPropertyName">
@if (editLabel) {
<div class="editor-label">
<div class="control-label">
@Html.LabelForModel()
</div>
}
<div class="editor-field">
@RenderBody()
@if (!string.IsNullOrEmpty(units)) {
<span class="units">@units</span>
}
<div class="controls">
@if (!string.IsNullOrEmpty(units))
{
<div class="input-append">
@RenderBody()
<span class="add-on">@units</span>
</div>
}
else
{
@RenderBody()
}
@if (!string.IsNullOrEmpty(formatHint)) {
<div class="format-hint">@formatHint</div>
<div><small><em>@formatHint</em></small></div>
}
@Html.ValidationMessage("")
<span class="help-inline">@Html.ValidationMessage("")</span>
</div>
</div>