├── ModelBinder ├── Views │ ├── _ViewStart.cshtml │ ├── Compras │ │ ├── Index.cshtml │ │ └── Salvar.cshtml │ ├── Shared │ │ └── _Layout.cshtml │ └── web.config ├── Global.asax ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff ├── Models │ └── Compras.cs ├── Content │ └── Site.css ├── packages.config ├── App_Start │ └── RouteConfig.cs ├── Global.asax.cs ├── Controllers │ └── ComprasController.cs ├── Binders │ └── DateTimeBinder.cs ├── Web.Debug.config ├── Web.Release.config ├── Properties │ └── AssemblyInfo.cs ├── Web.config ├── ModelBinder.csproj └── Scripts │ ├── bootstrap.min.js │ └── modernizr-2.6.2.js ├── packages ├── jQuery.1.10.2 │ ├── jQuery.1.10.2.nupkg │ └── Tools │ │ ├── install.ps1 │ │ ├── uninstall.ps1 │ │ └── common.ps1 ├── Modernizr.2.6.2 │ ├── Modernizr.2.6.2.nupkg │ └── Tools │ │ ├── uninstall.ps1 │ │ ├── install.ps1 │ │ └── common.ps1 ├── bootstrap.3.0.0 │ ├── bootstrap.3.0.0.nupkg │ └── content │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff │ │ └── Scripts │ │ └── bootstrap.min.js ├── repositories.config ├── Microsoft.AspNet.Mvc.5.2.0 │ ├── lib │ │ └── net45 │ │ │ └── System.Web.Mvc.dll │ ├── Microsoft.AspNet.Mvc.5.2.0.nupkg │ └── Content │ │ ├── Web.config.uninstall.xdt │ │ └── Web.config.install.xdt ├── Microsoft.AspNet.Razor.3.2.0 │ ├── lib │ │ └── net45 │ │ │ └── System.Web.Razor.dll │ └── Microsoft.AspNet.Razor.3.2.0.nupkg ├── Microsoft.AspNet.WebPages.3.2.0 │ ├── lib │ │ └── net45 │ │ │ ├── System.Web.Helpers.dll │ │ │ ├── System.Web.WebPages.dll │ │ │ ├── System.Web.WebPages.Razor.dll │ │ │ ├── System.Web.WebPages.Deployment.dll │ │ │ ├── System.Web.WebPages.Deployment.xml │ │ │ └── System.Web.WebPages.Razor.xml │ ├── Microsoft.AspNet.WebPages.3.2.0.nupkg │ └── Content │ │ ├── Web.config.uninstall.xdt │ │ └── Web.config.install.xdt └── Microsoft.Web.Infrastructure.1.0.0.0 │ ├── Microsoft.Web.Infrastructure.1.0.0.0.nupkg │ └── lib │ └── net40 │ └── Microsoft.Web.Infrastructure.dll ├── README.md ├── ModelBinder.sln ├── .gitattributes └── .gitignore /ModelBinder/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /ModelBinder/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="ModelBinder.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /packages/jQuery.1.10.2/jQuery.1.10.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/ModelBinder/master/packages/jQuery.1.10.2/jQuery.1.10.2.nupkg -------------------------------------------------------------------------------- /packages/Modernizr.2.6.2/Modernizr.2.6.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/ModelBinder/master/packages/Modernizr.2.6.2/Modernizr.2.6.2.nupkg -------------------------------------------------------------------------------- /packages/bootstrap.3.0.0/bootstrap.3.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/ModelBinder/master/packages/bootstrap.3.0.0/bootstrap.3.0.0.nupkg -------------------------------------------------------------------------------- /ModelBinder/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/ModelBinder/master/ModelBinder/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /ModelBinder/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/ModelBinder/master/ModelBinder/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ModelBinder 2 | Binder Nullable values 3 | 4 | How get null values from a post, in ASP.NET MVC? 5 | 6 | In this project I show one way to do it. 7 | -------------------------------------------------------------------------------- /ModelBinder/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/ModelBinder/master/ModelBinder/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /packages/repositories.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.2.0/lib/net45/System.Web.Mvc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/ModelBinder/master/packages/Microsoft.AspNet.Mvc.5.2.0/lib/net45/System.Web.Mvc.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.2.0/Microsoft.AspNet.Mvc.5.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/ModelBinder/master/packages/Microsoft.AspNet.Mvc.5.2.0/Microsoft.AspNet.Mvc.5.2.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Razor.3.2.0/lib/net45/System.Web.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/ModelBinder/master/packages/Microsoft.AspNet.Razor.3.2.0/lib/net45/System.Web.Razor.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Razor.3.2.0/Microsoft.AspNet.Razor.3.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/ModelBinder/master/packages/Microsoft.AspNet.Razor.3.2.0/Microsoft.AspNet.Razor.3.2.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.Helpers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/ModelBinder/master/packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.Helpers.dll -------------------------------------------------------------------------------- /packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/ModelBinder/master/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/ModelBinder/master/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/ModelBinder/master/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/ModelBinder/master/packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/Microsoft.AspNet.WebPages.3.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/ModelBinder/master/packages/Microsoft.AspNet.WebPages.3.2.0/Microsoft.AspNet.WebPages.3.2.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/ModelBinder/master/packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.Razor.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.Deployment.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/ModelBinder/master/packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.Deployment.dll -------------------------------------------------------------------------------- /packages/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/ModelBinder/master/packages/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Web.Infrastructure.1.0.0.0/lib/net40/Microsoft.Web.Infrastructure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chasoliveira/ModelBinder/master/packages/Microsoft.Web.Infrastructure.1.0.0.0/lib/net40/Microsoft.Web.Infrastructure.dll -------------------------------------------------------------------------------- /packages/Modernizr.2.6.2/Tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # Update the _references.js file 6 | Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx -------------------------------------------------------------------------------- /ModelBinder/Models/Compras.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace ModelBinder.Models 7 | { 8 | public class Compras 9 | { 10 | public DateTime? Data { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /ModelBinder/Views/Compras/Index.cshtml: -------------------------------------------------------------------------------- 1 | 2 | @{ 3 | ViewBag.Title = "Compras"; 4 | } 5 | 6 | @using (Html.BeginForm("Salvar","Compras")) 7 | { 8 | 9 |

Informe a Data de sua compra

