Remove BlackBerry customizations

This commit is contained in:
2012-12-07 14:30:36 -05:00
parent 3272dd7975
commit 082edc214c
7 changed files with 9 additions and 80 deletions
-4
View File
@@ -1,4 +0,0 @@
body
{
width: 315px;
}
-25
View File
@@ -1,25 +0,0 @@
.editor-field-container
{
display: inline-block;
vertical-align: top;
padding-right: 8px;
}
.display-field-container
{
display: inline-block;
vertical-align: top;
padding-right: 8px;
}
.logType.editor-field-container
{
padding-right: 0px;
}
.submit
{
display: inline-block;
padding-left: 20px;
vertical-align: middle;
}
-7
View File
@@ -4,7 +4,6 @@ using System.ComponentModel.DataAnnotations;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using System.Web;
using System.Web.Mvc; using System.Web.Mvc;
namespace MileageTraker.Web.Utility namespace MileageTraker.Web.Utility
@@ -136,12 +135,6 @@ namespace MileageTraker.Web.Utility
sb.Append(" ago"); sb.Append(" ago");
return sb.ToString(); return sb.ToString();
} }
public static bool IsBlackBerry(this HttpRequestBase request)
{
//return true;
return request.UserAgent != null && request.UserAgent.Contains("BlackBerry");
}
public static bool IsCollection(this Type type) public static bool IsCollection(this Type type)
{ {
+2 -10
View File
@@ -1,10 +1,8 @@
@using MileageTraker.Web.Utility @model MileageTraker.Web.ViewModels.ConfirmCreateLogViewModel
@model MileageTraker.Web.ViewModels.ConfirmCreateLogViewModel
@{ @{
ViewBag.Title = "Confirm"; ViewBag.Title = "Confirm";
var blackBerry = Request.IsBlackBerry(); ViewBag.PageStyle = "~/Content/CreateLog/Index.css";
ViewBag.PageStyle = blackBerry ? "~/Content/CreateLog/BlackBerry.css" : "~/Content/CreateLog/Index.css";
Layout = "~/Views/Shared/_Layout.min.cshtml"; Layout = "~/Views/Shared/_Layout.min.cshtml";
var endOdometerStyle = Model.PreviousOdometer != null ? "style=padding-bottom:0px;" : ""; var endOdometerStyle = Model.PreviousOdometer != null ? "style=padding-bottom:0px;" : "";
} }
@@ -12,11 +10,8 @@
@using (Html.BeginForm("Action", "CreateLog", FormMethod.Post)) @using (Html.BeginForm("Action", "CreateLog", FormMethod.Post))
{ {
if (!blackBerry)
{
@:<fieldset> @:<fieldset>
<legend>@ViewBag.Title</legend> <legend>@ViewBag.Title</legend>
}
<p class="warning">Please <strong>confirm</strong> - entry not complete until <strong>confirm</strong> clicked</p> <p class="warning">Please <strong>confirm</strong> - entry not complete until <strong>confirm</strong> clicked</p>
if (Model.Miles == 0) if (Model.Miles == 0)
{ {
@@ -85,8 +80,5 @@
<input type="submit" name="Edit" value="Back" /> <input type="submit" name="Edit" value="Back" />
<input type="submit" name="Confirm" value="Confirm" /> <input type="submit" name="Confirm" value="Confirm" />
</div> </div>
if (!blackBerry)
{
@:</fieldset> @:</fieldset>
}
} }
+2 -9
View File
@@ -1,10 +1,8 @@
@using MileageTraker.Web.Utility @model MileageTraker.Web.ViewModels.CreateLogViewModel
@model MileageTraker.Web.ViewModels.CreateLogViewModel
@{ @{
ViewBag.Title = "Enter Mileage Log"; ViewBag.Title = "Enter Mileage Log";
var blackBerry = Request.IsBlackBerry(); ViewBag.PageStyle = "~/Content/CreateLog/Index.css";
ViewBag.PageStyle = blackBerry ? "~/Content/CreateLog/BlackBerry.css" : "~/Content/CreateLog/Index.css";
Layout = "~/Views/Shared/_Layout.min.cshtml"; Layout = "~/Views/Shared/_Layout.min.cshtml";
} }
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
@@ -13,17 +11,12 @@
@using (Html.BeginForm("Index", "CreateLog", FormMethod.Post)) @using (Html.BeginForm("Index", "CreateLog", FormMethod.Post))
{ {
if (!blackBerry) {
@:<fieldset> @:<fieldset>
<legend>@ViewBag.Title</legend> <legend>@ViewBag.Title</legend>
}
@Html.ValidationSummary(true) @Html.ValidationSummary(true)
@Html.EditorForModel() @Html.EditorForModel()
<div class="submit"> <div class="submit">
<input type="submit" value="Submit" /> <input type="submit" value="Submit" />
</div> </div>
if (!blackBerry)
{
@:</fieldset> @:</fieldset>
}
} }
+4 -10
View File
@@ -1,17 +1,13 @@
@using MileageTraker.Web.Utility
@model MileageTraker.Web.ViewModels.CreateLogViewModel @model MileageTraker.Web.ViewModels.CreateLogViewModel
@{ @{
ViewBag.Title = "Success"; ViewBag.Title = "Success";
var blackBerry = Request.IsBlackBerry(); ViewBag.PageStyle = "~/Content/CreateLog/Index.css";
ViewBag.PageStyle = blackBerry ? "~/Content/CreateLog/BlackBerry.css" : "~/Content/CreateLog/Index.css";
Layout = "~/Views/Shared/_Layout.min.cshtml"; Layout = "~/Views/Shared/_Layout.min.cshtml";
} }
@{
@if (!blackBerry) {
@:<fieldset> @:<fieldset>
<legend>@ViewBag.Title</legend> <legend>@ViewBag.Title</legend>
}
<p> <p>
You've successfully created an entry You've successfully created an entry
for <strong>@Html.Encode(Model.EmployeeName)</strong> for <strong>@Html.Encode(Model.EmployeeName)</strong>
@@ -22,8 +18,6 @@
<p> <p>
@Html.ActionLink("Create another", "Index", null, new { @class = "ui-button" }) @Html.ActionLink("Create another", "Index", null, new { @class = "ui-button" })
</p> </p>
@if (!blackBerry)
{
@:</fieldset>
}
@:</fieldset>
}
+1 -15
View File
@@ -1,38 +1,24 @@
@using MileageTraker.Web.Utility <!DOCTYPE html>
<!DOCTYPE html>
<html> <html>
<head> <head>
<title>Mileage Traker - ETHRA - @ViewBag.Title</title> <title>Mileage Traker - ETHRA - @ViewBag.Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link href="@Url.Content("~/Content/Site.min.css")" rel="stylesheet" type="text/css" /> <link href="@Url.Content("~/Content/Site.min.css")" rel="stylesheet" type="text/css" />
@if (Request.IsBlackBerry())
{
<link href="@Url.Content("~/Content/BlackBerry.css")" rel="stylesheet" type="text/css" />
}
else
{
<link href="@Url.Content("~/Content/themes/custom-theme/jquery-ui-1.8.13.custom.css")" rel="stylesheet" type="text/css" /> <link href="@Url.Content("~/Content/themes/custom-theme/jquery-ui-1.8.13.custom.css")" rel="stylesheet" type="text/css" />
}
@if (ViewBag.PageStyle != null) @if (ViewBag.PageStyle != null)
{ {
<link href="@Url.Content(ViewBag.PageStyle)" rel="stylesheet" type="text/css" /> <link href="@Url.Content(ViewBag.PageStyle)" rel="stylesheet" type="text/css" />
} }
<script src="@Url.Content("~/Scripts/jquery-1.7.2.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery-1.7.2.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.numeric.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.numeric.js")" type="text/javascript"></script>
@if (!Request.IsBlackBerry())
{
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.13.custom.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery-ui-1.8.13.custom.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/Shared/Site.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/Shared/Site.js")" type="text/javascript"></script>
}
</head> </head>
<body> <body>
@if (!Request.IsBlackBerry())
{
<div id="header"> <div id="header">
<img src="@Url.Content("~/Content/Header_white.png")" alt="Mileage Traker" /> <img src="@Url.Content("~/Content/Header_white.png")" alt="Mileage Traker" />
</div> </div>
}
@RenderBody() @RenderBody()
</body> </body>
</html> </html>