Some styling tweaks

This commit is contained in:
Thomas Hounsell 2017-01-17 22:59:10 +00:00
parent 275478b5cc
commit 3a9a327502
6 changed files with 834 additions and 837 deletions

View File

@ -12,28 +12,28 @@
{ {
RouteValueDictionary rvd = new RouteValueDictionary(rd); RouteValueDictionary rvd = new RouteValueDictionary(rd);
rvd.Remove("page"); rvd.Remove("page");
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("&laquo;"), view, rvd)</li> <li><a href="@MvcIntrinsics.Url.Action(view, rvd)"><i class="fa fa-angle-double-left"></i></a></li>
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("&lsaquo;"), view, rvd)</li> <li><a href="@MvcIntrinsics.Url.Action(view, rvd)"><i class="fa fa-angle-left"></i></a></li>
} }
else if (currentPage > 2) else if (currentPage > 2)
{ {
RouteValueDictionary firstRvd = new RouteValueDictionary(rd); RouteValueDictionary firstRvd = new RouteValueDictionary(rd);
firstRvd.Remove("page"); firstRvd.Remove("page");
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("&laquo;"), view, firstRvd)</li> <li><a href="@MvcIntrinsics.Url.Action(view, firstRvd)"><i class="fa fa-angle-double-left"></i></a></li>
RouteValueDictionary rvd = new RouteValueDictionary(rd) RouteValueDictionary rvd = new RouteValueDictionary(rd)
{ {
["page"] = currentPage - 1 ["page"] = currentPage - 1
}; };
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("&lsaquo;"), multiView, rvd)</li> <li><a href="@MvcIntrinsics.Url.Action(multiView, rvd)"><i class="fa fa-angle-left"></i></a></li>
} }
else else
{ {
<li class="disabled"> <li class="disabled">
<span>&laquo;</span> <span><i class="fa fa-angle-double-left"></i></span>
</li> </li>
<li class="disabled"> <li class="disabled">
<span>&lsaquo;</span> <span><i class="fa fa-angle-left"></i></span>
</li> </li>
} }
@ -82,21 +82,21 @@
["page"] = currentPage + 1 ["page"] = currentPage + 1
}; };
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("&rsaquo;"), multiView, rvd)</li> <li><a href="@MvcIntrinsics.Url.Action(multiView, rvd)"><i class="fa fa-angle-right"></i></a></li>
RouteValueDictionary lastRvd = new RouteValueDictionary(rd) RouteValueDictionary lastRvd = new RouteValueDictionary(rd)
{ {
["page"] = totalPages ["page"] = totalPages
}; };
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("&raquo;"), multiView, lastRvd)</li> <li><a href="@MvcIntrinsics.Url.Action(multiView, lastRvd)"><i class="fa fa-angle-double-right"></i></a></li>
} }
else else
{ {
<li class="disabled"> <li class="disabled">
<span>&rsaquo;</span> <span><i class="fa fa-angle-right"></i></span>
</li> </li>
<li class="disabled"> <li class="disabled">
<span>&raquo;</span> <span><i class="fa fa-angle-double-right"></i></span>
</li> </li>
} }
</ul> </ul>

View File