10 | 11 | 12 | 13 | 14 | } -------------------------------------------------------------------------------- /ModelBinder/Content/Site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Set padding to keep content from hitting the edges */ 7 | .body-content { 8 | padding-left: 15px; 9 | padding-right: 15px; 10 | } 11 | 12 | /* Set width on the form input elements since they're 100% wide by default */ 13 | input, 14 | select, 15 | textarea { 16 | max-width: 280px; 17 | } 18 | 19 | -------------------------------------------------------------------------------- /packages/Modernizr.2.6.2/Tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | if ($scriptsFolderProjectItem -eq $null) { 6 | # No Scripts folder 7 | Write-Host "No Scripts folder found" 8 | exit 9 | } 10 | 11 | # Update the _references.js file 12 | AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx $modernizrFileName -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.2.0/Content/Web.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ModelBinder/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ModelBinder/Views/Compras/Salvar.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | 3 | @{ 4 | ViewBag.Title = "Salvar"; 5 | Layout = "~/Views/Shared/_Layout.cshtml"; 6 | } 7 | 8 |

Salvar

9 | 10 |

11 | @Html.ActionLink("Create New", "Index") 12 |

13 | 14 | 15 | 18 | 19 | 20 | @foreach (var item in Model) 21 | { 22 | 23 | 26 | 27 | } 28 | 29 |
16 | @Html.DisplayNameFor(model => model.Data) 17 |
24 | @Html.DisplayFor(modelItem => item.Data) 25 |
30 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/Content/Web.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /ModelBinder/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | 8 | namespace ModelBinder 9 | { 10 | public class RouteConfig 11 | { 12 | public static void RegisterRoutes(RouteCollection routes) 13 | { 14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 15 | 16 | routes.MapRoute( 17 | name: "Default", 18 | url: "{controller}/{action}/{id}", 19 | defaults: new { controller = "Compras", action = "Index", id = UrlParameter.Optional } 20 | ); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ModelBinder/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web; 3 | using System.Web.Mvc; 4 | using System.Web.Routing; 5 | using ModelBinder.Binders; 6 | 7 | namespace ModelBinder 8 | { 9 | public class MvcApplication : HttpApplication 10 | { 11 | protected void Application_Start() 12 | { 13 | AreaRegistration.RegisterAllAreas(); 14 | RouteConfig.RegisterRoutes(RouteTable.Routes); 15 | } 16 | 17 | public override void Init() 18 | { 19 | base.Init(); 20 | ModelBinders.Binders.Remove(typeof(DateTime?)); 21 | ModelBinders.Binders.Add(typeof(DateTime?), new DateTimeBinder()); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ModelBinder/Controllers/ComprasController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using ModelBinder.Models; 7 | 8 | namespace ModelBinder.Controllers 9 | { 10 | public class ComprasController : Controller 11 | { 12 | // GET: Compras 13 | public ActionResult Index() 14 | { 15 | return View(); 16 | } 17 | [HttpPost] 18 | public ActionResult Salvar(Compras compras) 19 | { 20 | if (!ModelState.IsValid) 21 | { 22 | ViewBag.Alert = "Valor Inválido"; 23 | return RedirectToAction("Index"); 24 | } 25 | 26 | if (Session["Compras"] == null) 27 | Session["Compras"] = new List(); 28 | 29 | var lista = Session["Compras"] as List; 30 | lista.Add(compras); 31 | 32 | return View(lista); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /ModelBinder.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.30723.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModelBinder", "ModelBinder\ModelBinder.csproj", "{8AD81B7D-7550-4122-9ED5-ED090B02DF7F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {8AD81B7D-7550-4122-9ED5-ED090B02DF7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {8AD81B7D-7550-4122-9ED5-ED090B02DF7F}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {8AD81B7D-7550-4122-9ED5-ED090B02DF7F}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {8AD81B7D-7550-4122-9ED5-ED090B02DF7F}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /ModelBinder/Binders/DateTimeBinder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | 7 | namespace ModelBinder.Binders 8 | { 9 | public class DateTimeBinder : IModelBinder 10 | { 11 | public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) 12 | { 13 | var valueResult = bindingContext.ValueProvider.GetValue(bindingContext.ModelName); 14 | var modelState = new ModelState { Value = valueResult }; 15 | object valorAtual = null; 16 | 17 | try 18 | { 19 | valorAtual = Convert.ToDateTime(valueResult.AttemptedValue, System.Globalization.CultureInfo.CurrentUICulture); 20 | } 21 | catch (FormatException e) 22 | { 23 | modelState.Errors.Add(e); 24 | } 25 | 26 | bindingContext.ModelState.Add(bindingContext.ModelName, modelState); 27 | 28 | return valorAtual; 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /ModelBinder/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /ModelBinder/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /packages/jQuery.1.10.2/Tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # VS 11 and above supports the new intellisense JS files 6 | $vsVersion = [System.Version]::Parse($dte.Version) 7 | $supportsJsIntelliSenseFile = $vsVersion.Major -ge 11 8 | 9 | if (-not $supportsJsIntelliSenseFile) { 10 | $displayVersion = $vsVersion.Major 11 | Write-Host "IntelliSense JS files are not supported by your version of Visual Studio: $displayVersion" 12 | exit 13 | } 14 | 15 | if ($scriptsFolderProjectItem -eq $null) { 16 | # No Scripts folder 17 | Write-Host "No Scripts folder found" 18 | exit 19 | } 20 | 21 | # Delete the vsdoc file from the project 22 | try { 23 | $vsDocProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("jquery-$ver-vsdoc.js") 24 | Delete-ProjectItem $vsDocProjectItem 25 | } 26 | catch { 27 | Write-Host "Error deleting vsdoc file: " + $_.Exception -ForegroundColor Red 28 | exit 29 | } 30 | 31 | # Copy the intellisense file to the project from the tools folder 32 | $intelliSenseFileSourcePath = Join-Path $toolsPath $intelliSenseFileName 33 | try { 34 | $scriptsFolderProjectItem.ProjectItems.AddFromFileCopy($intelliSenseFileSourcePath) 35 | } 36 | catch { 37 | # This will throw if the file already exists, so we need to catch here 38 | } 39 | 40 | # Update the _references.js file 41 | AddOrUpdate-Reference $scriptsFolderProjectItem $jqueryFileNameRegEx $jqueryFileName -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.2.0/Content/Web.config.install.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /ModelBinder/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ModelBinder")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("ModelBinder")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("66c3bfb1-f7fd-483b-b813-0652555a8806")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /ModelBinder/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | @ViewBag.Title - My ASP.NET Application 7 | 8 | 9 | 10 | 11 | 12 | 28 | 29 |
30 | @RenderBody() 31 |
32 |
33 |

© @DateTime.Now.Year - My ASP.NET Application

34 |
35 |
36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /packages/jQuery.1.10.2/Tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # Determine the file paths 6 | $projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName 7 | $origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName 8 | 9 | if (Test-Path $projectIntelliSenseFilePath) { 10 | if ((Get-Checksum $projectIntelliSenseFilePath) -eq (Get-Checksum $origIntelliSenseFilePath)) { 11 | # The intellisense file in the project matches the file in the tools folder, delete it 12 | 13 | if ($scriptsFolderProjectItem -eq $null) { 14 | # No Scripts folder 15 | exit 16 | } 17 | 18 | try { 19 | # Get the project item for the intellisense file 20 | $intelliSenseFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item($intelliSenseFileName) 21 | } 22 | catch { 23 | # The item wasn't found 24 | exit 25 | } 26 | 27 | # Delete the project item 28 | Delete-ProjectItem $intelliSenseFileProjectItem 29 | } 30 | else { 31 | $projectScriptsFolderLeaf = Split-Path $projectScriptsFolderPath -Leaf 32 | Write-Host "Skipping '$projectScriptsFolderLeaf\$intelliSenseFileName' because it was modified." -ForegroundColor Magenta 33 | } 34 | } 35 | else { 36 | # The intellisense file was not found in project 37 | Write-Host "The intellisense file was not found in project at path $projectIntelliSenseFilePath" 38 | } 39 | 40 | # Update the _references.js file 41 | Remove-Reference $scriptsFolderProjectItem $jqueryFileNameRegEx -------------------------------------------------------------------------------- /ModelBinder/Views/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/Content/Web.config.install.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /ModelBinder/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.sln.docstates 8 | 9 | # Build results 10 | 11 | [Dd]ebug/ 12 | [Rr]elease/ 13 | x64/ 14 | build/ 15 | [Bb]in/ 16 | [Oo]bj/ 17 | 18 | # Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets 19 | !packages/*/build/ 20 | 21 | # MSTest test Results 22 | [Tt]est[Rr]esult*/ 23 | [Bb]uild[Ll]og.* 24 | 25 | *_i.c 26 | *_p.c 27 | *.ilk 28 | *.meta 29 | *.obj 30 | *.pch 31 | *.pdb 32 | *.pgc 33 | *.pgd 34 | *.rsp 35 | *.sbr 36 | *.tlb 37 | *.tli 38 | *.tlh 39 | *.tmp 40 | *.tmp_proj 41 | *.log 42 | *.vspscc 43 | *.vssscc 44 | .builds 45 | *.pidb 46 | *.log 47 | *.scc 48 | 49 | # Visual C++ cache files 50 | ipch/ 51 | *.aps 52 | *.ncb 53 | *.opensdf 54 | *.sdf 55 | *.cachefile 56 | 57 | # Visual Studio profiler 58 | *.psess 59 | *.vsp 60 | *.vspx 61 | 62 | # Guidance Automation Toolkit 63 | *.gpState 64 | 65 | # ReSharper is a .NET coding add-in 66 | _ReSharper*/ 67 | *.[Rr]e[Ss]harper 68 | 69 | # TeamCity is a build add-in 70 | _TeamCity* 71 | 72 | # DotCover is a Code Coverage Tool 73 | *.dotCover 74 | 75 | # NCrunch 76 | *.ncrunch* 77 | .*crunch*.local.xml 78 | 79 | # Installshield output folder 80 | [Ee]xpress/ 81 | 82 | # DocProject is a documentation generator add-in 83 | DocProject/buildhelp/ 84 | DocProject/Help/*.HxT 85 | DocProject/Help/*.HxC 86 | DocProject/Help/*.hhc 87 | DocProject/Help/*.hhk 88 | DocProject/Help/*.hhp 89 | DocProject/Help/Html2 90 | DocProject/Help/html 91 | 92 | # Click-Once directory 93 | publish/ 94 | 95 | # Publish Web Output 96 | *.Publish.xml 97 | 98 | # NuGet Packages Directory 99 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 100 | #packages/ 101 | 102 | # Windows Azure Build Output 103 | csx 104 | *.build.csdef 105 | 106 | # Windows Store app package directory 107 | AppPackages/ 108 | 109 | # Others 110 | sql/ 111 | *.Cache 112 | ClientBin/ 113 | [Ss]tyle[Cc]op.* 114 | ~$* 115 | *~ 116 | *.dbmdl 117 | *.[Pp]ublish.xml 118 | *.pfx 119 | *.publishsettings 120 | 121 | # RIA/Silverlight projects 122 | Generated_Code/ 123 | 124 | # Backup & report files from converting an old project file to a newer 125 | # Visual Studio version. Backup files are not needed, because we have git ;-) 126 | _UpgradeReport_Files/ 127 | Backup*/ 128 | UpgradeLog*.XML 129 | UpgradeLog*.htm 130 | 131 | # SQL Server files 132 | App_Data/*.mdf 133 | App_Data/*.ldf 134 | 135 | 136 | #LightSwitch generated files 137 | GeneratedArtifacts/ 138 | _Pvt_Extensions/ 139 | ModelManifest.xml 140 | 141 | # ========================= 142 | # Windows detritus 143 | # ========================= 144 | 145 | # Windows image file caches 146 | Thumbs.db 147 | ehthumbs.db 148 | 149 | # Folder config file 150 | Desktop.ini 151 | 152 | # Recycle Bin used on file shares 153 | $RECYCLE.BIN/ 154 | 155 | # Mac desktop service store files 156 | .DS_Store 157 | -------------------------------------------------------------------------------- /packages/Modernizr.2.6.2/Tools/common.ps1: -------------------------------------------------------------------------------- 1 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) { 2 | try { 3 | $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") 4 | } 5 | catch { 6 | # _references.js file not found 7 | return 8 | } 9 | 10 | if ($referencesFileProjectItem -eq $null) { 11 | # _references.js file not found 12 | return 13 | } 14 | 15 | $referencesFilePath = $referencesFileProjectItem.FileNames(1) 16 | $referencesTempFilePath = Join-Path $env:TEMP "_references.tmp.js" 17 | 18 | if ((Select-String $referencesFilePath -pattern $fileNamePattern).Length -eq 0) { 19 | # File has no existing matching reference line 20 | # Add the full reference line to the beginning of the file 21 | "/// " | Add-Content $referencesTempFilePath -Encoding UTF8 22 | Get-Content $referencesFilePath | Add-Content $referencesTempFilePath 23 | } 24 | else { 25 | # Loop through file and replace old file name with new file name 26 | Get-Content $referencesFilePath | ForEach-Object { $_ -replace $fileNamePattern, $newFileName } > $referencesTempFilePath 27 | } 28 | 29 | # Copy over the new _references.js file 30 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 31 | Remove-Item $referencesTempFilePath -Force 32 | } 33 | 34 | function Remove-Reference($scriptsFolderProjectItem, $fileNamePattern) { 35 | try { 36 | $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") 37 | } 38 | catch { 39 | # _references.js file not found 40 | return 41 | } 42 | 43 | if ($referencesFileProjectItem -eq $null) { 44 | return 45 | } 46 | 47 | $referencesFilePath = $referencesFileProjectItem.FileNames(1) 48 | $referencesTempFilePath = Join-Path $env:TEMP "_references.tmp.js" 49 | 50 | if ((Select-String $referencesFilePath -pattern $fileNamePattern).Length -eq 1) { 51 | # Delete the line referencing the file 52 | Get-Content $referencesFilePath | ForEach-Object { if (-not ($_ -match $fileNamePattern)) { $_ } } > $referencesTempFilePath 53 | 54 | # Copy over the new _references.js file 55 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 56 | Remove-Item $referencesTempFilePath -Force 57 | } 58 | } 59 | 60 | # Extract the version number from the file in the package's content\scripts folder 61 | $packageScriptsFolder = Join-Path $installPath Content\Scripts 62 | $modernizrFileName = Join-Path $packageScriptsFolder "modernizr-*.js" | Get-ChildItem -Exclude "*.min.js","*-vsdoc.js" | Split-Path -Leaf 63 | $modernizrFileNameRegEx = "modernizr-((?:\d+\.)?(?:\d+\.)?(?:\d+\.)?(?:\d+)).js" 64 | $modernizrFileName -match $modernizrFileNameRegEx 65 | $ver = $matches[1] 66 | 67 | # Get the project item for the scripts folder 68 | try { 69 | $scriptsFolderProjectItem = $project.ProjectItems.Item("Scripts") 70 | $projectScriptsFolderPath = $scriptsFolderProjectItem.FileNames(1) 71 | } 72 | catch { 73 | # No Scripts folder 74 | Write-Host "No scripts folder found" 75 | } -------------------------------------------------------------------------------- /packages/jQuery.1.10.2/Tools/common.ps1: -------------------------------------------------------------------------------- 1 | function Get-Checksum($file) { 2 | $cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider" 3 | 4 | $fileInfo = Get-Item $file 5 | trap { ; 6 | continue } $stream = $fileInfo.OpenRead() 7 | if ($? -eq $false) { 8 | # Couldn't open file for reading 9 | return $null 10 | } 11 | 12 | $bytes = $cryptoProvider.ComputeHash($stream) 13 | $checksum = '' 14 | foreach ($byte in $bytes) { 15 | $checksum += $byte.ToString('x2') 16 | } 17 | 18 | $stream.Close() | Out-Null 19 | 20 | return $checksum 21 | } 22 | 23 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) { 24 | try { 25 | $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") 26 | } 27 | catch { 28 | # _references.js file not found 29 | return 30 | } 31 | 32 | if ($referencesFileProjectItem -eq $null) { 33 | # _references.js file not found 34 | return 35 | } 36 | 37 | $referencesFilePath = $referencesFileProjectItem.FileNames(1) 38 | $referencesTempFilePath = Join-Path $env:TEMP "_references.tmp.js" 39 | 40 | if ((Select-String $referencesFilePath -pattern $fileNamePattern).Length -eq 0) { 41 | # File has no existing matching reference line 42 | # Add the full reference line to the beginning of the file 43 | "/// " | Add-Content $referencesTempFilePath -Encoding UTF8 44 | Get-Content $referencesFilePath | Add-Content $referencesTempFilePath 45 | } 46 | else { 47 | # Loop through file and replace old file name with new file name 48 | Get-Content $referencesFilePath | ForEach-Object { $_ -replace $fileNamePattern, $newFileName } > $referencesTempFilePath 49 | } 50 | 51 | # Copy over the new _references.js file 52 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 53 | Remove-Item $referencesTempFilePath -Force 54 | } 55 | 56 | function Remove-Reference($scriptsFolderProjectItem, $fileNamePattern) { 57 | try { 58 | $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") 59 | } 60 | catch { 61 | # _references.js file not found 62 | return 63 | } 64 | 65 | if ($referencesFileProjectItem -eq $null) { 66 | return 67 | } 68 | 69 | $referencesFilePath = $referencesFileProjectItem.FileNames(1) 70 | $referencesTempFilePath = Join-Path $env:TEMP "_references.tmp.js" 71 | 72 | if ((Select-String $referencesFilePath -pattern $fileNamePattern).Length -eq 1) { 73 | # Delete the line referencing the file 74 | Get-Content $referencesFilePath | ForEach-Object { if (-not ($_ -match $fileNamePattern)) { $_ } } > $referencesTempFilePath 75 | 76 | # Copy over the new _references.js file 77 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 78 | Remove-Item $referencesTempFilePath -Force 79 | } 80 | } 81 | 82 | function Delete-ProjectItem($item) { 83 | $itemDeleted = $false 84 | for ($1=1; $i -le 5; $i++) { 85 | try { 86 | $item.Delete() 87 | $itemDeleted = $true 88 | break 89 | } 90 | catch { 91 | # Try again in 200ms 92 | [System.Threading.Thread]::Sleep(200) 93 | } 94 | } 95 | if ($itemDeleted -eq $false) { 96 | throw "Unable to delete project item after five attempts." 97 | } 98 | } 99 | 100 | # Extract the version number from the jquery file in the package's content\scripts folder 101 | $packageScriptsFolder = Join-Path $installPath Content\Scripts 102 | $jqueryFileName = Join-Path $packageScriptsFolder "jquery-*.js" | Get-ChildItem -Exclude "*.min.js","*-vsdoc.js" | Split-Path -Leaf 103 | $jqueryFileNameRegEx = "jquery-((?:\d+\.)?(?:\d+\.)?(?:\d+\.)?(?:\d+)).js" 104 | $jqueryFileName -match $jqueryFileNameRegEx 105 | $ver = $matches[1] 106 | 107 | $intelliSenseFileName = "jquery-$ver.intellisense.js" 108 | 109 | # Get the project item for the scripts folder 110 | try { 111 | $scriptsFolderProjectItem = $project.ProjectItems.Item("Scripts") 112 | $projectScriptsFolderPath = $scriptsFolderProjectItem.FileNames(1) 113 | } 114 | catch { 115 | # No Scripts folder 116 | Write-Host "No scripts folder found" 117 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.Deployment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | System.Web.WebPages.Deployment 5 | 6 | 7 | 8 | Provides a registration point for pre-application start code for Web Pages deployment. 9 | 10 | 11 | Registers pre-application start code for Web Pages deployment. 12 | 13 | 14 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Provides methods that are used to get deployment information about the Web application. 15 | 16 | 17 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the assembly path for the Web Pages deployment. 18 | The assembly path for the Web Pages deployment. 19 | The Web Pages version. 20 | 21 | 22 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the Web Pages version from the given binary path. 23 | The Web Pages version. 24 | The binary path for the Web Pages. 25 | 26 | 27 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the assembly references from the given path regardless of the Web Pages version. 28 | The dictionary containing the assembly references of the Web Pages and its version. 29 | The path to the Web Pages application. 30 | 31 | 32 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the maximum version of the Web Pages loaded assemblies. 33 | The maximum version of the Web Pages loaded assemblies. 34 | 35 | 36 | Gets the Web Pages version from the given path. 37 | The Web Pages version. 38 | The path of the root directory for the application. 39 | 40 | 41 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the Web Pages version using the configuration settings with the specified path. 42 | The Web Pages version. 43 | The path to the application settings. 44 | 45 | 46 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Returns the assemblies for this Web Pages deployment. 47 | A list containing the assemblies for this Web Pages deployment. 48 | 49 | 50 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Indicates whether the Web Pages deployment is enabled. 51 | true if the Web Pages deployment is enabled; otherwise, false. 52 | The path to the Web Pages deployment. 53 | 54 | 55 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Indicates whether the Web Pages deployment is explicitly disabled. 56 | true if the Web Pages deployment is explicitly disabled; otherwise, false. 57 | The path to the Web Pages deployment. 58 | 59 | 60 | -------------------------------------------------------------------------------- /ModelBinder/ModelBinder.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | 8 | 9 | 2.0 10 | {8AD81B7D-7550-4122-9ED5-ED090B02DF7F} 11 | {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} 12 | Library 13 | Properties 14 | ModelBinder 15 | ModelBinder 16 | v4.5 17 | true 18 | 19 | 20 | 21 | 22 | 23 | 24 | true 25 | full 26 | false 27 | bin\ 28 | DEBUG;TRACE 29 | prompt 30 | 4 31 | 32 | 33 | pdbonly 34 | true 35 | bin\ 36 | TRACE 37 | prompt 38 | 4 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | ..\packages\Microsoft.AspNet.Razor.3.2.0\lib\net45\System.Web.Razor.dll 62 | 63 | 64 | ..\packages\Microsoft.AspNet.Webpages.3.2.0\lib\net45\System.Web.Webpages.dll 65 | 66 | 67 | ..\packages\Microsoft.AspNet.Webpages.3.2.0\lib\net45\System.Web.Webpages.Deployment.dll 68 | 69 | 70 | ..\packages\Microsoft.AspNet.Webpages.3.2.0\lib\net45\System.Web.Webpages.Razor.dll 71 | 72 | 73 | ..\packages\Microsoft.AspNet.Webpages.3.2.0\lib\net45\System.Web.Helpers.dll 74 | 75 | 76 | ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll 77 | 78 | 79 | ..\packages\Microsoft.AspNet.Mvc.5.2.0\lib\net45\System.Web.Mvc.dll 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | Global.asax 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | Web.config 119 | 120 | 121 | Web.config 122 | 123 | 124 | 125 | 126 | 127 | 128 | 10.0 129 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | True 139 | True 140 | 60006 141 | / 142 | http://localhost:59935/ 143 | False 144 | False 145 | 146 | 147 | False 148 | 149 | 150 | 151 | 152 | 159 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.Razor.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | System.Web.WebPages.Razor 5 | 6 | 7 | 8 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Represents the base class for the compiling path that contains event data. 9 | 10 | 11 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Initializes a new instance of the class. 12 | The string of virtual path. 13 | The host for the webpage razor. 14 | 15 | 16 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets or sets the host for the webpage razor. 17 | The host for the webpage razor. 18 | 19 | 20 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the virtual path for the webpage. 21 | The virtual path for the webpage. 22 | 23 | 24 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. 25 | 26 | 27 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. 28 | 29 | 30 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Represents a build provider for Razor. 31 | 32 | 33 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Initializes a new instance of the class. 34 | 35 | 36 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Adds a virtual path dependency to the collection. 37 | A virtual path dependency to add. 38 | 39 | 40 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the assembly builder for Razor environment. 41 | The assembly builder. 42 | 43 | 44 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the compiler settings for Razor environment. 45 | 46 | 47 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Occurs when code generation is completed. 48 | 49 | 50 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Occurs when code generation is started. 51 | 52 | 53 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Occurs when compiling with a new virtual path. 54 | 55 | 56 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Creates a Razor engine host instance base on web configuration. 57 | A Razor engine host instance. 58 | 59 | 60 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Generates the code using the provided assembly builder. 61 | The assembly builder. 62 | 63 | 64 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the type of the generated code. 65 | The type of the generated code. 66 | The results of the code compilation. 67 | 68 | 69 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Creates the Razor engine host instance based on the web configuration. 70 | The Razor engine host instance. 71 | 72 | 73 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Opens an internal text reader. 74 | An internal text reader. 75 | 76 | 77 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Raises the CompilingPath event. 78 | The data provided for the CompilingPath event. 79 | 80 | 81 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the virtual path of the source code. 82 | The virtual path of the source code. 83 | 84 | 85 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the collection of virtual path for the dependencies. 86 | The collection of virtual path for the dependencies. 87 | 88 | 89 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Represents a web code razor host for the web pages. 90 | 91 | 92 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Initializes a new instance of the class. 93 | The virtual path. 94 | 95 | 96 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Initializes a new instance of the class. 97 | The virtual path. 98 | The physical path. 99 | 100 | 101 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Returns the class name of this instance. 102 | The class name of this instance. 103 | The virtual path. 104 | 105 | 106 | Generates a post process code for the web code razor host. 107 | The generator code context. 108 | 109 | 110 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Represents the razor hosts in a webpage. 111 | 112 | 113 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Initializes a new instance of the class with the specified virtual file path. 114 | The virtual file path. 115 | 116 | 117 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Initializes a new instance of the class with the specified virtual and physical file path. 118 | The virtual file path. 119 | The physical file path. 120 | 121 | 122 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Adds a global import on the webpage. 123 | The notification service name. 124 | 125 | 126 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the . 127 | The . 128 | 129 | 130 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Creates a markup parser. 131 | A markup parser. 132 | 133 | 134 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets or sets a value for the DefaultBaseClass. 135 | A value for the DefaultBaseClass. 136 | 137 | 138 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets or sets the name of the default class. 139 | The name of the default class. 140 | 141 | 142 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets or sets a value that indicates whether the debug compilation is set to default. 143 | true if the debug compilation is set to default; otherwise, false. 144 | 145 | 146 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets or sets the base class of the default page. 147 | The base class of the default page. 148 | 149 | 150 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Retrieves the name of the class to which the specified webpage belongs. 151 | The name of the class to which the specified webpage belongs. 152 | The virtual file path. 153 | 154 | 155 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the code language specified in the webpage. 156 | The code language specified in the webpage. 157 | 158 | 159 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the global imports for the webpage. 160 | The global imports for the webpage. 161 | 162 | 163 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets or sets the file path of the instrumental source. 164 | The file path of the instrumental source. 165 | 166 | 167 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets a value that indicates whether the webpage is a special page. 168 | true if the webpage is a special page; otherwise, false. 169 | 170 | 171 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the physical file system path of the razor host. 172 | They physical file system path of the razor host. 173 | 174 | 175 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the generated code after the process. 176 | The . 177 | 178 | 179 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Registers the special file with the specified file name and base type name. 180 | The file name. 181 | The base type name. 182 | 183 | 184 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Registers the special file with the specified file name and base type. 185 | The file name. 186 | The type of base file. 187 | 188 | 189 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the virtual file path. 190 | The virtual file path. 191 | 192 | 193 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Creates instances of the host files. 194 | 195 | 196 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Initializes a new instance of the class. 197 | 198 | 199 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Loads the service description information from the configuration file and applies it to the host. 200 | The configuration. 201 | The webpage razor host. 202 | 203 | 204 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Creates a default host with the specified virtual path. 205 | A default host. 206 | The virtual path of the file. 207 | 208 | 209 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Creates a default host with the specified virtual and physical path. 210 | A default host. 211 | The virtual path of the file. 212 | The physical file system path. 213 | 214 | 215 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Creates a Razor host. 216 | A razor host. 217 | The virtual path to the target file. 218 | The physical path to the target file. 219 | 220 | 221 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Creates a host from the configuration. 222 | A host from the configuration. 223 | The virtual path to the target file. 224 | 225 | 226 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Creates a host from the configuration. 227 | A host from the configuration. 228 | The virtual path of the file. 229 | The physical file system path. 230 | 231 | 232 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Creates a host from the configuration. 233 | A host from the configuration. 234 | The configuration. 235 | The virtual path of the file. 236 | 237 | 238 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Creates a host from the configuration. 239 | A host from the configuration. 240 | The configuration. 241 | The virtual path of the file. 242 | The physical file system path. 243 | 244 | 245 | Provides configuration system support for the host configuration section. 246 | 247 | 248 | Initializes a new instance of the class. 249 | 250 | 251 | Gets or sets the host factory. 252 | The host factory. 253 | 254 | 255 | Represents the name of the configuration section for a Razor host environment. 256 | 257 | 258 | Provides configuration system support for the pages configuration section. 259 | 260 | 261 | Initializes a new instance of the class. 262 | 263 | 264 | Gets or sets the collection of namespaces to add to Web Pages pages in the current application. 265 | The collection of namespaces. 266 | 267 | 268 | Gets or sets the name of the page base type class. 269 | The name of the page base type class. 270 | 271 | 272 | Represents the name of the configuration section for Razor pages. 273 | 274 | 275 | Provides configuration system support for the system.web.webPages.razor configuration section. 276 | 277 | 278 | Initializes a new instance of the class. 279 | 280 | 281 | Represents the name of the configuration section for Razor Web section. Contains the static, read-only string "system.web.webPages.razor". 282 | 283 | 284 | Gets or sets the host value for system.web.webPages.razor section group. 285 | The host value. 286 | 287 | 288 | Gets or sets the value of the pages element for the system.web.webPages.razor section. 289 | The pages element value. 290 | 291 | 292 | -------------------------------------------------------------------------------- /ModelBinder/Scripts/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /* NUGET: BEGIN LICENSE TEXT 2 | * 3 | * Microsoft grants you the right to use these script files for the sole 4 | * purpose of either: (i) interacting through your browser with the Microsoft 5 | * website or online service, subject to the applicable licensing or use 6 | * terms; or (ii) using the files as included with a Microsoft product subject 7 | * to that product's license terms. Microsoft reserves all other rights to the 8 | * files not expressly granted by Microsoft, whether by implication, estoppel 9 | * or otherwise. Insofar as a script file is dual licensed under GPL, 10 | * Microsoft neither took the code under GPL nor distributes it thereunder but 11 | * under the terms set out in this paragraph. All notices and licenses 12 | * below are for informational purposes only. 13 | * 14 | * NUGET: END LICENSE TEXT */ 15 | 16 | /** 17 | * bootstrap.js v3.0.0 by @fat and @mdo 18 | * Copyright 2013 Twitter Inc. 19 | * http://www.apache.org/licenses/LICENSE-2.0 20 | */ 21 | if(!jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(window.jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]');if(a.length){var b=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change");"radio"===b.prop("type")&&a.find(".active").removeClass("active")}this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(window.jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?(this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350),void 0):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(window.jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top()),"function"==typeof h&&(h=f.bottom());var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()}))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(window.jQuery); -------------------------------------------------------------------------------- /packages/bootstrap.3.0.0/content/Scripts/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /* NUGET: BEGIN LICENSE TEXT 2 | * 3 | * Microsoft grants you the right to use these script files for the sole 4 | * purpose of either: (i) interacting through your browser with the Microsoft 5 | * website or online service, subject to the applicable licensing or use 6 | * terms; or (ii) using the files as included with a Microsoft product subject 7 | * to that product's license terms. Microsoft reserves all other rights to the 8 | * files not expressly granted by Microsoft, whether by implication, estoppel 9 | * or otherwise. Insofar as a script file is dual licensed under GPL, 10 | * Microsoft neither took the code under GPL nor distributes it thereunder but 11 | * under the terms set out in this paragraph. All notices and licenses 12 | * below are for informational purposes only. 13 | * 14 | * NUGET: END LICENSE TEXT */ 15 | 16 | /** 17 | * bootstrap.js v3.0.0 by @fat and @mdo 18 | * Copyright 2013 Twitter Inc. 19 | * http://www.apache.org/licenses/LICENSE-2.0 20 | */ 21 | if(!jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(window.jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]');if(a.length){var b=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change");"radio"===b.prop("type")&&a.find(".active").removeClass("active")}this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(window.jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?(this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350),void 0):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(window.jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top()),"function"==typeof h&&(h=f.bottom());var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()}))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(window.jQuery); -------------------------------------------------------------------------------- /ModelBinder/Scripts/modernizr-2.6.2.js: -------------------------------------------------------------------------------- 1 | /* NUGET: BEGIN LICENSE TEXT 2 | * 3 | * Microsoft grants you the right to use these script files for the sole 4 | * purpose of either: (i) interacting through your browser with the Microsoft 5 | * website or online service, subject to the applicable licensing or use 6 | * terms; or (ii) using the files as included with a Microsoft product subject 7 | * to that product's license terms. Microsoft reserves all other rights to the 8 | * files not expressly granted by Microsoft, whether by implication, estoppel 9 | * or otherwise. Insofar as a script file is dual licensed under GPL, 10 | * Microsoft neither took the code under GPL nor distributes it thereunder but 11 | * under the terms set out in this paragraph. All notices and licenses 12 | * below are for informational purposes only. 13 | * 14 | * Copyright (c) Faruk Ates, Paul Irish, Alex Sexton; http://www.modernizr.com/license/ 15 | * 16 | * Includes matchMedia polyfill; Copyright (c) 2010 Filament Group, Inc; http://opensource.org/licenses/MIT 17 | * 18 | * Includes material adapted from ES5-shim https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js; Copyright 2009-2012 by contributors; http://opensource.org/licenses/MIT 19 | * 20 | * Includes material from css-support; Copyright (c) 2005-2012 Diego Perini; https://github.com/dperini/css-support/blob/master/LICENSE 21 | * 22 | * NUGET: END LICENSE TEXT */ 23 | 24 | /*! 25 | * Modernizr v2.6.2 26 | * www.modernizr.com 27 | * 28 | * Copyright (c) Faruk Ates, Paul Irish, Alex Sexton 29 | * Available under the BSD and MIT licenses: www.modernizr.com/license/ 30 | */ 31 | 32 | /* 33 | * Modernizr tests which native CSS3 and HTML5 features are available in 34 | * the current UA and makes the results available to you in two ways: 35 | * as properties on a global Modernizr object, and as classes on the 36 | * element. This information allows you to progressively enhance 37 | * your pages with a granular level of control over the experience. 38 | * 39 | * Modernizr has an optional (not included) conditional resource loader 40 | * called Modernizr.load(), based on Yepnope.js (yepnopejs.com). 41 | * To get a build that includes Modernizr.load(), as well as choosing 42 | * which tests to include, go to www.modernizr.com/download/ 43 | * 44 | * Authors Faruk Ates, Paul Irish, Alex Sexton 45 | * Contributors Ryan Seddon, Ben Alman 46 | */ 47 | 48 | window.Modernizr = (function( window, document, undefined ) { 49 | 50 | var version = '2.6.2', 51 | 52 | Modernizr = {}, 53 | 54 | /*>>cssclasses*/ 55 | // option for enabling the HTML classes to be added 56 | enableClasses = true, 57 | /*>>cssclasses*/ 58 | 59 | docElement = document.documentElement, 60 | 61 | /** 62 | * Create our "modernizr" element that we do most feature tests on. 63 | */ 64 | mod = 'modernizr', 65 | modElem = document.createElement(mod), 66 | mStyle = modElem.style, 67 | 68 | /** 69 | * Create the input element for various Web Forms feature tests. 70 | */ 71 | inputElem /*>>inputelem*/ = document.createElement('input') /*>>inputelem*/ , 72 | 73 | /*>>smile*/ 74 | smile = ':)', 75 | /*>>smile*/ 76 | 77 | toString = {}.toString, 78 | 79 | // TODO :: make the prefixes more granular 80 | /*>>prefixes*/ 81 | // List of property values to set for css tests. See ticket #21 82 | prefixes = ' -webkit- -moz- -o- -ms- '.split(' '), 83 | /*>>prefixes*/ 84 | 85 | /*>>domprefixes*/ 86 | // Following spec is to expose vendor-specific style properties as: 87 | // elem.style.WebkitBorderRadius 88 | // and the following would be incorrect: 89 | // elem.style.webkitBorderRadius 90 | 91 | // Webkit ghosts their properties in lowercase but Opera & Moz do not. 92 | // Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+ 93 | // erik.eae.net/archives/2008/03/10/21.48.10/ 94 | 95 | // More here: github.com/Modernizr/Modernizr/issues/issue/21 96 | omPrefixes = 'Webkit Moz O ms', 97 | 98 | cssomPrefixes = omPrefixes.split(' '), 99 | 100 | domPrefixes = omPrefixes.toLowerCase().split(' '), 101 | /*>>domprefixes*/ 102 | 103 | /*>>ns*/ 104 | ns = {'svg': 'http://www.w3.org/2000/svg'}, 105 | /*>>ns*/ 106 | 107 | tests = {}, 108 | inputs = {}, 109 | attrs = {}, 110 | 111 | classes = [], 112 | 113 | slice = classes.slice, 114 | 115 | featureName, // used in testing loop 116 | 117 | 118 | /*>>teststyles*/ 119 | // Inject element with style element and some CSS rules 120 | injectElementWithStyles = function( rule, callback, nodes, testnames ) { 121 | 122 | var style, ret, node, docOverflow, 123 | div = document.createElement('div'), 124 | // After page load injecting a fake body doesn't work so check if body exists 125 | body = document.body, 126 | // IE6 and 7 won't return offsetWidth or offsetHeight unless it's in the body element, so we fake it. 127 | fakeBody = body || document.createElement('body'); 128 | 129 | if ( parseInt(nodes, 10) ) { 130 | // In order not to give false positives we create a node for each test 131 | // This also allows the method to scale for unspecified uses 132 | while ( nodes-- ) { 133 | node = document.createElement('div'); 134 | node.id = testnames ? testnames[nodes] : mod + (nodes + 1); 135 | div.appendChild(node); 136 | } 137 | } 138 | 139 | // '].join(''); 145 | div.id = mod; 146 | // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody. 147 | // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270 148 | (body ? div : fakeBody).innerHTML += style; 149 | fakeBody.appendChild(div); 150 | if ( !body ) { 151 | //avoid crashing IE8, if background image is used 152 | fakeBody.style.background = ''; 153 | //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible 154 | fakeBody.style.overflow = 'hidden'; 155 | docOverflow = docElement.style.overflow; 156 | docElement.style.overflow = 'hidden'; 157 | docElement.appendChild(fakeBody); 158 | } 159 | 160 | ret = callback(div, rule); 161 | // If this is done after page load we don't want to remove the body so check if body exists 162 | if ( !body ) { 163 | fakeBody.parentNode.removeChild(fakeBody); 164 | docElement.style.overflow = docOverflow; 165 | } else { 166 | div.parentNode.removeChild(div); 167 | } 168 | 169 | return !!ret; 170 | 171 | }, 172 | /*>>teststyles*/ 173 | 174 | /*>>mq*/ 175 | // adapted from matchMedia polyfill 176 | // by Scott Jehl and Paul Irish 177 | // gist.github.com/786768 178 | testMediaQuery = function( mq ) { 179 | 180 | var matchMedia = window.matchMedia || window.msMatchMedia; 181 | if ( matchMedia ) { 182 | return matchMedia(mq).matches; 183 | } 184 | 185 | var bool; 186 | 187 | injectElementWithStyles('@media ' + mq + ' { #' + mod + ' { position: absolute; } }', function( node ) { 188 | bool = (window.getComputedStyle ? 189 | getComputedStyle(node, null) : 190 | node.currentStyle)['position'] == 'absolute'; 191 | }); 192 | 193 | return bool; 194 | 195 | }, 196 | /*>>mq*/ 197 | 198 | 199 | /*>>hasevent*/ 200 | // 201 | // isEventSupported determines if a given element supports the given event 202 | // kangax.github.com/iseventsupported/ 203 | // 204 | // The following results are known incorrects: 205 | // Modernizr.hasEvent("webkitTransitionEnd", elem) // false negative 206 | // Modernizr.hasEvent("textInput") // in Webkit. github.com/Modernizr/Modernizr/issues/333 207 | // ... 208 | isEventSupported = (function() { 209 | 210 | var TAGNAMES = { 211 | 'select': 'input', 'change': 'input', 212 | 'submit': 'form', 'reset': 'form', 213 | 'error': 'img', 'load': 'img', 'abort': 'img' 214 | }; 215 | 216 | function isEventSupported( eventName, element ) { 217 | 218 | element = element || document.createElement(TAGNAMES[eventName] || 'div'); 219 | eventName = 'on' + eventName; 220 | 221 | // When using `setAttribute`, IE skips "unload", WebKit skips "unload" and "resize", whereas `in` "catches" those 222 | var isSupported = eventName in element; 223 | 224 | if ( !isSupported ) { 225 | // If it has no `setAttribute` (i.e. doesn't implement Node interface), try generic element 226 | if ( !element.setAttribute ) { 227 | element = document.createElement('div'); 228 | } 229 | if ( element.setAttribute && element.removeAttribute ) { 230 | element.setAttribute(eventName, ''); 231 | isSupported = is(element[eventName], 'function'); 232 | 233 | // If property was created, "remove it" (by setting value to `undefined`) 234 | if ( !is(element[eventName], 'undefined') ) { 235 | element[eventName] = undefined; 236 | } 237 | element.removeAttribute(eventName); 238 | } 239 | } 240 | 241 | element = null; 242 | return isSupported; 243 | } 244 | return isEventSupported; 245 | })(), 246 | /*>>hasevent*/ 247 | 248 | // TODO :: Add flag for hasownprop ? didn't last time 249 | 250 | // hasOwnProperty shim by kangax needed for Safari 2.0 support 251 | _hasOwnProperty = ({}).hasOwnProperty, hasOwnProp; 252 | 253 | if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) { 254 | hasOwnProp = function (object, property) { 255 | return _hasOwnProperty.call(object, property); 256 | }; 257 | } 258 | else { 259 | hasOwnProp = function (object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */ 260 | return ((property in object) && is(object.constructor.prototype[property], 'undefined')); 261 | }; 262 | } 263 | 264 | // Adapted from ES5-shim https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js 265 | // es5.github.com/#x15.3.4.5 266 | 267 | if (!Function.prototype.bind) { 268 | Function.prototype.bind = function bind(that) { 269 | 270 | var target = this; 271 | 272 | if (typeof target != "function") { 273 | throw new TypeError(); 274 | } 275 | 276 | var args = slice.call(arguments, 1), 277 | bound = function () { 278 | 279 | if (this instanceof bound) { 280 | 281 | var F = function(){}; 282 | F.prototype = target.prototype; 283 | var self = new F(); 284 | 285 | var result = target.apply( 286 | self, 287 | args.concat(slice.call(arguments)) 288 | ); 289 | if (Object(result) === result) { 290 | return result; 291 | } 292 | return self; 293 | 294 | } else { 295 | 296 | return target.apply( 297 | that, 298 | args.concat(slice.call(arguments)) 299 | ); 300 | 301 | } 302 | 303 | }; 304 | 305 | return bound; 306 | }; 307 | } 308 | 309 | /** 310 | * setCss applies given styles to the Modernizr DOM node. 311 | */ 312 | function setCss( str ) { 313 | mStyle.cssText = str; 314 | } 315 | 316 | /** 317 | * setCssAll extrapolates all vendor-specific css strings. 318 | */ 319 | function setCssAll( str1, str2 ) { 320 | return setCss(prefixes.join(str1 + ';') + ( str2 || '' )); 321 | } 322 | 323 | /** 324 | * is returns a boolean for if typeof obj is exactly type. 325 | */ 326 | function is( obj, type ) { 327 | return typeof obj === type; 328 | } 329 | 330 | /** 331 | * contains returns a boolean for if substr is found within str. 332 | */ 333 | function contains( str, substr ) { 334 | return !!~('' + str).indexOf(substr); 335 | } 336 | 337 | /*>>testprop*/ 338 | 339 | // testProps is a generic CSS / DOM property test. 340 | 341 | // In testing support for a given CSS property, it's legit to test: 342 | // `elem.style[styleName] !== undefined` 343 | // If the property is supported it will return an empty string, 344 | // if unsupported it will return undefined. 345 | 346 | // We'll take advantage of this quick test and skip setting a style 347 | // on our modernizr element, but instead just testing undefined vs 348 | // empty string. 349 | 350 | // Because the testing of the CSS property names (with "-", as 351 | // opposed to the camelCase DOM properties) is non-portable and 352 | // non-standard but works in WebKit and IE (but not Gecko or Opera), 353 | // we explicitly reject properties with dashes so that authors 354 | // developing in WebKit or IE first don't end up with 355 | // browser-specific content by accident. 356 | 357 | function testProps( props, prefixed ) { 358 | for ( var i in props ) { 359 | var prop = props[i]; 360 | if ( !contains(prop, "-") && mStyle[prop] !== undefined ) { 361 | return prefixed == 'pfx' ? prop : true; 362 | } 363 | } 364 | return false; 365 | } 366 | /*>>testprop*/ 367 | 368 | // TODO :: add testDOMProps 369 | /** 370 | * testDOMProps is a generic DOM property test; if a browser supports 371 | * a certain property, it won't return undefined for it. 372 | */ 373 | function testDOMProps( props, obj, elem ) { 374 | for ( var i in props ) { 375 | var item = obj[props[i]]; 376 | if ( item !== undefined) { 377 | 378 | // return the property name as a string 379 | if (elem === false) return props[i]; 380 | 381 | // let's bind a function 382 | if (is(item, 'function')){ 383 | // default to autobind unless override 384 | return item.bind(elem || obj); 385 | } 386 | 387 | // return the unbound function or obj or value 388 | return item; 389 | } 390 | } 391 | return false; 392 | } 393 | 394 | /*>>testallprops*/ 395 | /** 396 | * testPropsAll tests a list of DOM properties we want to check against. 397 | * We specify literally ALL possible (known and/or likely) properties on 398 | * the element including the non-vendor prefixed one, for forward- 399 | * compatibility. 400 | */ 401 | function testPropsAll( prop, prefixed, elem ) { 402 | 403 | var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1), 404 | props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' '); 405 | 406 | // did they call .prefixed('boxSizing') or are we just testing a prop? 407 | if(is(prefixed, "string") || is(prefixed, "undefined")) { 408 | return testProps(props, prefixed); 409 | 410 | // otherwise, they called .prefixed('requestAnimationFrame', window[, elem]) 411 | } else { 412 | props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' '); 413 | return testDOMProps(props, prefixed, elem); 414 | } 415 | } 416 | /*>>testallprops*/ 417 | 418 | 419 | /** 420 | * Tests 421 | * ----- 422 | */ 423 | 424 | // The *new* flexbox 425 | // dev.w3.org/csswg/css3-flexbox 426 | 427 | tests['flexbox'] = function() { 428 | return testPropsAll('flexWrap'); 429 | }; 430 | 431 | // The *old* flexbox 432 | // www.w3.org/TR/2009/WD-css3-flexbox-20090723/ 433 | 434 | tests['flexboxlegacy'] = function() { 435 | return testPropsAll('boxDirection'); 436 | }; 437 | 438 | // On the S60 and BB Storm, getContext exists, but always returns undefined 439 | // so we actually have to call getContext() to verify 440 | // github.com/Modernizr/Modernizr/issues/issue/97/ 441 | 442 | tests['canvas'] = function() { 443 | var elem = document.createElement('canvas'); 444 | return !!(elem.getContext && elem.getContext('2d')); 445 | }; 446 | 447 | tests['canvastext'] = function() { 448 | return !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function')); 449 | }; 450 | 451 | // webk.it/70117 is tracking a legit WebGL feature detect proposal 452 | 453 | // We do a soft detect which may false positive in order to avoid 454 | // an expensive context creation: bugzil.la/732441 455 | 456 | tests['webgl'] = function() { 457 | return !!window.WebGLRenderingContext; 458 | }; 459 | 460 | /* 461 | * The Modernizr.touch test only indicates if the browser supports 462 | * touch events, which does not necessarily reflect a touchscreen 463 | * device, as evidenced by tablets running Windows 7 or, alas, 464 | * the Palm Pre / WebOS (touch) phones. 465 | * 466 | * Additionally, Chrome (desktop) used to lie about its support on this, 467 | * but that has since been rectified: crbug.com/36415 468 | * 469 | * We also test for Firefox 4 Multitouch Support. 470 | * 471 | * For more info, see: modernizr.github.com/Modernizr/touch.html 472 | */ 473 | 474 | tests['touch'] = function() { 475 | var bool; 476 | 477 | if(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) { 478 | bool = true; 479 | } else { 480 | injectElementWithStyles(['@media (',prefixes.join('touch-enabled),('),mod,')','{#modernizr{top:9px;position:absolute}}'].join(''), function( node ) { 481 | bool = node.offsetTop === 9; 482 | }); 483 | } 484 | 485 | return bool; 486 | }; 487 | 488 | 489 | // geolocation is often considered a trivial feature detect... 490 | // Turns out, it's quite tricky to get right: 491 | // 492 | // Using !!navigator.geolocation does two things we don't want. It: 493 | // 1. Leaks memory in IE9: github.com/Modernizr/Modernizr/issues/513 494 | // 2. Disables page caching in WebKit: webk.it/43956 495 | // 496 | // Meanwhile, in Firefox < 8, an about:config setting could expose 497 | // a false positive that would throw an exception: bugzil.la/688158 498 | 499 | tests['geolocation'] = function() { 500 | return 'geolocation' in navigator; 501 | }; 502 | 503 | 504 | tests['postmessage'] = function() { 505 | return !!window.postMessage; 506 | }; 507 | 508 | 509 | // Chrome incognito mode used to throw an exception when using openDatabase 510 | // It doesn't anymore. 511 | tests['websqldatabase'] = function() { 512 | return !!window.openDatabase; 513 | }; 514 | 515 | // Vendors had inconsistent prefixing with the experimental Indexed DB: 516 | // - Webkit's implementation is accessible through webkitIndexedDB 517 | // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB 518 | // For speed, we don't test the legacy (and beta-only) indexedDB 519 | tests['indexedDB'] = function() { 520 | return !!testPropsAll("indexedDB", window); 521 | }; 522 | 523 | // documentMode logic from YUI to filter out IE8 Compat Mode 524 | // which false positives. 525 | tests['hashchange'] = function() { 526 | return isEventSupported('hashchange', window) && (document.documentMode === undefined || document.documentMode > 7); 527 | }; 528 | 529 | // Per 1.6: 530 | // This used to be Modernizr.historymanagement but the longer 531 | // name has been deprecated in favor of a shorter and property-matching one. 532 | // The old API is still available in 1.6, but as of 2.0 will throw a warning, 533 | // and in the first release thereafter disappear entirely. 534 | tests['history'] = function() { 535 | return !!(window.history && history.pushState); 536 | }; 537 | 538 | tests['draganddrop'] = function() { 539 | var div = document.createElement('div'); 540 | return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div); 541 | }; 542 | 543 | // FF3.6 was EOL'ed on 4/24/12, but the ESR version of FF10 544 | // will be supported until FF19 (2/12/13), at which time, ESR becomes FF17. 545 | // FF10 still uses prefixes, so check for it until then. 546 | // for more ESR info, see: mozilla.org/en-US/firefox/organizations/faq/ 547 | tests['websockets'] = function() { 548 | return 'WebSocket' in window || 'MozWebSocket' in window; 549 | }; 550 | 551 | 552 | // css-tricks.com/rgba-browser-support/ 553 | tests['rgba'] = function() { 554 | // Set an rgba() color and check the returned value 555 | 556 | setCss('background-color:rgba(150,255,150,.5)'); 557 | 558 | return contains(mStyle.backgroundColor, 'rgba'); 559 | }; 560 | 561 | tests['hsla'] = function() { 562 | // Same as rgba(), in fact, browsers re-map hsla() to rgba() internally, 563 | // except IE9 who retains it as hsla 564 | 565 | setCss('background-color:hsla(120,40%,100%,.5)'); 566 | 567 | return contains(mStyle.backgroundColor, 'rgba') || contains(mStyle.backgroundColor, 'hsla'); 568 | }; 569 | 570 | tests['multiplebgs'] = function() { 571 | // Setting multiple images AND a color on the background shorthand property 572 | // and then querying the style.background property value for the number of 573 | // occurrences of "url(" is a reliable method for detecting ACTUAL support for this! 574 | 575 | setCss('background:url(https://),url(https://),red url(https://)'); 576 | 577 | // If the UA supports multiple backgrounds, there should be three occurrences 578 | // of the string "url(" in the return value for elemStyle.background 579 | 580 | return (/(url\s*\(.*?){3}/).test(mStyle.background); 581 | }; 582 | 583 | 584 | 585 | // this will false positive in Opera Mini 586 | // github.com/Modernizr/Modernizr/issues/396 587 | 588 | tests['backgroundsize'] = function() { 589 | return testPropsAll('backgroundSize'); 590 | }; 591 | 592 | tests['borderimage'] = function() { 593 | return testPropsAll('borderImage'); 594 | }; 595 | 596 | 597 | // Super comprehensive table about all the unique implementations of 598 | // border-radius: muddledramblings.com/table-of-css3-border-radius-compliance 599 | 600 | tests['borderradius'] = function() { 601 | return testPropsAll('borderRadius'); 602 | }; 603 | 604 | // WebOS unfortunately false positives on this test. 605 | tests['boxshadow'] = function() { 606 | return testPropsAll('boxShadow'); 607 | }; 608 | 609 | // FF3.0 will false positive on this test 610 | tests['textshadow'] = function() { 611 | return document.createElement('div').style.textShadow === ''; 612 | }; 613 | 614 | 615 | tests['opacity'] = function() { 616 | // Browsers that actually have CSS Opacity implemented have done so 617 | // according to spec, which means their return values are within the 618 | // range of [0.0,1.0] - including the leading zero. 619 | 620 | setCssAll('opacity:.55'); 621 | 622 | // The non-literal . in this regex is intentional: 623 | // German Chrome returns this value as 0,55 624 | // github.com/Modernizr/Modernizr/issues/#issue/59/comment/516632 625 | return (/^0.55$/).test(mStyle.opacity); 626 | }; 627 | 628 | 629 | // Note, Android < 4 will pass this test, but can only animate 630 | // a single property at a time 631 | // daneden.me/2011/12/putting-up-with-androids-bullshit/ 632 | tests['cssanimations'] = function() { 633 | return testPropsAll('animationName'); 634 | }; 635 | 636 | 637 | tests['csscolumns'] = function() { 638 | return testPropsAll('columnCount'); 639 | }; 640 | 641 | 642 | tests['cssgradients'] = function() { 643 | /** 644 | * For CSS Gradients syntax, please see: 645 | * webkit.org/blog/175/introducing-css-gradients/ 646 | * developer.mozilla.org/en/CSS/-moz-linear-gradient 647 | * developer.mozilla.org/en/CSS/-moz-radial-gradient 648 | * dev.w3.org/csswg/css3-images/#gradients- 649 | */ 650 | 651 | var str1 = 'background-image:', 652 | str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));', 653 | str3 = 'linear-gradient(left top,#9f9, white);'; 654 | 655 | setCss( 656 | // legacy webkit syntax (FIXME: remove when syntax not in use anymore) 657 | (str1 + '-webkit- '.split(' ').join(str2 + str1) + 658 | // standard syntax // trailing 'background-image:' 659 | prefixes.join(str3 + str1)).slice(0, -str1.length) 660 | ); 661 | 662 | return contains(mStyle.backgroundImage, 'gradient'); 663 | }; 664 | 665 | 666 | tests['cssreflections'] = function() { 667 | return testPropsAll('boxReflect'); 668 | }; 669 | 670 | 671 | tests['csstransforms'] = function() { 672 | return !!testPropsAll('transform'); 673 | }; 674 | 675 | 676 | tests['csstransforms3d'] = function() { 677 | 678 | var ret = !!testPropsAll('perspective'); 679 | 680 | // Webkit's 3D transforms are passed off to the browser's own graphics renderer. 681 | // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in 682 | // some conditions. As a result, Webkit typically recognizes the syntax but 683 | // will sometimes throw a false positive, thus we must do a more thorough check: 684 | if ( ret && 'webkitPerspective' in docElement.style ) { 685 | 686 | // Webkit allows this media query to succeed only if the feature is enabled. 687 | // `@media (transform-3d),(-webkit-transform-3d){ ... }` 688 | injectElementWithStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}', function( node, rule ) { 689 | ret = node.offsetLeft === 9 && node.offsetHeight === 3; 690 | }); 691 | } 692 | return ret; 693 | }; 694 | 695 | 696 | tests['csstransitions'] = function() { 697 | return testPropsAll('transition'); 698 | }; 699 | 700 | 701 | /*>>fontface*/ 702 | // @font-face detection routine by Diego Perini 703 | // javascript.nwbox.com/CSSSupport/ 704 | 705 | // false positives: 706 | // WebOS github.com/Modernizr/Modernizr/issues/342 707 | // WP7 github.com/Modernizr/Modernizr/issues/538 708 | tests['fontface'] = function() { 709 | var bool; 710 | 711 | injectElementWithStyles('@font-face {font-family:"font";src:url("https://")}', function( node, rule ) { 712 | var style = document.getElementById('smodernizr'), 713 | sheet = style.sheet || style.styleSheet, 714 | cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : ''; 715 | 716 | bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0; 717 | }); 718 | 719 | return bool; 720 | }; 721 | /*>>fontface*/ 722 | 723 | // CSS generated content detection 724 | tests['generatedcontent'] = function() { 725 | var bool; 726 | 727 | injectElementWithStyles(['#',mod,'{font:0/0 a}#',mod,':after{content:"',smile,'";visibility:hidden;font:3px/1 a}'].join(''), function( node ) { 728 | bool = node.offsetHeight >= 3; 729 | }); 730 | 731 | return bool; 732 | }; 733 | 734 | 735 | 736 | // These tests evaluate support of the video/audio elements, as well as 737 | // testing what types of content they support. 738 | // 739 | // We're using the Boolean constructor here, so that we can extend the value 740 | // e.g. Modernizr.video // true 741 | // Modernizr.video.ogg // 'probably' 742 | // 743 | // Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845 744 | // thx to NielsLeenheer and zcorpan 745 | 746 | // Note: in some older browsers, "no" was a return value instead of empty string. 747 | // It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2 748 | // It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5 749 | 750 | tests['video'] = function() { 751 | var elem = document.createElement('video'), 752 | bool = false; 753 | 754 | // IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224 755 | try { 756 | if ( bool = !!elem.canPlayType ) { 757 | bool = new Boolean(bool); 758 | bool.ogg = elem.canPlayType('video/ogg; codecs="theora"') .replace(/^no$/,''); 759 | 760 | // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546 761 | bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"') .replace(/^no$/,''); 762 | 763 | bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,''); 764 | } 765 | 766 | } catch(e) { } 767 | 768 | return bool; 769 | }; 770 | 771 | tests['audio'] = function() { 772 | var elem = document.createElement('audio'), 773 | bool = false; 774 | 775 | try { 776 | if ( bool = !!elem.canPlayType ) { 777 | bool = new Boolean(bool); 778 | bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,''); 779 | bool.mp3 = elem.canPlayType('audio/mpeg;') .replace(/^no$/,''); 780 | 781 | // Mimetypes accepted: 782 | // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements 783 | // bit.ly/iphoneoscodecs 784 | bool.wav = elem.canPlayType('audio/wav; codecs="1"') .replace(/^no$/,''); 785 | bool.m4a = ( elem.canPlayType('audio/x-m4a;') || 786 | elem.canPlayType('audio/aac;')) .replace(/^no$/,''); 787 | } 788 | } catch(e) { } 789 | 790 | return bool; 791 | }; 792 | 793 | 794 | // In FF4, if disabled, window.localStorage should === null. 795 | 796 | // Normally, we could not test that directly and need to do a 797 | // `('localStorage' in window) && ` test first because otherwise Firefox will 798 | // throw bugzil.la/365772 if cookies are disabled 799 | 800 | // Also in iOS5 Private Browsing mode, attempting to use localStorage.setItem 801 | // will throw the exception: 802 | // QUOTA_EXCEEDED_ERRROR DOM Exception 22. 803 | // Peculiarly, getItem and removeItem calls do not throw. 804 | 805 | // Because we are forced to try/catch this, we'll go aggressive. 806 | 807 | // Just FWIW: IE8 Compat mode supports these features completely: 808 | // www.quirksmode.org/dom/html5.html 809 | // But IE8 doesn't support either with local files 810 | 811 | tests['localstorage'] = function() { 812 | try { 813 | localStorage.setItem(mod, mod); 814 | localStorage.removeItem(mod); 815 | return true; 816 | } catch(e) { 817 | return false; 818 | } 819 | }; 820 | 821 | tests['sessionstorage'] = function() { 822 | try { 823 | sessionStorage.setItem(mod, mod); 824 | sessionStorage.removeItem(mod); 825 | return true; 826 | } catch(e) { 827 | return false; 828 | } 829 | }; 830 | 831 | 832 | tests['webworkers'] = function() { 833 | return !!window.Worker; 834 | }; 835 | 836 | 837 | tests['applicationcache'] = function() { 838 | return !!window.applicationCache; 839 | }; 840 | 841 | 842 | // Thanks to Erik Dahlstrom 843 | tests['svg'] = function() { 844 | return !!document.createElementNS && !!document.createElementNS(ns.svg, 'svg').createSVGRect; 845 | }; 846 | 847 | // specifically for SVG inline in HTML, not within XHTML 848 | // test page: paulirish.com/demo/inline-svg 849 | tests['inlinesvg'] = function() { 850 | var div = document.createElement('div'); 851 | div.innerHTML = ''; 852 | return (div.firstChild && div.firstChild.namespaceURI) == ns.svg; 853 | }; 854 | 855 | // SVG SMIL animation 856 | tests['smil'] = function() { 857 | return !!document.createElementNS && /SVGAnimate/.test(toString.call(document.createElementNS(ns.svg, 'animate'))); 858 | }; 859 | 860 | // This test is only for clip paths in SVG proper, not clip paths on HTML content 861 | // demo: srufaculty.sru.edu/david.dailey/svg/newstuff/clipPath4.svg 862 | 863 | // However read the comments to dig into applying SVG clippaths to HTML content here: 864 | // github.com/Modernizr/Modernizr/issues/213#issuecomment-1149491 865 | tests['svgclippaths'] = function() { 866 | return !!document.createElementNS && /SVGClipPath/.test(toString.call(document.createElementNS(ns.svg, 'clipPath'))); 867 | }; 868 | 869 | /*>>webforms*/ 870 | // input features and input types go directly onto the ret object, bypassing the tests loop. 871 | // Hold this guy to execute in a moment. 872 | function webforms() { 873 | /*>>input*/ 874 | // Run through HTML5's new input attributes to see if the UA understands any. 875 | // We're using f which is the element created early on 876 | // Mike Taylr has created a comprehensive resource for testing these attributes 877 | // when applied to all input types: 878 | // miketaylr.com/code/input-type-attr.html 879 | // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary 880 | 881 | // Only input placeholder is tested while textarea's placeholder is not. 882 | // Currently Safari 4 and Opera 11 have support only for the input placeholder 883 | // Both tests are available in feature-detects/forms-placeholder.js 884 | Modernizr['input'] = (function( props ) { 885 | for ( var i = 0, len = props.length; i < len; i++ ) { 886 | attrs[ props[i] ] = !!(props[i] in inputElem); 887 | } 888 | if (attrs.list){ 889 | // safari false positive's on datalist: webk.it/74252 890 | // see also github.com/Modernizr/Modernizr/issues/146 891 | attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement); 892 | } 893 | return attrs; 894 | })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' ')); 895 | /*>>input*/ 896 | 897 | /*>>inputtypes*/ 898 | // Run through HTML5's new input types to see if the UA understands any. 899 | // This is put behind the tests runloop because it doesn't return a 900 | // true/false like all the other tests; instead, it returns an object 901 | // containing each input type with its corresponding true/false value 902 | 903 | // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/ 904 | Modernizr['inputtypes'] = (function(props) { 905 | 906 | for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) { 907 | 908 | inputElem.setAttribute('type', inputElemType = props[i]); 909 | bool = inputElem.type !== 'text'; 910 | 911 | // We first check to see if the type we give it sticks.. 912 | // If the type does, we feed it a textual value, which shouldn't be valid. 913 | // If the value doesn't stick, we know there's input sanitization which infers a custom UI 914 | if ( bool ) { 915 | 916 | inputElem.value = smile; 917 | inputElem.style.cssText = 'position:absolute;visibility:hidden;'; 918 | 919 | if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) { 920 | 921 | docElement.appendChild(inputElem); 922 | defaultView = document.defaultView; 923 | 924 | // Safari 2-4 allows the smiley as a value, despite making a slider 925 | bool = defaultView.getComputedStyle && 926 | defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' && 927 | // Mobile android web browser has false positive, so must 928 | // check the height to see if the widget is actually there. 929 | (inputElem.offsetHeight !== 0); 930 | 931 | docElement.removeChild(inputElem); 932 | 933 | } else if ( /^(search|tel)$/.test(inputElemType) ){ 934 | // Spec doesn't define any special parsing or detectable UI 935 | // behaviors so we pass these through as true 936 | 937 | // Interestingly, opera fails the earlier test, so it doesn't 938 | // even make it here. 939 | 940 | } else if ( /^(url|email)$/.test(inputElemType) ) { 941 | // Real url and email support comes with prebaked validation. 942 | bool = inputElem.checkValidity && inputElem.checkValidity() === false; 943 | 944 | } else { 945 | // If the upgraded input compontent rejects the :) text, we got a winner 946 | bool = inputElem.value != smile; 947 | } 948 | } 949 | 950 | inputs[ props[i] ] = !!bool; 951 | } 952 | return inputs; 953 | })('search tel url email datetime date month week time datetime-local number range color'.split(' ')); 954 | /*>>inputtypes*/ 955 | } 956 | /*>>webforms*/ 957 | 958 | 959 | // End of test definitions 960 | // ----------------------- 961 | 962 | 963 | 964 | // Run through all tests and detect their support in the current UA. 965 | // todo: hypothetically we could be doing an array of tests and use a basic loop here. 966 | for ( var feature in tests ) { 967 | if ( hasOwnProp(tests, feature) ) { 968 | // run the test, throw the return value into the Modernizr, 969 | // then based on that boolean, define an appropriate className 970 | // and push it into an array of classes we'll join later. 971 | featureName = feature.toLowerCase(); 972 | Modernizr[featureName] = tests[feature](); 973 | 974 | classes.push((Modernizr[featureName] ? '' : 'no-') + featureName); 975 | } 976 | } 977 | 978 | /*>>webforms*/ 979 | // input tests need to run. 980 | Modernizr.input || webforms(); 981 | /*>>webforms*/ 982 | 983 | 984 | /** 985 | * addTest allows the user to define their own feature tests 986 | * the result will be added onto the Modernizr object, 987 | * as well as an appropriate className set on the html element 988 | * 989 | * @param feature - String naming the feature 990 | * @param test - Function returning true if feature is supported, false if not 991 | */ 992 | Modernizr.addTest = function ( feature, test ) { 993 | if ( typeof feature == 'object' ) { 994 | for ( var key in feature ) { 995 | if ( hasOwnProp( feature, key ) ) { 996 | Modernizr.addTest( key, feature[ key ] ); 997 | } 998 | } 999 | } else { 1000 | 1001 | feature = feature.toLowerCase(); 1002 | 1003 | if ( Modernizr[feature] !== undefined ) { 1004 | // we're going to quit if you're trying to overwrite an existing test 1005 | // if we were to allow it, we'd do this: 1006 | // var re = new RegExp("\\b(no-)?" + feature + "\\b"); 1007 | // docElement.className = docElement.className.replace( re, '' ); 1008 | // but, no rly, stuff 'em. 1009 | return Modernizr; 1010 | } 1011 | 1012 | test = typeof test == 'function' ? test() : test; 1013 | 1014 | if (typeof enableClasses !== "undefined" && enableClasses) { 1015 | docElement.className += ' ' + (test ? '' : 'no-') + feature; 1016 | } 1017 | Modernizr[feature] = test; 1018 | 1019 | } 1020 | 1021 | return Modernizr; // allow chaining. 1022 | }; 1023 | 1024 | 1025 | // Reset modElem.cssText to nothing to reduce memory footprint. 1026 | setCss(''); 1027 | modElem = inputElem = null; 1028 | 1029 | /*>>shiv*/ 1030 | /*! HTML5 Shiv v3.6.1 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed */ 1031 | ;(function(window, document) { 1032 | /*jshint evil:true */ 1033 | /** Preset options */ 1034 | var options = window.html5 || {}; 1035 | 1036 | /** Used to skip problem elements */ 1037 | var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i; 1038 | 1039 | /** Not all elements can be cloned in IE **/ 1040 | var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i; 1041 | 1042 | /** Detect whether the browser supports default html5 styles */ 1043 | var supportsHtml5Styles; 1044 | 1045 | /** Name of the expando, to work with multiple documents or to re-shiv one document */ 1046 | var expando = '_html5shiv'; 1047 | 1048 | /** The id for the the documents expando */ 1049 | var expanID = 0; 1050 | 1051 | /** Cached data for each document */ 1052 | var expandoData = {}; 1053 | 1054 | /** Detect whether the browser supports unknown elements */ 1055 | var supportsUnknownElements; 1056 | 1057 | (function() { 1058 | try { 1059 | var a = document.createElement('a'); 1060 | a.innerHTML = ''; 1061 | //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles 1062 | supportsHtml5Styles = ('hidden' in a); 1063 | 1064 | supportsUnknownElements = a.childNodes.length == 1 || (function() { 1065 | // assign a false positive if unable to shiv 1066 | (document.createElement)('a'); 1067 | var frag = document.createDocumentFragment(); 1068 | return ( 1069 | typeof frag.cloneNode == 'undefined' || 1070 | typeof frag.createDocumentFragment == 'undefined' || 1071 | typeof frag.createElement == 'undefined' 1072 | ); 1073 | }()); 1074 | } catch(e) { 1075 | supportsHtml5Styles = true; 1076 | supportsUnknownElements = true; 1077 | } 1078 | 1079 | }()); 1080 | 1081 | /*--------------------------------------------------------------------------*/ 1082 | 1083 | /** 1084 | * Creates a style sheet with the given CSS text and adds it to the document. 1085 | * @private 1086 | * @param {Document} ownerDocument The document. 1087 | * @param {String} cssText The CSS text. 1088 | * @returns {StyleSheet} The style element. 1089 | */ 1090 | function addStyleSheet(ownerDocument, cssText) { 1091 | var p = ownerDocument.createElement('p'), 1092 | parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement; 1093 | 1094 | p.innerHTML = 'x'; 1095 | return parent.insertBefore(p.lastChild, parent.firstChild); 1096 | } 1097 | 1098 | /** 1099 | * Returns the value of `html5.elements` as an array. 1100 | * @private 1101 | * @returns {Array} An array of shived element node names. 1102 | */ 1103 | function getElements() { 1104 | var elements = html5.elements; 1105 | return typeof elements == 'string' ? elements.split(' ') : elements; 1106 | } 1107 | 1108 | /** 1109 | * Returns the data associated to the given document 1110 | * @private 1111 | * @param {Document} ownerDocument The document. 1112 | * @returns {Object} An object of data. 1113 | */ 1114 | function getExpandoData(ownerDocument) { 1115 | var data = expandoData[ownerDocument[expando]]; 1116 | if (!data) { 1117 | data = {}; 1118 | expanID++; 1119 | ownerDocument[expando] = expanID; 1120 | expandoData[expanID] = data; 1121 | } 1122 | return data; 1123 | } 1124 | 1125 | /** 1126 | * returns a shived element for the given nodeName and document 1127 | * @memberOf html5 1128 | * @param {String} nodeName name of the element 1129 | * @param {Document} ownerDocument The context document. 1130 | * @returns {Object} The shived element. 1131 | */ 1132 | function createElement(nodeName, ownerDocument, data){ 1133 | if (!ownerDocument) { 1134 | ownerDocument = document; 1135 | } 1136 | if(supportsUnknownElements){ 1137 | return ownerDocument.createElement(nodeName); 1138 | } 1139 | if (!data) { 1140 | data = getExpandoData(ownerDocument); 1141 | } 1142 | var node; 1143 | 1144 | if (data.cache[nodeName]) { 1145 | node = data.cache[nodeName].cloneNode(); 1146 | } else if (saveClones.test(nodeName)) { 1147 | node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode(); 1148 | } else { 1149 | node = data.createElem(nodeName); 1150 | } 1151 | 1152 | // Avoid adding some elements to fragments in IE < 9 because 1153 | // * Attributes like `name` or `type` cannot be set/changed once an element 1154 | // is inserted into a document/fragment 1155 | // * Link elements with `src` attributes that are inaccessible, as with 1156 | // a 403 response, will cause the tab/window to crash 1157 | // * Script elements appended to fragments will execute when their `src` 1158 | // or `text` property is set 1159 | return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node; 1160 | } 1161 | 1162 | /** 1163 | * returns a shived DocumentFragment for the given document 1164 | * @memberOf html5 1165 | * @param {Document} ownerDocument The context document. 1166 | * @returns {Object} The shived DocumentFragment. 1167 | */ 1168 | function createDocumentFragment(ownerDocument, data){ 1169 | if (!ownerDocument) { 1170 | ownerDocument = document; 1171 | } 1172 | if(supportsUnknownElements){ 1173 | return ownerDocument.createDocumentFragment(); 1174 | } 1175 | data = data || getExpandoData(ownerDocument); 1176 | var clone = data.frag.cloneNode(), 1177 | i = 0, 1178 | elems = getElements(), 1179 | l = elems.length; 1180 | for(;i>shiv*/ 1319 | 1320 | // Assign private properties to the return object with prefix 1321 | Modernizr._version = version; 1322 | 1323 | // expose these for the plugin API. Look in the source for how to join() them against your input 1324 | /*>>prefixes*/ 1325 | Modernizr._prefixes = prefixes; 1326 | /*>>prefixes*/ 1327 | /*>>domprefixes*/ 1328 | Modernizr._domPrefixes = domPrefixes; 1329 | Modernizr._cssomPrefixes = cssomPrefixes; 1330 | /*>>domprefixes*/ 1331 | 1332 | /*>>mq*/ 1333 | // Modernizr.mq tests a given media query, live against the current state of the window 1334 | // A few important notes: 1335 | // * If a browser does not support media queries at all (eg. oldIE) the mq() will always return false 1336 | // * A max-width or orientation query will be evaluated against the current state, which may change later. 1337 | // * You must specify values. Eg. If you are testing support for the min-width media query use: 1338 | // Modernizr.mq('(min-width:0)') 1339 | // usage: 1340 | // Modernizr.mq('only screen and (max-width:768)') 1341 | Modernizr.mq = testMediaQuery; 1342 | /*>>mq*/ 1343 | 1344 | /*>>hasevent*/ 1345 | // Modernizr.hasEvent() detects support for a given event, with an optional element to test on 1346 | // Modernizr.hasEvent('gesturestart', elem) 1347 | Modernizr.hasEvent = isEventSupported; 1348 | /*>>hasevent*/ 1349 | 1350 | /*>>testprop*/ 1351 | // Modernizr.testProp() investigates whether a given style property is recognized 1352 | // Note that the property names must be provided in the camelCase variant. 1353 | // Modernizr.testProp('pointerEvents') 1354 | Modernizr.testProp = function(prop){ 1355 | return testProps([prop]); 1356 | }; 1357 | /*>>testprop*/ 1358 | 1359 | /*>>testallprops*/ 1360 | // Modernizr.testAllProps() investigates whether a given style property, 1361 | // or any of its vendor-prefixed variants, is recognized 1362 | // Note that the property names must be provided in the camelCase variant. 1363 | // Modernizr.testAllProps('boxSizing') 1364 | Modernizr.testAllProps = testPropsAll; 1365 | /*>>testallprops*/ 1366 | 1367 | 1368 | /*>>teststyles*/ 1369 | // Modernizr.testStyles() allows you to add custom styles to the document and test an element afterwards 1370 | // Modernizr.testStyles('#modernizr { position:absolute }', function(elem, rule){ ... }) 1371 | Modernizr.testStyles = injectElementWithStyles; 1372 | /*>>teststyles*/ 1373 | 1374 | 1375 | /*>>prefixed*/ 1376 | // Modernizr.prefixed() returns the prefixed or nonprefixed property name variant of your input 1377 | // Modernizr.prefixed('boxSizing') // 'MozBoxSizing' 1378 | 1379 | // Properties must be passed as dom-style camelcase, rather than `box-sizing` hypentated style. 1380 | // Return values will also be the camelCase variant, if you need to translate that to hypenated style use: 1381 | // 1382 | // str.replace(/([A-Z])/g, function(str,m1){ return '-' + m1.toLowerCase(); }).replace(/^ms-/,'-ms-'); 1383 | 1384 | // If you're trying to ascertain which transition end event to bind to, you might do something like... 1385 | // 1386 | // var transEndEventNames = { 1387 | // 'WebkitTransition' : 'webkitTransitionEnd', 1388 | // 'MozTransition' : 'transitionend', 1389 | // 'OTransition' : 'oTransitionEnd', 1390 | // 'msTransition' : 'MSTransitionEnd', 1391 | // 'transition' : 'transitionend' 1392 | // }, 1393 | // transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ]; 1394 | 1395 | Modernizr.prefixed = function(prop, obj, elem){ 1396 | if(!obj) { 1397 | return testPropsAll(prop, 'pfx'); 1398 | } else { 1399 | // Testing DOM property e.g. Modernizr.prefixed('requestAnimationFrame', window) // 'mozRequestAnimationFrame' 1400 | return testPropsAll(prop, obj, elem); 1401 | } 1402 | }; 1403 | /*>>prefixed*/ 1404 | 1405 | 1406 | /*>>cssclasses*/ 1407 | // Remove "no-js" class from element, if it exists: 1408 | docElement.className = docElement.className.replace(/(^|\s)no-js(\s|$)/, '$1$2') + 1409 | 1410 | // Add the new classes to the element. 1411 | (enableClasses ? ' js ' + classes.join(' ') : ''); 1412 | /*>>cssclasses*/ 1413 | 1414 | return Modernizr; 1415 | 1416 | })(this, this.document); 1417 | --------------------------------------------------------------------------------