Some styling tweaks
parent
275478b5cc
commit
3a9a327502
|
@ -12,28 +12,28 @@
|
|||
{
|
||||
RouteValueDictionary rvd = new RouteValueDictionary(rd);
|
||||
rvd.Remove("page");
|
||||
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("«"), view, rvd)</li>
|
||||
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("‹"), view, rvd)</li>
|
||||
<li><a href="@MvcIntrinsics.Url.Action(view, rvd)"><i class="fa fa-angle-double-left"></i></a></li>
|
||||
<li><a href="@MvcIntrinsics.Url.Action(view, rvd)"><i class="fa fa-angle-left"></i></a></li>
|
||||
}
|
||||
else if (currentPage > 2)
|
||||
{
|
||||
RouteValueDictionary firstRvd = new RouteValueDictionary(rd);
|
||||
firstRvd.Remove("page");
|
||||
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("«"), view, firstRvd)</li>
|
||||
RouteValueDictionary firstRvd = new RouteValueDictionary(rd);
|
||||
firstRvd.Remove("page");
|
||||
<li><a href="@MvcIntrinsics.Url.Action(view, firstRvd)"><i class="fa fa-angle-double-left"></i></a></li>
|
||||
|
||||
RouteValueDictionary rvd = new RouteValueDictionary(rd)
|
||||
{
|
||||
["page"] = currentPage - 1
|
||||
};
|
||||
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("‹"), multiView, rvd)</li>
|
||||
RouteValueDictionary rvd = new RouteValueDictionary(rd)
|
||||
{
|
||||
["page"] = currentPage - 1
|
||||
};
|
||||
<li><a href="@MvcIntrinsics.Url.Action(multiView, rvd)"><i class="fa fa-angle-left"></i></a></li>
|
||||
}
|
||||
else
|
||||
{
|
||||
<li class="disabled">
|
||||
<span>«</span>
|
||||
<span><i class="fa fa-angle-double-left"></i></span>
|
||||
</li>
|
||||
<li class="disabled">
|
||||
<span>‹</span>
|
||||
<span><i class="fa fa-angle-left"></i></span>
|
||||
</li>
|
||||
}
|
||||
|
||||
|
@ -77,26 +77,26 @@
|
|||
|
||||
@if (currentPage < totalPages)
|
||||
{
|
||||
RouteValueDictionary rvd = new RouteValueDictionary(rd)
|
||||
{
|
||||
["page"] = currentPage + 1
|
||||
};
|
||||
RouteValueDictionary rvd = new RouteValueDictionary(rd)
|
||||
{
|
||||
["page"] = currentPage + 1
|
||||
};
|
||||
|
||||
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("›"), 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)
|
||||
{
|
||||
["page"] = totalPages
|
||||
};
|
||||
<li>@MvcIntrinsics.Html.ActionLink(HttpUtility.HtmlDecode("»"), multiView, lastRvd)</li>
|
||||
RouteValueDictionary lastRvd = new RouteValueDictionary(rd)
|
||||
{
|
||||
["page"] = totalPages
|
||||
};
|
||||
<li><a href="@MvcIntrinsics.Url.Action(multiView, lastRvd)"><i class="fa fa-angle-double-right"></i></a></li>
|
||||
}
|
||||
else
|
||||
{
|
||||
<li class="disabled">
|
||||
<span>›</span>
|
||||
<span><i class="fa fa-angle-right"></i></span>
|
||||
</li>
|
||||
<li class="disabled">
|
||||
<span>»</span>
|
||||
<span><i class="fa fa-angle-double-right"></i></span>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
|
|
|
@ -1,227 +1,194 @@
|
|||
@using BuildFeed.Model
|
||||
@model BuildFeed.Model.Build
|
||||
@{
|
||||
ViewBag.Title = (string)ViewContext.RouteData.Values["action"] == "addBuild"
|
||||
? $"{VariantTerms.Common_AddBuild} | {InvariantTerms.SiteName}"
|
||||
: $"{VariantTerms.Front_EditBuild} {Model.FullBuildString} | {InvariantTerms.SiteName}";
|
||||
Html.EnableClientValidation();
|
||||
Html.EnableUnobtrusiveJavaScript();
|
||||
ViewBag.Title = (string)ViewContext.RouteData.Values["action"] == "addBuild"
|
||||
? $"{VariantTerms.Common_AddBuild} | {InvariantTerms.SiteName}"
|
||||
: $"{VariantTerms.Front_EditBuild} {Model.FullBuildString} | {InvariantTerms.SiteName}";
|
||||
Html.EnableClientValidation();
|
||||
Html.EnableUnobtrusiveJavaScript();
|
||||
}
|
||||
|
||||
@if ((string)ViewContext.RouteData.Values["action"] == "addBuild")
|
||||
{
|
||||
<h1>@VariantTerms.Common_AddBuild</h1>
|
||||
<h1>@VariantTerms.Common_AddBuild</h1>
|
||||
}
|
||||
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">
|
||||
<label for="quickpaste" class="control-label">@VariantTerms.Front_QuickPaste</label>
|
||||
<div>
|
||||
<input id="quickpaste" type="text" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="quickpaste">@VariantTerms.Front_QuickPaste</label>
|
||||
<div>
|
||||
<input id="quickpaste" type="text" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<div class="form-horizontal">
|
||||
@Html.ValidationSummary(true)
|
||||
@Html.ValidationSummary(true)
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.MajorVersion, new
|
||||
{
|
||||
@class = "control-label"
|
||||
})
|
||||
<div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.MajorVersion)
|
||||
<div>
|
||||
@Html.TextBoxFor(model => model.MajorVersion)
|
||||
@Html.ValidationMessageFor(model => model.MajorVersion)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.MinorVersion, new
|
||||
{
|
||||
@class = "control-label"
|
||||
})
|
||||
<div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.MinorVersion)
|
||||
<div>
|
||||
@Html.TextBoxFor(model => model.MinorVersion)
|
||||
@Html.ValidationMessageFor(model => model.MinorVersion)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.Number, new
|
||||
{
|
||||
@class = "control-label"
|
||||
})
|
||||
<div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.Number)
|
||||
<div>
|
||||
@Html.TextBoxFor(model => model.Number)
|
||||
@Html.ValidationMessageFor(model => model.Number)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.Revision, new
|
||||
{
|
||||
@class = "control-label"
|
||||
})
|
||||
<div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.Revision)
|
||||
<div>
|
||||
@Html.TextBoxFor(model => model.Revision)
|
||||
@Html.ValidationMessageFor(model => model.Revision)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.Lab, new
|
||||
{
|
||||
@class = "control-label"
|
||||
})
|
||||
<div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.Lab)
|
||||
<div>
|
||||
@Html.TextBoxFor(model => model.Lab)
|
||||
@Html.ValidationMessageFor(model => model.Lab)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.BuildTime, new
|
||||
{
|
||||
@class = "control-label"
|
||||
})
|
||||
<div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.BuildTime)
|
||||
<div>
|
||||
@Html.TextBoxFor(model => model.BuildTime, "{0:yyMMdd-HHmm}")
|
||||
@Html.ValidationMessageFor(model => model.BuildTime)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.SourceType, new
|
||||
{
|
||||
@class = "control-label"
|
||||
})
|
||||
<div>
|
||||
@Html.DropDownListFor(model => model.SourceType, EnumHelper.GetSelectList(typeof(TypeOfSource)), new
|
||||
{
|
||||
@class = "form-control"
|
||||
})
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.SourceType)
|
||||
<div>
|
||||
@Html.DropDownListFor(model => model.SourceType, EnumHelper.GetSelectList(typeof(TypeOfSource)))
|
||||
@Html.ValidationMessageFor(model => model.SourceType)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.LeakDate, new
|
||||
{
|
||||
@class = "control-label"
|
||||
})
|
||||
<div>
|
||||
@Html.TextBoxFor(model => model.LeakDate, "{0:dd/MM/yyyy}", new
|
||||
{
|
||||
@class = "form-control"
|
||||
})
|
||||
<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>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.LeakDate)
|
||||
<div>
|
||||
<div class="group-input-button">
|
||||
@Html.TextBoxFor(model => model.LeakDate, "{0:dd/MM/yyyy}")
|
||||
<button onclick="$('#@Html.IdFor(model => model.LeakDate)').val('@DateTime.Now.ToShortDateString()');return false;">@VariantTerms.Front_Today</button>
|
||||
</div>
|
||||
@Html.ValidationMessageFor(model => model.LeakDate)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.SourceDetails, new
|
||||
{
|
||||
@class = "control-label"
|
||||
})
|
||||
<div class="wide-group">
|
||||
@Html.TextAreaFor(model => model.SourceDetails, new
|
||||
{
|
||||
@class = "form-control",
|
||||
rows = "5"
|
||||
})
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.SourceDetails)
|
||||
<div class="wide-group">
|
||||
@Html.TextAreaFor(model => model.SourceDetails)
|
||||
@Html.ValidationMessageFor(model => model.SourceDetails)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div>
|
||||
<div class="form-group">
|
||||
<label></label>
|
||||
<div>
|
||||
<input type="submit" value="@((string)ViewContext.RouteData.Values["action"] == "addBuild"
|
||||
? VariantTerms.Common_AddBuild
|
||||
: VariantTerms.Front_EditBuild)" class="btn btn-primary" />
|
||||
? VariantTerms.Common_AddBuild
|
||||
: VariantTerms.Front_EditBuild)" class="btn btn-primary" />
|
||||
 