@ -14,15 +14,13 @@
} }
else else
{ {
<h1 class="eager-wrapping">@VariantTerms.Front_EditBuild @Model.FullBuildString</h1> <h1 class="eager-wrapping">@VariantTerms.Front_EditBuild @Model.AlternateBuildString</h1>
} }
<div class="form-horizontal"> <div class="form-group">
<div class="form-group"> <label for="quickpaste">@VariantTerms.Front_QuickPaste</label>
<label for="quickpaste" class="control-label">@VariantTerms.Front_QuickPaste</label>
<div> <div>
<input id="quickpaste" type="text" class="form-control" /> <input id="quickpaste" type="text" />
</div>
</div> </div>
</div> </div>
@ -30,14 +28,10 @@ else
{ {
@Html.AntiForgeryToken() @Html.AntiForgeryToken()
<div class="form-horizontal">
@Html.ValidationSummary(true) @Html.ValidationSummary(true)
<div class="form-group"> <div class="form-group">
@Html.LabelFor(model => model.MajorVersion, new @Html.LabelFor(model => model.MajorVersion)
{
@class = "control-label"
})
<div> <div>
@Html.TextBoxFor(model => model.MajorVersion) @Html.TextBoxFor(model => model.MajorVersion)
@Html.ValidationMessageFor(model => model.MajorVersion) @Html.ValidationMessageFor(model => model.MajorVersion)
@ -45,10 +39,7 @@ else
</div> </div>
<div class="form-group"> <div class="form-group">
@Html.LabelFor(model => model.MinorVersion, new @Html.LabelFor(model => model.MinorVersion)
{
@class = "control-label"
})
<div> <div>
@Html.TextBoxFor(model => model.MinorVersion) @Html.TextBoxFor(model => model.MinorVersion)
@Html.ValidationMessageFor(model => model.MinorVersion) @Html.ValidationMessageFor(model => model.MinorVersion)
@ -56,10 +47,7 @@ else
</div> </div>
<div class="form-group"> <div class="form-group">
@Html.LabelFor(model => model.Number, new @Html.LabelFor(model => model.Number)
{
@class = "control-label"
})
<div> <div>
@Html.TextBoxFor(model => model.Number) @Html.TextBoxFor(model => model.Number)
@Html.ValidationMessageFor(model => model.Number) @Html.ValidationMessageFor(model => model.Number)
@ -67,10 +55,7 @@ else
</div> </div>
<div class="form-group"> <div class="form-group">
@Html.LabelFor(model => model.Revision, new @Html.LabelFor(model => model.Revision)
{
@class = "control-label"
})
<div> <div>
@Html.TextBoxFor(model => model.Revision) @Html.TextBoxFor(model => model.Revision)
@Html.ValidationMessageFor(model => model.Revision) @Html.ValidationMessageFor(model => model.Revision)
@ -78,10 +63,7 @@ else
</div> </div>
<div class="form-group"> <div class="form-group">
@Html.LabelFor(model => model.Lab, new @Html.LabelFor(model => model.Lab)
{
@class = "control-label"
})
<div> <div>
@Html.TextBoxFor(model => model.Lab) @Html.TextBoxFor(model => model.Lab)
@Html.ValidationMessageFor(model => model.Lab) @Html.ValidationMessageFor(model => model.Lab)
@ -89,10 +71,7 @@ else
</div> </div>
<div class="form-group"> <div class="form-group">
@Html.LabelFor(model => model.BuildTime, new @Html.LabelFor(model => model.BuildTime)
{
@class = "control-label"
})
<div> <div>
@Html.TextBoxFor(model => model.BuildTime, "{0:yyMMdd-HHmm}") @Html.TextBoxFor(model => model.BuildTime, "{0:yyMMdd-HHmm}")
@Html.ValidationMessageFor(model => model.BuildTime) @Html.ValidationMessageFor(model => model.BuildTime)
@ -100,58 +79,42 @@ else
</div> </div>
<div class="form-group"> <div class="form-group">
@Html.LabelFor(model => model.SourceType, new @Html.LabelFor(model => model.SourceType)
{
@class = "control-label"
})
<div> <div>
@Html.DropDownListFor(model => model.SourceType, EnumHelper.GetSelectList(typeof(TypeOfSource)), new @Html.DropDownListFor(model => model.SourceType, EnumHelper.GetSelectList(typeof(TypeOfSource)))
{
@class = "form-control"
})
@Html.ValidationMessageFor(model => model.SourceType) @Html.ValidationMessageFor(model => model.SourceType)
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@Html.LabelFor(model => model.LeakDate, new @Html.LabelFor(model => model.LeakDate)
{
@class = "control-label"
})
<div> <div>
@Html.TextBoxFor(model => model.LeakDate, "{0:dd/MM/yyyy}", new <div class="group-input-button">
{ @Html.TextBoxFor(model => model.LeakDate, "{0:dd/MM/yyyy}")
@class = "form-control" <button onclick="$('#@Html.IdFor(model => model.LeakDate)').val('@DateTime.Now.ToShortDateString()');return false;">@VariantTerms.Front_Today</button>
}) </div>
<button onclick="$('#@Html.IdFor(model => model.LeakDate)').val('@DateTime.Now.ToShortDateString()');return false;" class="btn btn-success btn-block btn-reset">@VariantTerms.Front_Today</button>
@Html.ValidationMessageFor(model => model.LeakDate) @Html.ValidationMessageFor(model => model.LeakDate)
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@Html.LabelFor(model => model.SourceDetails, new @Html.LabelFor(model => model.SourceDetails)
{
@class = "control-label"
})
<div class="wide-group"> <div class="wide-group">
@Html.TextAreaFor(model => model.SourceDetails, new @Html.TextAreaFor(model => model.SourceDetails)
{
@class = "form-control",
rows = "5"
})
@Html.ValidationMessageFor(model => model.SourceDetails) @Html.ValidationMessageFor(model => model.SourceDetails)
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label></label>
<div> <div>
<input type="submit" value="@((string)ViewContext.RouteData.Values["action"] == "addBuild" <input type="submit" value="@((string)ViewContext.RouteData.Values["action"] == "addBuild"
? VariantTerms.Common_AddBuild ? VariantTerms.Common_AddBuild
: VariantTerms.Front_EditBuild)" class="btn btn-primary" /> : VariantTerms.Front_EditBuild)" class="btn btn-primary" />
&ensp; &ensp;
<a href="/" onclick="window.history.back();return false;" class="button"> <a href="/" onclick="window.history.back();return false;" class="button">
@VariantTerms.Front_ReturnToListing</a> @VariantTerms.Front_ReturnToListing
</div> </a>
</div> </div>
</div> </div>
} }
@ -211,9 +174,13 @@ else
$("#quickpaste") $("#quickpaste")
.change(function() .change(function()
{ {
var regex = var regex = /(([\d]{1,2})\.([\d]{1,2})\.)?([\d]{4,5})(\.([\d]{1,5}))?\.([a-zA-Z0-9._\(\)-]+?)\.(\d\d\d\d\d\d-\d\d\d\d)/;
/(([\d]{1,2})\.([\d]{1,2})\.)?([\d]{4,5})(\.([\d]{1,5}))?\.([a-zA-Z0-9._\(\)-]+?)\.(\d\d\d\d\d\d-\d\d\d\d)/;
var result = regex.exec($("#quickpaste").val()); var result = regex.exec($("#quickpaste").val());
if (result === null)
{
regex = /(([\d]{1,2})\.([\d]{1,2})\.)?([\d]{4,5})(\.([\d]{1,5}))?\s+\(([a-zA-Z0-9._\(\)-]+?)\.(\d\d\d\d\d\d-\d\d\d\d)\)/;
result = regex.exec($("#quickpaste").val());
}
$("#MajorVersion").val(result[2]); $("#MajorVersion").val(result[2]);
$("#MinorVersion").val(result[3]); $("#MinorVersion").val(result[3]);

View File

@ -75,7 +75,7 @@
{ {
lab = Model.LabUrl lab = Model.LabUrl
})" class="more-link"> })" class="more-link">
<i class="fa fa-plus-square-o fa-sm"></i>&nbsp; <i class="fa fa-plus-circle fa-sm"></i>&nbsp;
@string.Format(VariantTerms.Front_MoreFromLab, Model.Lab) @string.Format(VariantTerms.Front_MoreFromLab, Model.Lab)
</a> </a>
} }
@ -92,7 +92,7 @@
{ {
year = Model.BuildTime.Value.Year year = Model.BuildTime.Value.Year
})" class="more-link"> })" class="more-link">
<i class="fa fa-plus-square-o fa-sm"></i>&nbsp; <i class="fa fa-plus-circle fa-sm"></i>&nbsp;
@string.Format(VariantTerms.Front_MoreFromYear, Model.BuildTime.Value.Year) @string.Format(VariantTerms.Front_MoreFromYear, Model.BuildTime.Value.Year)
</a> </a>
} }
@ -108,7 +108,7 @@
{ {
source = Model.SourceType source = Model.SourceType
})" class="more-link"> })" class="more-link">
<i class="fa fa-plus-square-o fa-sm"></i>&nbsp; <i class="fa fa-plus-circle fa-sm"></i>&nbsp;
@string.Format(VariantTerms.Front_MoreFromSource, MvcExtensions.GetDisplayTextForEnum(Model.SourceType)) @string.Format(VariantTerms.Front_MoreFromSource, MvcExtensions.GetDisplayTextForEnum(Model.SourceType))
</a> </a>
</div> </div>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -373,7 +373,7 @@ article
&.latest-flex-red &.latest-flex-red
{ {
border: #{(2em / 6)} solid #FF2626; border: #{(1em / 4)} solid #FF2626;
h3.latest-flex-title h3.latest-flex-title
{ {
@ -383,7 +383,7 @@ article
&.latest-flex-yellow &.latest-flex-yellow
{ {
border: #{(2em / 6)} solid #FF9F19; border: #{(1em / 4)} solid #FF9F19;
h3.latest-flex-title h3.latest-flex-title
{ {
@ -393,7 +393,7 @@ article
&.latest-flex-green &.latest-flex-green
{ {
border: #{(2em / 6)} solid #12B23F; border: #{(1em / 4)} solid #12B23F;
h3.latest-flex-title h3.latest-flex-title
{ {
@ -478,24 +478,32 @@ article
.form-group .form-group
{ {
margin-bottom: 1.5em; margin-bottom: 1.5em;
display: flex;
flex-wrap: wrap;
> label > label
{ {
width: 20%; width: 20%;
text-align: right; max-width: 240px;
min-width: 120px;
text-align: left;
font-weight: bold; font-weight: bold;
margin-right: 1em; margin-right: 1em;
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
margin-top: #{(1em / 4)}; margin-top: #{(1em / 4)};
flex-grow: 1;
} }
> div > div
{ {
margin-left: calc(20% + 1em); margin-left: calc(20% + 1em);
width: 30%; width: 40%;
min-width: 240px;
max-width: 560px;
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
flex-grow: 2;
input, textarea, select input, textarea, select
{ {
@ -503,8 +511,30 @@ article
box-sizing: border-box; box-sizing: border-box;
border: 1px solid; border: 1px solid;
padding: #{(1em / 3)} #{(1em / 2)}; padding: #{(1em / 3)} #{(1em / 2)};
border-radius: 2px; border-radius: #{(1em / 6)};
line-height: 1em; line-height: 1em;
border-color: #888;
}
.group-input-button
{
display: flex;
input
{
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-right: 0;
}
button
{
border-top-left-radius: 0;
border-bottom-left-radius: 0;
width: 120px;
border: 1px solid #888;
border-left: 0;
}
} }
input[type=submit], input[type=submit],
@ -579,7 +609,7 @@ article
ul.pagination ul.pagination
{ {
text-align: center; text-align: center;
margin: 0 0 1em; margin: 0.5em 0 1em;
padding: 0; padding: 0;
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -587,15 +617,15 @@ ul.pagination
> li > li
{ {
list-style: none; list-style: none;
width: 1.5em; width: 1.8em;
line-height: 1.5em; line-height: 1.8em;
margin: 0 #{(1em / 4)}; margin: 0 #{(1em / 3)};
> a, > a,
> span > span
{ {
display: block; display: block;
border-radius: 0.5em; border-radius: #{(1em / 3)};
text-decoration: none; text-decoration: none;
} }