diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart.sln b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart.sln index cfad7374..51e6cca4 100644 --- a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart.sln +++ b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart.sln @@ -1,18 +1,21 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Mvc4QuickStart", "Spring.Mvc4QuickStart\Spring.Mvc4QuickStart.csproj", "{823803A7-8043-48EF-B38D-9F32B063F977}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Mvc4QuickStart", "Spring.Mvc4QuickStart\Spring.Mvc4QuickStart.csproj", "{A283911F-826C-4722-BD37-D1B3D9350932}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + CodeCoverage|Any CPU = CodeCoverage|Any CPU Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {823803A7-8043-48EF-B38D-9F32B063F977}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {823803A7-8043-48EF-B38D-9F32B063F977}.Debug|Any CPU.Build.0 = Debug|Any CPU - {823803A7-8043-48EF-B38D-9F32B063F977}.Release|Any CPU.ActiveCfg = Release|Any CPU - {823803A7-8043-48EF-B38D-9F32B063F977}.Release|Any CPU.Build.0 = Release|Any CPU + {A283911F-826C-4722-BD37-D1B3D9350932}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU + {A283911F-826C-4722-BD37-D1B3D9350932}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU + {A283911F-826C-4722-BD37-D1B3D9350932}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A283911F-826C-4722-BD37-D1B3D9350932}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A283911F-826C-4722-BD37-D1B3D9350932}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A283911F-826C-4722-BD37-D1B3D9350932}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/App_Start/BundleConfig.cs b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/App_Start/BundleConfig.cs new file mode 100644 index 00000000..ac2492d3 --- /dev/null +++ b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/App_Start/BundleConfig.cs @@ -0,0 +1,40 @@ +using System.Web; +using System.Web.Optimization; + +namespace Spring.Mvc4QuickStart +{ + public class BundleConfig + { + public static void RegisterBundles(BundleCollection bundles) + { + bundles.Add(new ScriptBundle("~/bundles/jquery").Include( + "~/Scripts/jquery-1.*")); + + bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include( + "~/Scripts/jquery-ui*")); + + bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include( + "~/Scripts/jquery.unobtrusive*", + "~/Scripts/jquery.validate*")); + + bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( + "~/Scripts/modernizr-*")); + + bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css")); + + bundles.Add(new StyleBundle("~/Content/themes/base/css").Include( + "~/Content/themes/base/jquery.ui.core.css", + "~/Content/themes/base/jquery.ui.resizable.css", + "~/Content/themes/base/jquery.ui.selectable.css", + "~/Content/themes/base/jquery.ui.accordion.css", + "~/Content/themes/base/jquery.ui.autocomplete.css", + "~/Content/themes/base/jquery.ui.button.css", + "~/Content/themes/base/jquery.ui.dialog.css", + "~/Content/themes/base/jquery.ui.slider.css", + "~/Content/themes/base/jquery.ui.tabs.css", + "~/Content/themes/base/jquery.ui.datepicker.css", + "~/Content/themes/base/jquery.ui.progressbar.css", + "~/Content/themes/base/jquery.ui.theme.css")); + } + } +} \ No newline at end of file diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/App_Start/FilterConfig.cs b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/App_Start/FilterConfig.cs new file mode 100644 index 00000000..c1da1ea1 --- /dev/null +++ b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/App_Start/FilterConfig.cs @@ -0,0 +1,13 @@ +using System.Web; +using System.Web.Mvc; + +namespace Spring.Mvc4QuickStart +{ + public class FilterConfig + { + public static void RegisterGlobalFilters(GlobalFilterCollection filters) + { + filters.Add(new HandleErrorAttribute()); + } + } +} \ No newline at end of file diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/App_Start/RouteConfig.cs b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/App_Start/RouteConfig.cs new file mode 100644 index 00000000..7ee3f5f3 --- /dev/null +++ b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/App_Start/RouteConfig.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Http; +using System.Web.Mvc; +using System.Web.Routing; + +namespace Spring.Mvc4QuickStart +{ + public class RouteConfig + { + public static void RegisterRoutes(RouteCollection routes) + { + routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); + + routes.MapHttpRoute( + name: "DefaultApi", + routeTemplate: "api/{controller}/{id}", + defaults: new { id = RouteParameter.Optional } + ); + + routes.MapRoute( + name: "Default", + url: "{controller}/{action}/{id}", + defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } + ); + } + } +} \ No newline at end of file diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Config/controllers.xml b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Config/controllers.xml index bc3cbfbd..4eb79ea3 100644 --- a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Config/controllers.xml +++ b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Config/controllers.xml @@ -5,7 +5,7 @@ - + diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Content/Site.css b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Content/Site.css index f865fab7..28a2b1ba 100644 --- a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Content/Site.css +++ b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Content/Site.css @@ -14,8 +14,7 @@ body { padding: 0; } -a:link, a:visited, -a:active, a:hover { +a { color: #333; outline: none; padding-left: 3px; @@ -23,15 +22,26 @@ a:active, a:hover { text-decoration: underline; } -a:hover { - background-color: #c7d1d6; -} + a:link, a:visited, + a:active, a:hover { + color: #333; + } + + a:hover { + background-color: #c7d1d6; + } header, footer, hgroup, nav, section { display: block; } +mark { + background-color: #a6dbed; + padding-left: 5px; + padding-right: 5px; +} + .float-left { float: left; } @@ -40,12 +50,6 @@ nav, section { float: right; } -.highlight { - background-color: #a6dbed; - padding-left: 5px; - padding-right: 5px; -} - .clear-fix:after { content: "."; clear: both; @@ -248,16 +252,44 @@ ol.round { padding-left: 45px; } + ol.round li.zero { + background: url("../Images/orderedList0.png") no-repeat; + } + ol.round li.one { - background: url("../Images/orderedListOne.png") no-repeat; + background: url("../Images/orderedList1.png") no-repeat; } ol.round li.two { - background: url("../Images/orderedListTwo.png") no-repeat; + background: url("../Images/orderedList2.png") no-repeat; } ol.round li.three { - background: url("../Images/orderedListThree.png") no-repeat; + background: url("../Images/orderedList3.png") no-repeat; + } + + ol.round li.four { + background: url("../Images/orderedList4.png") no-repeat; + } + + ol.round li.five { + background: url("../Images/orderedList5.png") no-repeat; + } + + ol.round li.six { + background: url("../Images/orderedList6.png") no-repeat; + } + + ol.round li.seven { + background: url("../Images/orderedList7.png") no-repeat; + } + + ol.round li.eight { + background: url("../Images/orderedList8.png") no-repeat; + } + + ol.round li.nine { + background: url("../Images/orderedList9.png") no-repeat; } /* content */ @@ -372,8 +404,41 @@ fieldset { } /* ajax login/registration dialog */ +.ui-dialog { + font-family: inherit; + font-size: 1.0em; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; + border: 0 none; +} + + .ui-dialog input { + font-family: inherit; + font-size: 1.25em; + } + +.ui-dialog-titlebar { + color: inherit; + font-weight: inherit; + border: 0 none; + background: none; + float: right; +} + +.ui-dialog-titlebar-close { + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} + +.ui-widget-header { + border: 0 none; + background: none; +} + .modal-popup { - font-size: 0.7em; + } .modal-popup input[type="text"], @@ -459,6 +524,68 @@ ul#social li { background: url("../Images/twitter.png") no-repeat; } +/* tables +----------------------------------------------------------*/ +table { + border-collapse: collapse; + border-spacing: 0; + margin-top: 0.75em; + border: 0 none; +} + +th { + font-size: 1.2em; + text-align: left; + border: none 0px; + padding-left: 0; +} + + th a { + display: block; + position: relative; + + } + + th a:link, th a:visited, th a:active, th a:hover { + color: #333; + font-weight: 600; + text-decoration: none; + padding: 0; + } + + th a:hover { + color: #000; + } + + th.asc a, th.desc a { + margin-right: .75em; + } + + th.asc a:after, th.desc a:after { + display: block; + position: absolute; + right: 0em; + top: 0; + font-size: 0.75em; + } + + th.asc a:after { + content: '▲'; + } + + th.desc a:after { + content: '▼'; + } + +td { + padding: 0.25em 2em 0.25em 0em; + border: 0 none; +} + +tr.pager td { + padding: 0 0.25em 0 0; +} + /******************** * Mobile Styles * @@ -559,9 +686,16 @@ ul#social li { margin: 25px 0; } + ol.round li.zero, ol.round li.one, ol.round li.two, - ol.round li.three { + ol.round li.three, + ol.round li.four, + ol.round li.five, + ol.round li.six, + ol.round li.seven, + ol.round li.eight, + ol.round li.nine { background: none; } @@ -629,9 +763,7 @@ ul#social li { background: none; display: inline; float: none; - height: auto; padding-left: 0; text-indent: 0; - width: auto; } } diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Controllers/AccountController.cs b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Controllers/AccountController.cs index 44f7149a..739d407c 100644 --- a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Controllers/AccountController.cs +++ b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Controllers/AccountController.cs @@ -17,33 +17,10 @@ namespace Spring.Mvc4QuickStart.Controllers // GET: /Account/Login [AllowAnonymous] - public ActionResult Login() + public ActionResult Login(string returnUrl) { - return ContextDependentView(); - } - - // - // POST: /Account/JsonLogin - - [AllowAnonymous] - [HttpPost] - public JsonResult JsonLogin(LoginModel model, string returnUrl) - { - if (ModelState.IsValid) - { - if (Membership.ValidateUser(model.UserName, model.Password)) - { - FormsAuthentication.SetAuthCookie(model.UserName, model.RememberMe); - return Json(new { success = true, redirect = returnUrl }); - } - else - { - ModelState.AddModelError("", "The user name or password provided is incorrect."); - } - } - - // If we got this far, something failed - return Json(new { errors = GetErrorsFromModelState() }); + ViewBag.ReturnUrl = returnUrl; + return View(); } // @@ -93,35 +70,7 @@ namespace Spring.Mvc4QuickStart.Controllers [AllowAnonymous] public ActionResult Register() { - return ContextDependentView(); - } - - // - // POST: /Account/JsonRegister - - [AllowAnonymous] - [HttpPost] - public ActionResult JsonRegister(RegisterModel model) - { - if (ModelState.IsValid) - { - // Attempt to register the user - MembershipCreateStatus createStatus; - Membership.CreateUser(model.UserName, model.Password, model.Email, passwordQuestion: null, passwordAnswer: null, isApproved: true, providerUserKey: null, status: out createStatus); - - if (createStatus == MembershipCreateStatus.Success) - { - FormsAuthentication.SetAuthCookie(model.UserName, createPersistentCookie: false); - return Json(new { success = true }); - } - else - { - ModelState.AddModelError("", ErrorCodeToString(createStatus)); - } - } - - // If we got this far, something failed - return Json(new { errors = GetErrorsFromModelState() }); + return View(); } // @@ -204,21 +153,6 @@ namespace Spring.Mvc4QuickStart.Controllers return View(); } - private ActionResult ContextDependentView() - { - string actionName = ControllerContext.RouteData.GetRequiredString("action"); - if (Request.QueryString["content"] != null) - { - ViewBag.FormAction = "Json" + actionName; - return PartialView(); - } - else - { - ViewBag.FormAction = actionName; - return View(); - } - } - private IEnumerable GetErrorsFromModelState() { return ModelState.SelectMany(x => x.Value.Errors.Select(error => error.ErrorMessage)); diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Controllers/HomeController.cs b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Controllers/HomeController.cs index 704821e8..c7a2714d 100644 --- a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Controllers/HomeController.cs +++ b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Controllers/HomeController.cs @@ -16,17 +16,17 @@ namespace Spring.Mvc4QuickStart.Controllers return View(); } - + public ActionResult About() { - ViewBag.Message = "Your quintessential app description page."; + ViewBag.Message = "Your app description page."; return View(); } public ActionResult Contact() { - ViewBag.Message = "Your quintessential contact page."; + ViewBag.Message = "Your contact page."; return View(); } diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Controllers/ValuesSuffixController.cs b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Controllers/SuffixController.cs similarity index 93% rename from examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Controllers/ValuesSuffixController.cs rename to examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Controllers/SuffixController.cs index f5d89746..eb27e16b 100644 --- a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Controllers/ValuesSuffixController.cs +++ b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Controllers/SuffixController.cs @@ -3,7 +3,7 @@ using System.Web.Http; namespace Spring.Mvc4QuickStart.Controllers { - public class ValuesSuffixController : ApiController + public class SuffixController : ApiController { public string Suffix { get; set; } diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Global.asax.cs b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Global.asax.cs index 5c5530c3..8d26bf38 100644 --- a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Global.asax.cs +++ b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Global.asax.cs @@ -15,36 +15,13 @@ namespace Spring.Mvc4QuickStart public class MvcApplication : SpringMvcApplication { - public static void RegisterGlobalFilters(GlobalFilterCollection filters) - { - filters.Add(new HandleErrorAttribute()); - } - - public static void RegisterRoutes(RouteCollection routes) - { - routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); - - routes.MapHttpRoute( - name: "DefaultApi", - routeTemplate: "api/{controller}/{id}", - defaults: new { id = RouteParameter.Optional } - ); - - routes.MapRoute( - name: "Default", - url: "{controller}/{action}/{id}", - defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } - ); - } - protected void Application_Start() { AreaRegistration.RegisterAllAreas(); - RegisterGlobalFilters(GlobalFilters.Filters); - RegisterRoutes(RouteTable.Routes); - - BundleTable.Bundles.RegisterTemplateBundles(); + FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); + RouteConfig.RegisterRoutes(RouteTable.Routes); + BundleConfig.RegisterBundles(BundleTable.Bundles); } } } \ No newline at end of file diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList0.png b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList0.png new file mode 100644 index 00000000..7a4ea253 Binary files /dev/null and b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList0.png differ diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedListOne.png b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList1.png similarity index 100% rename from examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedListOne.png rename to examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList1.png diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedListTwo.png b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList2.png similarity index 100% rename from examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedListTwo.png rename to examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList2.png diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedListThree.png b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList3.png similarity index 100% rename from examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedListThree.png rename to examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList3.png diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList4.png b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList4.png new file mode 100644 index 00000000..ce91e8f6 Binary files /dev/null and b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList4.png differ diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList5.png b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList5.png new file mode 100644 index 00000000..c0734857 Binary files /dev/null and b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList5.png differ diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList6.png b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList6.png new file mode 100644 index 00000000..3b9aa05a Binary files /dev/null and b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList6.png differ diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList7.png b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList7.png new file mode 100644 index 00000000..f99c609f Binary files /dev/null and b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList7.png differ diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList8.png b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList8.png new file mode 100644 index 00000000..127596d1 Binary files /dev/null and b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList8.png differ diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList9.png b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList9.png new file mode 100644 index 00000000..39cfdcf5 Binary files /dev/null and b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Images/orderedList9.png differ diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Properties/AssemblyInfo.cs b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Properties/AssemblyInfo.cs index 9b58107e..d6b27b08 100644 --- a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Properties/AssemblyInfo.cs +++ b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Properties/AssemblyInfo.cs @@ -20,7 +20,7 @@ using System.Runtime.InteropServices; [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("e74844c7-6c21-42b3-b416-fbbd7c8bd2a0")] +[assembly: Guid("6b26b8b8-f1e7-4c83-8ffe-354feac65948")] // Version information for an assembly consists of the following four values: // diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Scripts/AjaxLogin.js b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Scripts/AjaxLogin.js deleted file mode 100644 index d1dec5a4..00000000 --- a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Scripts/AjaxLogin.js +++ /dev/null @@ -1,110 +0,0 @@ -$(function () { - // Cache for dialogs - var dialogs = {}; - - var getValidationSummaryErrors = function ($form) { - // We verify if we created it beforehand - var errorSummary = $form.find('.validation-summary-errors, .validation-summary-valid'); - if (!errorSummary.length) { - errorSummary = $('
Please correct the errors and try again.
    ') - .prependTo($form); - } - - return errorSummary; - }; - - var displayErrors = function (form, errors) { - var errorSummary = getValidationSummaryErrors(form) - .removeClass('validation-summary-valid') - .addClass('validation-summary-errors'); - - var items = $.map(errors, function (error) { - return '
  • ' + error + '
  • '; - }).join(''); - - var ul = errorSummary - .find('ul') - .empty() - .append(items); - }; - - var resetForm = function ($form) { - // We reset the form so we make sure unobtrusive errors get cleared out. - $form[0].reset(); - - getValidationSummaryErrors($form) - .removeClass('validation-summary-errors') - .addClass('validation-summary-valid') - }; - - var formSubmitHandler = function (e) { - var $form = $(this); - - // We check if jQuery.validator exists on the form - if (!$form.valid || $form.valid()) { - $.post($form.attr('action'), $form.serializeArray()) - .done(function (json) { - json = json || {}; - - // In case of success, we redirect to the provided URL or the same page. - if (json.success) { - location = json.redirect || location.href; - } else if (json.errors) { - displayErrors($form, json.errors); - } - }) - .error(function () { - displayErrors($form, ['An unknown error happened.']); - }); - } - - // Prevent the normal behavior since we opened the dialog - e.preventDefault(); - }; - - var loadAndShowDialog = function (id, link, url) { - var separator = url.indexOf('?') >= 0 ? '&' : '?'; - - // Save an empty jQuery in our cache for now. - dialogs[id] = $(); - - // Load the dialog with the content=1 QueryString in order to get a PartialView - $.get(url + separator + 'content=1') - .done(function (content) { - dialogs[id] = $('') - .hide() // Hide the dialog for now so we prevent flicker - .appendTo(document.body) - .filter('div') // Filter for the div tag only, script tags could surface - .dialog({ // Create the jQuery UI dialog - title: link.data('dialog-title'), - modal: true, - resizable: true, - draggable: true, - width: link.data('dialog-width') || 600, - beforeClose: function () { resetForm($(this).find('form')); } - }) - .find('form') // Attach logic on forms - .submit(formSubmitHandler) - .end(); - }); - }; - - // List of link ids to have an ajax dialog - var links = ['#loginLink', '#registerLink']; - - $.each(links, function (i, id) { - $(id).click(function (e) { - var link = $(this), - url = link.attr('href'); - - if (!dialogs[id]) { - loadAndShowDialog(id, link, url); - } else { - dialogs[id].dialog('open'); - } - - // Prevent the normal behavior since we use a dialog - e.preventDefault(); - }); - }); -}); \ No newline at end of file diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Scripts/_references.js b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Scripts/_references.js index d91a82ab..90747dff 100644 --- a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Scripts/_references.js +++ b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Scripts/_references.js @@ -1,5 +1,6 @@ /// /// /// +/// /// /// \ No newline at end of file diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart.csproj b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart.csproj index e609a4ce..c6b02132 100644 --- a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart.csproj +++ b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart.csproj @@ -1,12 +1,13 @@  + Debug AnyCPU 2.0 - {823803A7-8043-48EF-B38D-9F32B063F977} + {A283911F-826C-4722-BD37-D1B3D9350932} {E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} Library Properties @@ -34,94 +35,38 @@ 4 - - ..\..\..\..\build\VS.Net.2010\Spring.Web.Mvc4\Debug\Common.Logging.dll - - - ..\packages\EntityFramework.4.1.10331.0\lib\net40\EntityFramework.dll - - - True - ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll + + ..\packages\Newtonsoft.Json.4.5.6\lib\net40\Newtonsoft.Json.dll - - ..\..\..\..\build\VS.Net.2010\Spring.Web.Mvc4\Debug\Spring.Core.dll + + ..\..\..\..\build\VS.Net.2010\Spring.Core\Debug\Spring.Core.dll - - ..\..\..\..\build\VS.Net.2010\Spring.Web.Mvc4\Debug\Spring.Web.dll + + ..\..\..\..\build\VS.Net.2010\Spring.Web\Debug\Spring.Web.dll - + ..\..\..\..\build\VS.Net.2010\Spring.Web.Mvc4\Debug\Spring.Web.Mvc4.dll - - True - ..\packages\System.Json.4.0.20126.16343\lib\net40\System.Json.dll - - - True - ..\packages\System.Net.Http.2.0.20126.16343\lib\net40\System.Net.Http.dll - - - True - ..\packages\System.Net.Http.Formatting.4.0.20126.16343\lib\net40\System.Net.Http.Formatting.dll - - - True - ..\packages\System.Net.Http.2.0.20126.16343\lib\net40\System.Net.Http.WebRequest.dll - + - - True - ..\packages\AspNetWebPages.Core.2.0.20126.16343\lib\net40\System.Web.Helpers.dll - - - True - ..\packages\AspNetWebApi.Core.4.0.20126.16343\lib\net40\System.Web.Http.dll - - - True - ..\packages\System.Web.Http.Common.4.0.20126.16343\lib\net40\System.Web.Http.Common.dll - - - True - ..\packages\AspNetWebApi.4.0.20126.16343\lib\net40\System.Web.Http.WebHost.dll - - - True - ..\packages\AspNetMvc.4.0.20126.16343\lib\net40\System.Web.Mvc.dll - - - ..\packages\Microsoft.Web.Optimization.1.0.0-beta\lib\net40\System.Web.Optimization.dll - - - ..\packages\System.Web.Providers.Core.1.0\lib\net40\System.Web.Providers.dll - - - True - ..\packages\AspNetRazor.Core.2.0.20126.16343\lib\net40\System.Web.Razor.dll - - - True - ..\packages\AspNetWebPages.Core.2.0.20126.16343\lib\net40\System.Web.WebPages.dll - - - True - ..\packages\AspNetWebPages.Core.2.0.20126.16343\lib\net40\System.Web.WebPages.Deployment.dll - - - True - ..\packages\AspNetWebPages.Core.2.0.20126.16343\lib\net40\System.Web.WebPages.Razor.dll - + + + + + + + + @@ -131,12 +76,44 @@ + + ..\packages\EntityFramework.5.0.0-rc\lib\net40\EntityFramework.dll + + + True + ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll + + + True + ..\packages\Microsoft.Net.Http.2.0.20505.0\lib\net40\System.Net.Http.dll + + + True + ..\packages\Microsoft.Net.Http.2.0.20505.0\lib\net40\System.Net.Http.WebRequest.dll + + + ..\packages\Microsoft.AspNet.Web.Optimization.1.0.0-beta2\lib\net40\System.Web.Optimization.dll + + + ..\packages\Microsoft.AspNet.Providers.Core.1.0\lib\net40\System.Web.Providers.dll + + + True + ..\packages\WebGrease.1.0.0\lib\WebGrease.dll + + + True + ..\packages\WebGrease.1.0.0\lib\Antlr3.Runtime.dll + + + + - + Global.asax @@ -144,7 +121,9 @@ - + + Always + @@ -198,7 +177,6 @@ - @@ -206,9 +184,16 @@ - - - + + + + + + + + + + @@ -230,14 +215,13 @@ + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + - - + + @@ -247,7 +231,7 @@ False True - 57953 + 41293 / @@ -260,4 +244,10 @@ + \ No newline at end of file diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Views/Account/ChangePassword.cshtml b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Views/Account/ChangePassword.cshtml index 5c21da6d..ac3bd714 100644 --- a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Views/Account/ChangePassword.cshtml +++ b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Views/Account/ChangePassword.cshtml @@ -1,4 +1,4 @@ -@model Spring.Mvc4QuickStart.Models.ChangePasswordModel +@model Spring.Mvc4QuickStart.Models.ChangePasswordModel @{ ViewBag.Title = "Change Password"; @@ -6,38 +6,36 @@

    @ViewBag.Title.

    -

    Use the form below to change your password.

    +

    Use this form to change your password.

    - New passwords are required to be a minimum of @Membership.MinRequiredPasswordLength characters in length. + Passwords must be at least @Membership.MinRequiredPasswordLength characters long.

    - - - @using (Html.BeginForm()) { - @Html.ValidationSummary(true, "Password change was unsuccessful. Please correct the errors and try again.") + @Html.ValidationSummary()
    Change Password Form
    1. @Html.LabelFor(m => m.OldPassword) - @Html.PasswordFor(m => m.OldPassword) - @Html.ValidationMessageFor(m => m.OldPassword) + @Html.PasswordFor(m => m.OldPassword)
    2. @Html.LabelFor(m => m.NewPassword) - @Html.PasswordFor(m => m.NewPassword) - @Html.ValidationMessageFor(m => m.NewPassword) + @Html.PasswordFor(m => m.NewPassword)
    3. @Html.LabelFor(m => m.ConfirmPassword) - @Html.PasswordFor(m => m.ConfirmPassword) - @Html.ValidationMessageFor(m => m.ConfirmPassword) + @Html.PasswordFor(m => m.ConfirmPassword)
    } + +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Views/Account/ChangePasswordSuccess.cshtml b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Views/Account/ChangePasswordSuccess.cshtml index 32cf73d6..07a7ccff 100644 --- a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Views/Account/ChangePasswordSuccess.cshtml +++ b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Views/Account/ChangePasswordSuccess.cshtml @@ -4,5 +4,5 @@

    @ViewBag.Title.

    -

    Your password has been changed successfully.

    +

    Your password has been changed.

    diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Views/Account/Login.cshtml b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Views/Account/Login.cshtml index 576fb857..55bad79e 100644 --- a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Views/Account/Login.cshtml +++ b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Views/Account/Login.cshtml @@ -1,4 +1,4 @@ -@model Spring.Mvc4QuickStart.Models.LoginModel +@model Spring.Mvc4QuickStart.Models.LoginModel @{ ViewBag.Title = "Log in"; @@ -6,13 +6,10 @@

    @ViewBag.Title.

    -

    Enter your user name and password below.

    +

    Use this form to enter your user name and password.

    - - - -@using (Html.BeginForm((string)ViewBag.FormAction, "Account")) { +@using (Html.BeginForm(new { ReturnUrl = ViewBag.ReturnUrl })) { @Html.ValidationSummary(true, "Log in was unsuccessful. Please correct the errors and try again.")
    @@ -21,12 +18,10 @@
  • @Html.LabelFor(m => m.UserName) @Html.TextBoxFor(m => m.UserName) - @Html.ValidationMessageFor(m => m.UserName)
  • @Html.LabelFor(m => m.Password) @Html.PasswordFor(m => m.Password) - @Html.ValidationMessageFor(m => m.Password)
  • @Html.CheckBoxFor(m => m.RememberMe) @@ -39,3 +34,7 @@ @Html.ActionLink("Register", "Register") if you don't have an account.

    } + +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Views/Account/Register.cshtml b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Views/Account/Register.cshtml index 9d4c9179..d6c334b6 100644 --- a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Views/Account/Register.cshtml +++ b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Views/Account/Register.cshtml @@ -1,4 +1,4 @@ -@model Spring.Mvc4QuickStart.Models.RegisterModel +@model Spring.Mvc4QuickStart.Models.RegisterModel @{ ViewBag.Title = "Register"; @@ -6,18 +6,15 @@

    @ViewBag.Title.

    -

    Use the form below to create a new account.

    +

    Create a new account.

    - Passwords are required to be a minimum of @Membership.MinRequiredPasswordLength characters in length. + Passwords must be at least @Membership.MinRequiredPasswordLength characters long.

    - - - -@using (Html.BeginForm((string)ViewBag.FormAction, "Account")) { - @Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.") +@using (Html.BeginForm()) { + @Html.ValidationSummary()
    Registration Form @@ -25,24 +22,24 @@
  • @Html.LabelFor(m => m.UserName) @Html.TextBoxFor(m => m.UserName) - @Html.ValidationMessageFor(m => m.UserName)
  • @Html.LabelFor(m => m.Email) @Html.TextBoxFor(m => m.Email) - @Html.ValidationMessageFor(m => m.Email)
  • @Html.LabelFor(m => m.Password) @Html.PasswordFor(m => m.Password) - @Html.ValidationMessageFor(m => m.Password)
  • @Html.LabelFor(m => m.ConfirmPassword) @Html.PasswordFor(m => m.ConfirmPassword) - @Html.ValidationMessageFor(m => m.ConfirmPassword)
  • } + +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Views/Home/About.cshtml b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Views/Home/About.cshtml index 37e5d716..273ba3ea 100644 --- a/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Views/Home/About.cshtml +++ b/examples/Spring/Spring.Mvc4QuickStart/Spring.Mvc4QuickStart/Views/Home/About.cshtml @@ -9,47 +9,22 @@

    - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin luctus tincidunt justo nec tempor. - Aliquam erat volutpat. Fusce facilisis ullamcorper consequat. Vestibulum non sapien lectus. Nam - mi augue, posuere at tempus vel, dignissim vitae nulla. Nullam at quam eu sapien mattis ultrices. - Quisque quis leo mi, at lobortis dolor. Nullam scelerisque facilisis placerat. Fusce a augue - erat, malesuada euismod dui. Duis iaculis risus id felis volutpat elementum. Fusce blandit iaculis - quam a cursus. Cras varius tincidunt cursus. Morbi justo eros, adipiscing ac placerat sed, posuere - et mi. Suspendisse vulputate viverra aliquet. Duis non enim a nibh consequat mollis ac tempor - lorem. Phasellus elit leo, semper eu luctus et, suscipit at lacus. In hac habitasse platea - dictumst. Duis dignissim justo sit amet nulla pulvinar sodales. + Use this area to provide additional information.

    - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin luctus tincidunt justo nec tempor. - Aliquam erat volutpat. Fusce facilisis ullamcorper consequat. Vestibulum non sapien lectus. Nam - mi augue, posuere at tempus vel, dignissim vitae nulla. Nullam at quam eu sapien mattis ultrices. - Quisque quis leo mi, at lobortis dolor. Nullam scelerisque facilisis placerat. Fusce a augue - erat, malesuada euismod dui. Duis iaculis risus id felis volutpat elementum. Fusce blandit iaculis - quam a cursus. Cras varius tincidunt cursus. Morbi justo eros, adipiscing ac placerat sed, posuere - et mi. Suspendisse vulputate viverra aliquet. Duis non enim a nibh consequat mollis ac tempor - lorem. Phasellus elit leo, semper eu luctus et, suscipit at lacus. In hac habitasse platea - dictumst. Duis dignissim justo sit amet nulla pulvinar sodales. + Use this area to provide additional information.

    - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin luctus tincidunt justo nec tempor. - Aliquam erat volutpat. Fusce facilisis ullamcorper consequat. Vestibulum non sapien lectus. Nam - mi augue, posuere at tempus vel, dignissim vitae nulla. Nullam at quam eu sapien mattis ultrices. - Quisque quis leo mi, at lobortis dolor. Nullam scelerisque facilisis placerat. Fusce a augue - erat, malesuada euismod dui. Duis iaculis risus id felis volutpat elementum. Fusce blandit iaculis - quam a cursus. Cras varius tincidunt cursus. Morbi justo eros, adipiscing ac placerat sed, posuere - et mi. Suspendisse vulputate viverra aliquet. Duis non enim a nibh consequat mollis ac tempor - lorem. Phasellus elit leo, semper eu luctus et, suscipit at lacus. In hac habitasse platea - dictumst. Duis dignissim justo sit amet nulla pulvinar sodales. + Use this area to provide additional information.