|
||||
<a href="/" onclick="window.history.back();return false;" class="button">
|
||||
@VariantTerms.Front_ReturnToListing</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@VariantTerms.Front_ReturnToListing
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@section Scripts
|
||||
{
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js" type="text/javascript"></script>
|
||||
<script src="~/Scripts/trumbowyg/trumbowyg.min.js" type="text/javascript"></script>
|
||||
<link href="~/Scripts/trumbowyg/ui/trumbowyg.min.css" rel="stylesheet" type="text/css" />
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js" type="text/javascript"></script>
|
||||
<script src="~/Scripts/trumbowyg/trumbowyg.min.js" type="text/javascript"></script>
|
||||
<link href="~/Scripts/trumbowyg/ui/trumbowyg.min.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="~/Scripts/jquery.validate.js" type="text/javascript"></script>
|
||||
<script src="~/Scripts/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>
|
||||
<script src="~/Scripts/jquery.validate.js" type="text/javascript"></script>
|
||||
<script src="~/Scripts/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function($)
|
||||
{
|
||||
$.validator.addMethod('date',
|
||||
function(value, element)
|
||||
{
|
||||
if (this.optional(element))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
<script type="text/javascript">
|
||||
jQuery(function($)
|
||||
{
|
||||
$.validator.addMethod('date',
|
||||
function(value, element)
|
||||
{
|
||||
if (this.optional(element))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
var ok = true;
|
||||
try
|
||||
{
|
||||
new Date(Date.parse(value, "yyMMdd-HHmm"));
|
||||
}
|
||||
catch (err)
|
||||
{
|
||||
ok = false;
|
||||
}
|
||||
return ok;
|
||||
});
|
||||
});
|
||||
var ok = true;
|
||||
try
|
||||
{
|
||||
new Date(Date.parse(value, "yyMMdd-HHmm"));
|
||||
}
|
||||
catch (err)
|
||||
{
|
||||
ok = false;
|
||||
}
|
||||
return ok;
|
||||
});
|
||||
});
|
||||
|
||||
$(function()
|
||||
{
|
||||
var btnsGrps = $.trumbowyg.btnsGrps;
|
||||
$(function()
|
||||
{
|
||||
var btnsGrps = $.trumbowyg.btnsGrps;
|
||||
|
||||
$("#@Html.IdFor(model => model.SourceDetails)")
|
||||
.trumbowyg({
|
||||
semantic: true,
|
||||
autogrow: true,
|
||||
btns: [
|
||||
'viewHTML',
|
||||
'|', 'strong', 'em',
|
||||
'|', 'link',
|
||||
'|', btnsGrps.justify,
|
||||
'|', btnsGrps.lists
|
||||
]
|
||||
});
|
||||
$("#@Html.IdFor(model => model.SourceDetails)")
|
||||
.trumbowyg({
|
||||
semantic: true,
|
||||
autogrow: true,
|
||||
btns: [
|
||||
'viewHTML',
|
||||
'|', 'strong', 'em',
|
||||
'|', 'link',
|
||||
'|', btnsGrps.justify,
|
||||
'|', btnsGrps.lists
|
||||
]
|
||||
});
|
||||
|
||||
$(".trumbowyg").addClass("trumbowyg-black");
|
||||
$(".trumbowyg").addClass("trumbowyg-black");
|
||||
|
||||
$("#quickpaste")
|
||||
.change(function()
|
||||
{
|
||||
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)/;
|
||||
var result = regex.exec($("#quickpaste").val());
|
||||
$("#quickpaste")
|
||||
.change(function()
|
||||
{
|
||||
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)/;
|
||||
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]);
|
||||
$("#MinorVersion").val(result[3]);
|
||||
$("#Number").val(result[4]);
|
||||
$("#Revision").val(result[6]);
|
||||
$("#Lab").val(result[7]);
|
||||
$("#BuildTime").val(result[8]);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
$("#MajorVersion").val(result[2]);
|
||||
$("#MinorVersion").val(result[3]);
|
||||
$("#Number").val(result[4]);
|
||||
$("#Revision").val(result[6]);
|
||||
$("#Lab").val(result[7]);
|
||||
$("#BuildTime").val(result[8]);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
|
@ -75,7 +75,7 @@
|
|||
{
|
||||
lab = Model.LabUrl
|
||||
})" class="more-link">
|
||||
<i class="fa fa-plus-square-o fa-sm"></i>
|
||||
<i class="fa fa-plus-circle fa-sm"></i>
|
||||
@string.Format(VariantTerms.Front_MoreFromLab, Model.Lab)
|
||||
</a>
|
||||
}
|
||||
|
@ -92,7 +92,7 @@
|
|||
{
|
||||
year = Model.BuildTime.Value.Year
|
||||
})" class="more-link">
|
||||
<i class="fa fa-plus-square-o fa-sm"></i>
|
||||
<i class="fa fa-plus-circle fa-sm"></i>
|
||||
@string.Format(VariantTerms.Front_MoreFromYear, Model.BuildTime.Value.Year)
|
||||
</a>
|
||||
}
|
||||
|
@ -108,7 +108,7 @@
|
|||
{
|
||||
source = Model.SourceType
|
||||
})" class="more-link">
|
||||
<i class="fa fa-plus-square-o fa-sm"></i>
|
||||
<i class="fa fa-plus-circle fa-sm"></i>
|
||||
@string.Format(VariantTerms.Front_MoreFromSource, MvcExtensions.GetDisplayTextForEnum(Model.SourceType))
|
||||
</a>
|
||||
</div>
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue