| @@ -1,16 +1,16 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Web; | ||
| using System.Web.Mvc; | ||
|
|
||
| namespace Vision.Controllers | ||
| { | ||
| public class PagesController : Controller | ||
| { | ||
| public ActionResult Home() | ||
| { | ||
| return View(); | ||
| } | ||
| } | ||
| } |
| @@ -1 +1 @@ | ||
| <%@ Application Codebehind="Global.asax.cs" Inherits="Vision.MvcApplication" Language="C#" %> |
| @@ -1,48 +1,40 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Web; | ||
| using System.Web.Mvc; | ||
| using System.Web.Routing; | ||
|
|
||
| namespace Vision | ||
| { | ||
| // Note: For instructions on enabling IIS6 or IIS7 classic mode, | ||
| // visit http://go.microsoft.com/?LinkId=9394801 | ||
|
|
||
| public class MvcApplication : System.Web.HttpApplication | ||
| { | ||
| public static void RegisterGlobalFilters(GlobalFilterCollection filters) | ||
| { | ||
| filters.Add(new HandleErrorAttribute()); | ||
| } | ||
|
|
||
| public static void RegisterRoutes(RouteCollection routes) | ||
| { | ||
| routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); | ||
|
|
||
| routes.MapRoute( | ||
| "Default", // Route name | ||
| "{controller}/{action}/{id}", // URL with parameters | ||
| new { controller = "Pages", action = "Home", id = UrlParameter.Optional } // Parameter defaults | ||
| ); | ||
|
|
||
| } | ||
|
|
||
| protected void Application_Start() | ||
| { | ||
| AreaRegistration.RegisterAllAreas(); | ||
|
|
||
| RegisterGlobalFilters(GlobalFilters.Filters); | ||
| RegisterRoutes(RouteTable.Routes); | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,27 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Web; | ||
|
|
||
| namespace Vision.Models | ||
| { | ||
| public class Glasses | ||
| { | ||
| public int GlassesId { get; set; } | ||
| public int Group { get; set; } | ||
| public int Number { get; set; } | ||
| public Eye OD { get; set; } | ||
| public Eye OS { get; set; } | ||
| public bool Sunglasses { get; set; } | ||
| public char Size { get; set; } | ||
| public char Gender { get; set; } | ||
|
|
||
| public class Eye | ||
| { | ||
| public float Spherical { get; set; } | ||
| public float Cylindrical { get; set; } | ||
| public int Axis { get; set; } | ||
| public float Add { get; set; } | ||
| } | ||
| } | ||
| } |
| @@ -1,35 +1,35 @@ | ||
| using System.Reflection; | ||
| using System.Runtime.CompilerServices; | ||
| using System.Runtime.InteropServices; | ||
|
|
||
| // General Information about an assembly is controlled through the following | ||
| // set of attributes. Change these attribute values to modify the information | ||
| // associated with an assembly. | ||
| [assembly: AssemblyTitle("Vision")] | ||
| [assembly: AssemblyDescription("")] | ||
| [assembly: AssemblyConfiguration("")] | ||
| [assembly: AssemblyCompany("")] | ||
| [assembly: AssemblyProduct("Vision")] | ||
| [assembly: AssemblyCopyright("Copyright © 2012")] | ||
| [assembly: AssemblyTrademark("")] | ||
| [assembly: AssemblyCulture("")] | ||
|
|
||
| // Setting ComVisible to false makes the types in this assembly not visible | ||
| // to COM components. If you need to access a type in this assembly from | ||
| // COM, set the ComVisible attribute to true on that type. | ||
| [assembly: ComVisible(false)] | ||
|
|
||
| // The following GUID is for the ID of the typelib if this project is exposed to COM | ||
| [assembly: Guid("dd15bf05-d601-4224-8369-962ec3f866c2")] | ||
|
|
||
| // Version information for an assembly consists of the following four values: | ||
| // | ||
| // Major Version | ||
| // Minor Version | ||
| // Build Number | ||
| // Revision | ||
| // | ||
| // You can specify all the values or you can default the Revision and Build Numbers | ||
| // by using the '*' as shown below: | ||
| [assembly: AssemblyVersion("1.0.0.0")] | ||
| [assembly: AssemblyFileVersion("1.0.0.0")] |
| @@ -0,0 +1,106 @@ | ||
| @{ | ||
| ViewBag.Title = "Home Page"; | ||
| } | ||
|
|
||
| <div class="span12"> | ||
| <div class="row-fluid"> | ||
| <div class="hero-unit span9"> | ||
| <h1>Hello, world!</h1> | ||
| <p>This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.</p> | ||
| <p><a class="btn btn-primary btn-large">Learn more »</a></p> | ||
| </div> | ||
| <div class="span3"> | ||
| <h2>Help</h2> | ||
| <p>In the top right corner, there are help links.</p> | ||
| <p>Workflow explanation for: <a href="#">adding glasses</a>, <a href="#">packing glasses</a> and <a href="#">search/distributing glasses</a></p> | ||
| <hr> | ||
| </div> | ||
| </div> | ||
| <div class="row-fluid"> | ||
| <div class="span4"> | ||
| <h2>Add Glasses</h2> | ||
| <p><a class="btn btn-success" href="#">Go »</a></p> | ||
| <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p> | ||
| <hr> | ||
| </div><!--/span--> | ||
| <div class="span4"> | ||
| <h2>Search for Glasses</h2> | ||
| <p><a class="btn btn-warning" href="#">Go »</a></p> | ||
| <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p> | ||
| <hr> | ||
| </div><!--/span--> | ||
| <div class="span4"> | ||
| <h2>Export Data</h2> | ||
| <p><a class="btn btn-danger" href="#">Go »</a></p> | ||
| <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p> | ||
| <hr> | ||
| </div><!--/span--> | ||
| </div><!--/row--> | ||
| </div><!--/span--> | ||
|
|
||
| <table class="table table-striped table-bordered table-condensed"> | ||
| <thead> | ||
| <tr> | ||
| <th>Score</th> | ||
| <th>Call #</th> | ||
| <th>OD Sph</th> | ||
| <th>OD Cyl</th> | ||
| <th>OD Axis</th> | ||
| <th>OD Add</th> | ||
| <th>OS Sph</th> | ||
| <th>OS Cyl</th> | ||
| <th>OS Axis</th> | ||
| <th>OS Add</th> | ||
| <th>Sungl.</th> | ||
| <th>Gender</th> | ||
| <th>Size</th> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| <tr> | ||
| <td>100</td> | ||
| <td>1/298</td> | ||
| <td>+1.00</td> | ||
| <td>+0.00</td> | ||
| <td>000</td> | ||
| <td>+0.00</td> | ||
| <td>+1.00</td> | ||
| <td>+0.00</td> | ||
| <td>000</td> | ||
| <td>+0.00</td> | ||
| <td>N</td> | ||
| <td>U</td> | ||
| <td>U</td> | ||
| </tr> | ||
| <tr> | ||
| <td>100</td> | ||
| <td>1/298</td> | ||
| <td>+1.00</td> | ||
| <td>+0.00</td> | ||
| <td>000</td> | ||
| <td>+0.00</td> | ||
| <td>+1.00</td> | ||
| <td>+0.00</td> | ||
| <td>000</td> | ||
| <td>+0.00</td> | ||
| <td>N</td> | ||
| <td>U</td> | ||
| <td>U</td> | ||
| </tr> | ||
| <tr> | ||
| <td>100</td> | ||
| <td>1/298</td> | ||
| <td>+1.00</td> | ||
| <td>+0.00</td> | ||
| <td>000</td> | ||
| <td>+0.00</td> | ||
| <td>+1.00</td> | ||
| <td>+0.00</td> | ||
| <td>000</td> | ||
| <td>+0.00</td> | ||
| <td>N</td> | ||
| <td>U</td> | ||
| <td>U</td> | ||
| </tr> | ||
| </tbody> | ||
| </table> |
| @@ -1,9 +1,9 @@ | ||
| @model System.Web.Mvc.HandleErrorInfo | ||
|
|
||
| @{ | ||
| ViewBag.Title = "Error"; | ||
| } | ||
|
|
||
| <h2> | ||
| Sorry, an error occurred while processing your request. | ||
| </h2> |
| @@ -0,0 +1,19 @@ | ||
| <div class="btn-group pull-right"> | ||
| <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> | ||
| <i class="icon-question-sign"></i> Help | ||
| <span class="caret"></span> | ||
| </a> | ||
| <ul class="dropdown-menu"> | ||
| <li><a href="#">Popup Help</a></li> | ||
| <li class="divider"></li> | ||
| <li><a href="/help/how">How do I ...?</a></li> | ||
| <li class="divider"></li> | ||
| <li><a href="/help/video">Videos (internet required)</a></li> | ||
| <li class="divider"></li> | ||
| <li><a href="/help/optobasics">Optometry Basics</a></li> | ||
| <li class="divider"></li> | ||
| <li><a href="/help/workflow">Workflow</a></li> | ||
| <li class="divider"></li> | ||
| <li><a href="/help/about">About</a></li> | ||
| </ul> | ||
| </div> |
| @@ -0,0 +1,87 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
| <meta charset="utf-8"> | ||
| <title>Vision - @ViewBag.Title</title> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <meta name="description" content=""> | ||
| <meta name="author" content=""> | ||
|
|
||
| <link href="/css/bootstrap.css" rel="stylesheet"> | ||
| <style type="text/css"> | ||
| body { | ||
| padding-top: 60px; | ||
| padding-bottom: 40px; | ||
| } | ||
| .sidebar-nav { | ||
| padding: 9px 0; | ||
| } | ||
| </style> | ||
| <link href="/css/bootstrap-responsive.css" rel="stylesheet"> | ||
|
|
||
| <!--[if lt IE 9]> | ||
| <script src="/js/html5.js"></script> | ||
| <![endif]--> | ||
|
|
||
| <link rel="shortcut icon" href="/ico/favicon.ico"> | ||
| <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/ico/apple-touch-icon-144-precomposed.png"> | ||
| <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/ico/apple-touch-icon-114-precomposed.png"> | ||
| <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/ico/apple-touch-icon-72-precomposed.png"> | ||
| <link rel="apple-touch-icon-precomposed" href="/ico/apple-touch-icon-57-precomposed.png"> | ||
| </head> | ||
|
|
||
| <body> | ||
|
|
||
| <div class="navbar navbar-fixed-top"> | ||
| <div class="navbar-inner"> | ||
| <div class="container-fluid"> | ||
|
|
||
| <a class="brand" href="/">Vision</a> | ||
| @Html.Partial("_HelpDropdown") | ||
| <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> | ||
| <span class="icon-bar"></span> | ||
| <span class="icon-bar"></span> | ||
| <span class="icon-bar"></span> | ||
| </a> | ||
| <div class="nav-collapse"> | ||
| <ul class="nav"> | ||
| <li class="active">@Html.ActionLink("Home", "Home", "Pages")</li> | ||
| <li>@Html.ActionLink("Add", "Add", "Glasses")</li> | ||
| <li>@Html.ActionLink("Search", "Search", "Glasses")</li> | ||
| <li>@Html.ActionLink("Export", "Index", "Export")</li> | ||
| </ul> | ||
| </div><!--/.nav-collapse --> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="container-fluid"> | ||
| <div class="row-fluid"> | ||
|
|
||
| @RenderBody() | ||
|
|
||
| </div><!--/row--> | ||
|
|
||
| <footer> | ||
| <p>© Company 2012</p> | ||
| </footer> | ||
|
|
||
| </div><!--/.fluid-container--> | ||
|
|
||
| <script src="/js/jquery.js"></script> | ||
| <script src="/js/bootstrap-transition.js"></script> | ||
| <script src="/js/bootstrap-alert.js"></script> | ||
| <script src="/js/bootstrap-modal.js"></script> | ||
| <script src="/js/bootstrap-dropdown.js"></script> | ||
| <script src="/js/bootstrap-scrollspy.js"></script> | ||
| <script src="/js/bootstrap-tab.js"></script> | ||
| <script src="/js/bootstrap-tooltip.js"></script> | ||
| <script src="/js/bootstrap-popover.js"></script> | ||
| <script src="/js/bootstrap-button.js"></script> | ||
| <script src="/js/bootstrap-collapse.js"></script> | ||
| <script src="/js/bootstrap-carousel.js"></script> | ||
| <script src="/js/bootstrap-typeahead.js"></script> | ||
|
|
||
|
|
||
|
|
||
| </body><link rel="stylesheet" type="text/css" href="data:text/css,"></html> | ||
|
|
| @@ -1,58 +1,58 @@ | ||
| <?xml version="1.0"?> | ||
|
|
||
| <configuration> | ||
| <configSections> | ||
| <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> | ||
| <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> | ||
| <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> | ||
| </sectionGroup> | ||
| </configSections> | ||
|
|
||
| <system.web.webPages.razor> | ||
| <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | ||
| <pages pageBaseType="System.Web.Mvc.WebViewPage"> | ||
| <namespaces> | ||
| <add namespace="System.Web.Mvc" /> | ||
| <add namespace="System.Web.Mvc.Ajax" /> | ||
| <add namespace="System.Web.Mvc.Html" /> | ||
| <add namespace="System.Web.Routing" /> | ||
| </namespaces> | ||
| </pages> | ||
| </system.web.webPages.razor> | ||
|
|
||
| <appSettings> | ||
| <add key="webpages:Enabled" value="false" /> | ||
| </appSettings> | ||
|
|
||
| <system.web> | ||
| <httpHandlers> | ||
| <add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/> | ||
| </httpHandlers> | ||
|
|
||
| <!-- | ||
| Enabling request validation in view pages would cause validation to occur | ||
| after the input has already been processed by the controller. By default | ||
| MVC performs request validation before a controller processes the input. | ||
| To change this behavior apply the ValidateInputAttribute to a | ||
| controller or action. | ||
| --> | ||
| <pages | ||
| validateRequest="false" | ||
| pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" | ||
| pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" | ||
| userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> | ||
| <controls> | ||
| <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" /> | ||
| </controls> | ||
| </pages> | ||
| </system.web> | ||
|
|
||
| <system.webServer> | ||
| <validation validateIntegratedModeConfiguration="false" /> | ||
|
|
||
| <handlers> | ||
| <remove name="BlockViewHandler"/> | ||
| <add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" /> | ||
| </handlers> | ||
| </system.webServer> | ||
| </configuration> |
| @@ -1,30 +1,30 @@ | ||
| <?xml version="1.0"?> | ||
|
|
||
| <!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 --> | ||
|
|
||
| <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> | ||
| <!-- | ||
| In the example below, the "SetAttributes" transform will change the value of | ||
| "connectionString" to use "ReleaseSQLServer" only when the "Match" locator | ||
| finds an atrribute "name" that has a value of "MyDB". | ||
| <connectionStrings> | ||
| <add name="MyDB" | ||
| connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True" | ||
| xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/> | ||
| </connectionStrings> | ||
| --> | ||
| <system.web> | ||
| <!-- | ||
| In the example below, the "Replace" transform will replace the entire | ||
| <customErrors> section of your web.config file. | ||
| Note that because there is only one customErrors section under the | ||
| <system.web> node, there is no need to use the "xdt:Locator" attribute. | ||
| <customErrors defaultRedirect="GenericError.htm" | ||
| mode="RemoteOnly" xdt:Transform="Replace"> | ||
| <error statusCode="500" redirect="InternalError.htm"/> | ||
| </customErrors> | ||
| --> | ||
| </system.web> | ||
| </configuration> |
| @@ -1,31 +1,31 @@ | ||
| <?xml version="1.0"?> | ||
|
|
||
| <!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 --> | ||
|
|
||
| <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> | ||
| <!-- | ||
| In the example below, the "SetAttributes" transform will change the value of | ||
| "connectionString" to use "ReleaseSQLServer" only when the "Match" locator | ||
| finds an atrribute "name" that has a value of "MyDB". | ||
| <connectionStrings> | ||
| <add name="MyDB" | ||
| connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True" | ||
| xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/> | ||
| </connectionStrings> | ||
| --> | ||
| <system.web> | ||
| <compilation xdt:Transform="RemoveAttributes(debug)" /> | ||
| <!-- | ||
| In the example below, the "Replace" transform will replace the entire | ||
| <customErrors> section of your web.config file. | ||
| Note that because there is only one customErrors section under the | ||
| <system.web> node, there is no need to use the "xdt:Locator" attribute. | ||
| <customErrors defaultRedirect="GenericError.htm" | ||
| mode="RemoteOnly" xdt:Transform="Replace"> | ||
| <error statusCode="500" redirect="InternalError.htm"/> | ||
| </customErrors> | ||
| --> | ||
| </system.web> | ||
| </configuration> |
| @@ -0,0 +1,85 @@ | ||
| <?xml version="1.0"?> | ||
| <!-- | ||
| For more information on how to configure your ASP.NET application, please visit | ||
| http://go.microsoft.com/fwlink/?LinkId=152368 | ||
| --> | ||
|
|
||
| <configuration> | ||
| <connectionStrings> | ||
| <add name="ApplicationServices" | ||
| connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" | ||
| providerName="System.Data.SqlClient" /> | ||
| </connectionStrings> | ||
|
|
||
| <appSettings> | ||
| <add key="webpages:Version" value="1.0.0.0"/> | ||
| <add key="ClientValidationEnabled" value="true"/> | ||
| <add key="UnobtrusiveJavaScriptEnabled" value="true"/> | ||
| </appSettings> | ||
|
|
||
| <system.web> | ||
| <compilation debug="true" targetFramework="4.0"> | ||
| <assemblies> | ||
| <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | ||
| <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | ||
| <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | ||
| <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | ||
| <add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | ||
| </assemblies> | ||
| </compilation> | ||
|
|
||
| <authentication mode="Forms"> | ||
| <forms loginUrl="~/Account/LogOn" timeout="2880" /> | ||
| </authentication> | ||
|
|
||
| <membership> | ||
| <providers> | ||
| <clear/> | ||
| <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" | ||
| enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" | ||
| maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" | ||
| applicationName="/" /> | ||
| </providers> | ||
| </membership> | ||
|
|
||
| <profile> | ||
| <providers> | ||
| <clear/> | ||
| <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" /> | ||
| </providers> | ||
| </profile> | ||
|
|
||
| <roleManager enabled="false"> | ||
| <providers> | ||
| <clear/> | ||
| <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" /> | ||
| <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" /> | ||
| </providers> | ||
| </roleManager> | ||
|
|
||
| <pages> | ||
| <namespaces> | ||
| <add namespace="System.Web.Helpers" /> | ||
| <add namespace="System.Web.Mvc" /> | ||
| <add namespace="System.Web.Mvc.Ajax" /> | ||
| <add namespace="System.Web.Mvc.Html" /> | ||
| <add namespace="System.Web.Routing" /> | ||
| <add namespace="System.Web.WebPages"/> | ||
| </namespaces> | ||
| </pages> | ||
| </system.web> | ||
|
|
||
| <system.webServer> | ||
| <validation validateIntegratedModeConfiguration="false"/> | ||
| <modules runAllManagedModulesForAllRequests="true"/> | ||
| </system.webServer> | ||
|
|
||
| <runtime> | ||
| <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | ||
| <dependentAssembly> | ||
| <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> | ||
| <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" /> | ||
| </dependentAssembly> | ||
| </assemblyBinding> | ||
| </runtime> | ||
| </configuration> |
| @@ -0,0 +1,90 @@ | ||
| /* ========================================================== | ||
| * bootstrap-alert.js v2.0.3 | ||
| * http://twitter.github.com/bootstrap/javascript.html#alerts | ||
| * ========================================================== | ||
| * Copyright 2012 Twitter, Inc. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * ========================================================== */ | ||
|
|
||
|
|
||
| !function ($) { | ||
|
|
||
| "use strict"; // jshint ;_; | ||
|
|
||
|
|
||
| /* ALERT CLASS DEFINITION | ||
| * ====================== */ | ||
|
|
||
| var dismiss = '[data-dismiss="alert"]' | ||
| , Alert = function (el) { | ||
| $(el).on('click', dismiss, this.close) | ||
| } | ||
|
|
||
| Alert.prototype.close = function (e) { | ||
| var $this = $(this) | ||
| , selector = $this.attr('data-target') | ||
| , $parent | ||
|
|
||
| if (!selector) { | ||
| selector = $this.attr('href') | ||
| selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 | ||
| } | ||
|
|
||
| $parent = $(selector) | ||
|
|
||
| e && e.preventDefault() | ||
|
|
||
| $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) | ||
|
|
||
| $parent.trigger(e = $.Event('close')) | ||
|
|
||
| if (e.isDefaultPrevented()) return | ||
|
|
||
| $parent.removeClass('in') | ||
|
|
||
| function removeElement() { | ||
| $parent | ||
| .trigger('closed') | ||
| .remove() | ||
| } | ||
|
|
||
| $.support.transition && $parent.hasClass('fade') ? | ||
| $parent.on($.support.transition.end, removeElement) : | ||
| removeElement() | ||
| } | ||
|
|
||
|
|
||
| /* ALERT PLUGIN DEFINITION | ||
| * ======================= */ | ||
|
|
||
| $.fn.alert = function (option) { | ||
| return this.each(function () { | ||
| var $this = $(this) | ||
| , data = $this.data('alert') | ||
| if (!data) $this.data('alert', (data = new Alert(this))) | ||
| if (typeof option == 'string') data[option].call($this) | ||
| }) | ||
| } | ||
|
|
||
| $.fn.alert.Constructor = Alert | ||
|
|
||
|
|
||
| /* ALERT DATA-API | ||
| * ============== */ | ||
|
|
||
| $(function () { | ||
| $('body').on('click.alert.data-api', dismiss, Alert.prototype.close) | ||
| }) | ||
|
|
||
| }(window.jQuery); |
| @@ -0,0 +1,96 @@ | ||
| /* ============================================================ | ||
| * bootstrap-button.js v2.0.3 | ||
| * http://twitter.github.com/bootstrap/javascript.html#buttons | ||
| * ============================================================ | ||
| * Copyright 2012 Twitter, Inc. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * ============================================================ */ | ||
|
|
||
|
|
||
| !function ($) { | ||
|
|
||
| "use strict"; // jshint ;_; | ||
|
|
||
|
|
||
| /* BUTTON PUBLIC CLASS DEFINITION | ||
| * ============================== */ | ||
|
|
||
| var Button = function (element, options) { | ||
| this.$element = $(element) | ||
| this.options = $.extend({}, $.fn.button.defaults, options) | ||
| } | ||
|
|
||
| Button.prototype.setState = function (state) { | ||
| var d = 'disabled' | ||
| , $el = this.$element | ||
| , data = $el.data() | ||
| , val = $el.is('input') ? 'val' : 'html' | ||
|
|
||
| state = state + 'Text' | ||
| data.resetText || $el.data('resetText', $el[val]()) | ||
|
|
||
| $el[val](data[state] || this.options[state]) | ||
|
|
||
| // push to event loop to allow forms to submit | ||
| setTimeout(function () { | ||
| state == 'loadingText' ? | ||
| $el.addClass(d).attr(d, d) : | ||
| $el.removeClass(d).removeAttr(d) | ||
| }, 0) | ||
| } | ||
|
|
||
| Button.prototype.toggle = function () { | ||
| var $parent = this.$element.parent('[data-toggle="buttons-radio"]') | ||
|
|
||
| $parent && $parent | ||
| .find('.active') | ||
| .removeClass('active') | ||
|
|
||
| this.$element.toggleClass('active') | ||
| } | ||
|
|
||
|
|
||
| /* BUTTON PLUGIN DEFINITION | ||
| * ======================== */ | ||
|
|
||
| $.fn.button = function (option) { | ||
| return this.each(function () { | ||
| var $this = $(this) | ||
| , data = $this.data('button') | ||
| , options = typeof option == 'object' && option | ||
| if (!data) $this.data('button', (data = new Button(this, options))) | ||
| if (option == 'toggle') data.toggle() | ||
| else if (option) data.setState(option) | ||
| }) | ||
| } | ||
|
|
||
| $.fn.button.defaults = { | ||
| loadingText: 'loading...' | ||
| } | ||
|
|
||
| $.fn.button.Constructor = Button | ||
|
|
||
|
|
||
| /* BUTTON DATA-API | ||
| * =============== */ | ||
|
|
||
| $(function () { | ||
| $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) { | ||
| var $btn = $(e.target) | ||
| if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') | ||
| $btn.button('toggle') | ||
| }) | ||
| }) | ||
|
|
||
| }(window.jQuery); |
| @@ -0,0 +1,169 @@ | ||
| /* ========================================================== | ||
| * bootstrap-carousel.js v2.0.3 | ||
| * http://twitter.github.com/bootstrap/javascript.html#carousel | ||
| * ========================================================== | ||
| * Copyright 2012 Twitter, Inc. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * ========================================================== */ | ||
|
|
||
|
|
||
| !function ($) { | ||
|
|
||
| "use strict"; // jshint ;_; | ||
|
|
||
|
|
||
| /* CAROUSEL CLASS DEFINITION | ||
| * ========================= */ | ||
|
|
||
| var Carousel = function (element, options) { | ||
| this.$element = $(element) | ||
| this.options = options | ||
| this.options.slide && this.slide(this.options.slide) | ||
| this.options.pause == 'hover' && this.$element | ||
| .on('mouseenter', $.proxy(this.pause, this)) | ||
| .on('mouseleave', $.proxy(this.cycle, this)) | ||
| } | ||
|
|
||
| Carousel.prototype = { | ||
|
|
||
| cycle: function (e) { | ||
| if (!e) this.paused = false | ||
| this.options.interval | ||
| && !this.paused | ||
| && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) | ||
| return this | ||
| } | ||
|
|
||
| , to: function (pos) { | ||
| var $active = this.$element.find('.active') | ||
| , children = $active.parent().children() | ||
| , activePos = children.index($active) | ||
| , that = this | ||
|
|
||
| if (pos > (children.length - 1) || pos < 0) return | ||
|
|
||
| if (this.sliding) { | ||
| return this.$element.one('slid', function () { | ||
| that.to(pos) | ||
| }) | ||
| } | ||
|
|
||
| if (activePos == pos) { | ||
| return this.pause().cycle() | ||
| } | ||
|
|
||
| return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos])) | ||
| } | ||
|
|
||
| , pause: function (e) { | ||
| if (!e) this.paused = true | ||
| clearInterval(this.interval) | ||
| this.interval = null | ||
| return this | ||
| } | ||
|
|
||
| , next: function () { | ||
| if (this.sliding) return | ||
| return this.slide('next') | ||
| } | ||
|
|
||
| , prev: function () { | ||
| if (this.sliding) return | ||
| return this.slide('prev') | ||
| } | ||
|
|
||
| , slide: function (type, next) { | ||
| var $active = this.$element.find('.active') | ||
| , $next = next || $active[type]() | ||
| , isCycling = this.interval | ||
| , direction = type == 'next' ? 'left' : 'right' | ||
| , fallback = type == 'next' ? 'first' : 'last' | ||
| , that = this | ||
| , e = $.Event('slide') | ||
|
|
||
| this.sliding = true | ||
|
|
||
| isCycling && this.pause() | ||
|
|
||
| $next = $next.length ? $next : this.$element.find('.item')[fallback]() | ||
|
|
||
| if ($next.hasClass('active')) return | ||
|
|
||
| if ($.support.transition && this.$element.hasClass('slide')) { | ||
| this.$element.trigger(e) | ||
| if (e.isDefaultPrevented()) return | ||
| $next.addClass(type) | ||
| $next[0].offsetWidth // force reflow | ||
| $active.addClass(direction) | ||
| $next.addClass(direction) | ||
| this.$element.one($.support.transition.end, function () { | ||
| $next.removeClass([type, direction].join(' ')).addClass('active') | ||
| $active.removeClass(['active', direction].join(' ')) | ||
| that.sliding = false | ||
| setTimeout(function () { that.$element.trigger('slid') }, 0) | ||
| }) | ||
| } else { | ||
| this.$element.trigger(e) | ||
| if (e.isDefaultPrevented()) return | ||
| $active.removeClass('active') | ||
| $next.addClass('active') | ||
| this.sliding = false | ||
| this.$element.trigger('slid') | ||
| } | ||
|
|
||
| isCycling && this.cycle() | ||
|
|
||
| return this | ||
| } | ||
|
|
||
| } | ||
|
|
||
|
|
||
| /* CAROUSEL PLUGIN DEFINITION | ||
| * ========================== */ | ||
|
|
||
| $.fn.carousel = function (option) { | ||
| return this.each(function () { | ||
| var $this = $(this) | ||
| , data = $this.data('carousel') | ||
| , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option) | ||
| if (!data) $this.data('carousel', (data = new Carousel(this, options))) | ||
| if (typeof option == 'number') data.to(option) | ||
| else if (typeof option == 'string' || (option = options.slide)) data[option]() | ||
| else if (options.interval) data.cycle() | ||
| }) | ||
| } | ||
|
|
||
| $.fn.carousel.defaults = { | ||
| interval: 5000 | ||
| , pause: 'hover' | ||
| } | ||
|
|
||
| $.fn.carousel.Constructor = Carousel | ||
|
|
||
|
|
||
| /* CAROUSEL DATA-API | ||
| * ================= */ | ||
|
|
||
| $(function () { | ||
| $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) { | ||
| var $this = $(this), href | ||
| , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 | ||
| , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data()) | ||
| $target.carousel(options) | ||
| e.preventDefault() | ||
| }) | ||
| }) | ||
|
|
||
| }(window.jQuery); |
| @@ -0,0 +1,157 @@ | ||
| /* ============================================================= | ||
| * bootstrap-collapse.js v2.0.3 | ||
| * http://twitter.github.com/bootstrap/javascript.html#collapse | ||
| * ============================================================= | ||
| * Copyright 2012 Twitter, Inc. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * ============================================================ */ | ||
|
|
||
|
|
||
| !function ($) { | ||
|
|
||
| "use strict"; // jshint ;_; | ||
|
|
||
|
|
||
| /* COLLAPSE PUBLIC CLASS DEFINITION | ||
| * ================================ */ | ||
|
|
||
| var Collapse = function (element, options) { | ||
| this.$element = $(element) | ||
| this.options = $.extend({}, $.fn.collapse.defaults, options) | ||
|
|
||
| if (this.options.parent) { | ||
| this.$parent = $(this.options.parent) | ||
| } | ||
|
|
||
| this.options.toggle && this.toggle() | ||
| } | ||
|
|
||
| Collapse.prototype = { | ||
|
|
||
| constructor: Collapse | ||
|
|
||
| , dimension: function () { | ||
| var hasWidth = this.$element.hasClass('width') | ||
| return hasWidth ? 'width' : 'height' | ||
| } | ||
|
|
||
| , show: function () { | ||
| var dimension | ||
| , scroll | ||
| , actives | ||
| , hasData | ||
|
|
||
| if (this.transitioning) return | ||
|
|
||
| dimension = this.dimension() | ||
| scroll = $.camelCase(['scroll', dimension].join('-')) | ||
| actives = this.$parent && this.$parent.find('> .accordion-group > .in') | ||
|
|
||
| if (actives && actives.length) { | ||
| hasData = actives.data('collapse') | ||
| if (hasData && hasData.transitioning) return | ||
| actives.collapse('hide') | ||
| hasData || actives.data('collapse', null) | ||
| } | ||
|
|
||
| this.$element[dimension](0) | ||
| this.transition('addClass', $.Event('show'), 'shown') | ||
| this.$element[dimension](this.$element[0][scroll]) | ||
| } | ||
|
|
||
| , hide: function () { | ||
| var dimension | ||
| if (this.transitioning) return | ||
| dimension = this.dimension() | ||
| this.reset(this.$element[dimension]()) | ||
| this.transition('removeClass', $.Event('hide'), 'hidden') | ||
| this.$element[dimension](0) | ||
| } | ||
|
|
||
| , reset: function (size) { | ||
| var dimension = this.dimension() | ||
|
|
||
| this.$element | ||
| .removeClass('collapse') | ||
| [dimension](size || 'auto') | ||
| [0].offsetWidth | ||
|
|
||
| this.$element[size !== null ? 'addClass' : 'removeClass']('collapse') | ||
|
|
||
| return this | ||
| } | ||
|
|
||
| , transition: function (method, startEvent, completeEvent) { | ||
| var that = this | ||
| , complete = function () { | ||
| if (startEvent.type == 'show') that.reset() | ||
| that.transitioning = 0 | ||
| that.$element.trigger(completeEvent) | ||
| } | ||
|
|
||
| this.$element.trigger(startEvent) | ||
|
|
||
| if (startEvent.isDefaultPrevented()) return | ||
|
|
||
| this.transitioning = 1 | ||
|
|
||
| this.$element[method]('in') | ||
|
|
||
| $.support.transition && this.$element.hasClass('collapse') ? | ||
| this.$element.one($.support.transition.end, complete) : | ||
| complete() | ||
| } | ||
|
|
||
| , toggle: function () { | ||
| this[this.$element.hasClass('in') ? 'hide' : 'show']() | ||
| } | ||
|
|
||
| } | ||
|
|
||
|
|
||
| /* COLLAPSIBLE PLUGIN DEFINITION | ||
| * ============================== */ | ||
|
|
||
| $.fn.collapse = function (option) { | ||
| return this.each(function () { | ||
| var $this = $(this) | ||
| , data = $this.data('collapse') | ||
| , options = typeof option == 'object' && option | ||
| if (!data) $this.data('collapse', (data = new Collapse(this, options))) | ||
| if (typeof option == 'string') data[option]() | ||
| }) | ||
| } | ||
|
|
||
| $.fn.collapse.defaults = { | ||
| toggle: true | ||
| } | ||
|
|
||
| $.fn.collapse.Constructor = Collapse | ||
|
|
||
|
|
||
| /* COLLAPSIBLE DATA-API | ||
| * ==================== */ | ||
|
|
||
| $(function () { | ||
| $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) { | ||
| var $this = $(this), href | ||
| , target = $this.attr('data-target') | ||
| || e.preventDefault() | ||
| || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 | ||
| , option = $(target).data('collapse') ? 'toggle' : $this.data() | ||
| $(target).collapse(option) | ||
| }) | ||
| }) | ||
|
|
||
| }(window.jQuery); |
| @@ -0,0 +1,100 @@ | ||
| /* ============================================================ | ||
| * bootstrap-dropdown.js v2.0.3 | ||
| * http://twitter.github.com/bootstrap/javascript.html#dropdowns | ||
| * ============================================================ | ||
| * Copyright 2012 Twitter, Inc. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * ============================================================ */ | ||
|
|
||
|
|
||
| !function ($) { | ||
|
|
||
| "use strict"; // jshint ;_; | ||
|
|
||
|
|
||
| /* DROPDOWN CLASS DEFINITION | ||
| * ========================= */ | ||
|
|
||
| var toggle = '[data-toggle="dropdown"]' | ||
| , Dropdown = function (element) { | ||
| var $el = $(element).on('click.dropdown.data-api', this.toggle) | ||
| $('html').on('click.dropdown.data-api', function () { | ||
| $el.parent().removeClass('open') | ||
| }) | ||
| } | ||
|
|
||
| Dropdown.prototype = { | ||
|
|
||
| constructor: Dropdown | ||
|
|
||
| , toggle: function (e) { | ||
| var $this = $(this) | ||
| , $parent | ||
| , selector | ||
| , isActive | ||
|
|
||
| if ($this.is('.disabled, :disabled')) return | ||
|
|
||
| selector = $this.attr('data-target') | ||
|
|
||
| if (!selector) { | ||
| selector = $this.attr('href') | ||
| selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 | ||
| } | ||
|
|
||
| $parent = $(selector) | ||
| $parent.length || ($parent = $this.parent()) | ||
|
|
||
| isActive = $parent.hasClass('open') | ||
|
|
||
| clearMenus() | ||
|
|
||
| if (!isActive) $parent.toggleClass('open') | ||
|
|
||
| return false | ||
| } | ||
|
|
||
| } | ||
|
|
||
| function clearMenus() { | ||
| $(toggle).parent().removeClass('open') | ||
| } | ||
|
|
||
|
|
||
| /* DROPDOWN PLUGIN DEFINITION | ||
| * ========================== */ | ||
|
|
||
| $.fn.dropdown = function (option) { | ||
| return this.each(function () { | ||
| var $this = $(this) | ||
| , data = $this.data('dropdown') | ||
| if (!data) $this.data('dropdown', (data = new Dropdown(this))) | ||
| if (typeof option == 'string') data[option].call($this) | ||
| }) | ||
| } | ||
|
|
||
| $.fn.dropdown.Constructor = Dropdown | ||
|
|
||
|
|
||
| /* APPLY TO STANDARD DROPDOWN ELEMENTS | ||
| * =================================== */ | ||
|
|
||
| $(function () { | ||
| $('html').on('click.dropdown.data-api', clearMenus) | ||
| $('body') | ||
| .on('click.dropdown', '.dropdown form', function (e) { e.stopPropagation() }) | ||
| .on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle) | ||
| }) | ||
|
|
||
| }(window.jQuery); |
| @@ -0,0 +1,218 @@ | ||
| /* ========================================================= | ||
| * bootstrap-modal.js v2.0.3 | ||
| * http://twitter.github.com/bootstrap/javascript.html#modals | ||
| * ========================================================= | ||
| * Copyright 2012 Twitter, Inc. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * ========================================================= */ | ||
|
|
||
|
|
||
| !function ($) { | ||
|
|
||
| "use strict"; // jshint ;_; | ||
|
|
||
|
|
||
| /* MODAL CLASS DEFINITION | ||
| * ====================== */ | ||
|
|
||
| var Modal = function (content, options) { | ||
| this.options = options | ||
| this.$element = $(content) | ||
| .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) | ||
| } | ||
|
|
||
| Modal.prototype = { | ||
|
|
||
| constructor: Modal | ||
|
|
||
| , toggle: function () { | ||
| return this[!this.isShown ? 'show' : 'hide']() | ||
| } | ||
|
|
||
| , show: function () { | ||
| var that = this | ||
| , e = $.Event('show') | ||
|
|
||
| this.$element.trigger(e) | ||
|
|
||
| if (this.isShown || e.isDefaultPrevented()) return | ||
|
|
||
| $('body').addClass('modal-open') | ||
|
|
||
| this.isShown = true | ||
|
|
||
| escape.call(this) | ||
| backdrop.call(this, function () { | ||
| var transition = $.support.transition && that.$element.hasClass('fade') | ||
|
|
||
| if (!that.$element.parent().length) { | ||
| that.$element.appendTo(document.body) //don't move modals dom position | ||
| } | ||
|
|
||
| that.$element | ||
| .show() | ||
|
|
||
| if (transition) { | ||
| that.$element[0].offsetWidth // force reflow | ||
| } | ||
|
|
||
| that.$element.addClass('in') | ||
|
|
||
| transition ? | ||
| that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : | ||
| that.$element.trigger('shown') | ||
|
|
||
| }) | ||
| } | ||
|
|
||
| , hide: function (e) { | ||
| e && e.preventDefault() | ||
|
|
||
| var that = this | ||
|
|
||
| e = $.Event('hide') | ||
|
|
||
| this.$element.trigger(e) | ||
|
|
||
| if (!this.isShown || e.isDefaultPrevented()) return | ||
|
|
||
| this.isShown = false | ||
|
|
||
| $('body').removeClass('modal-open') | ||
|
|
||
| escape.call(this) | ||
|
|
||
| this.$element.removeClass('in') | ||
|
|
||
| $.support.transition && this.$element.hasClass('fade') ? | ||
| hideWithTransition.call(this) : | ||
| hideModal.call(this) | ||
| } | ||
|
|
||
| } | ||
|
|
||
|
|
||
| /* MODAL PRIVATE METHODS | ||
| * ===================== */ | ||
|
|
||
| function hideWithTransition() { | ||
| var that = this | ||
| , timeout = setTimeout(function () { | ||
| that.$element.off($.support.transition.end) | ||
| hideModal.call(that) | ||
| }, 500) | ||
|
|
||
| this.$element.one($.support.transition.end, function () { | ||
| clearTimeout(timeout) | ||
| hideModal.call(that) | ||
| }) | ||
| } | ||
|
|
||
| function hideModal(that) { | ||
| this.$element | ||
| .hide() | ||
| .trigger('hidden') | ||
|
|
||
| backdrop.call(this) | ||
| } | ||
|
|
||
| function backdrop(callback) { | ||
| var that = this | ||
| , animate = this.$element.hasClass('fade') ? 'fade' : '' | ||
|
|
||
| if (this.isShown && this.options.backdrop) { | ||
| var doAnimate = $.support.transition && animate | ||
|
|
||
| this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />') | ||
| .appendTo(document.body) | ||
|
|
||
| if (this.options.backdrop != 'static') { | ||
| this.$backdrop.click($.proxy(this.hide, this)) | ||
| } | ||
|
|
||
| if (doAnimate) this.$backdrop[0].offsetWidth // force reflow | ||
|
|
||
| this.$backdrop.addClass('in') | ||
|
|
||
| doAnimate ? | ||
| this.$backdrop.one($.support.transition.end, callback) : | ||
| callback() | ||
|
|
||
| } else if (!this.isShown && this.$backdrop) { | ||
| this.$backdrop.removeClass('in') | ||
|
|
||
| $.support.transition && this.$element.hasClass('fade')? | ||
| this.$backdrop.one($.support.transition.end, $.proxy(removeBackdrop, this)) : | ||
| removeBackdrop.call(this) | ||
|
|
||
| } else if (callback) { | ||
| callback() | ||
| } | ||
| } | ||
|
|
||
| function removeBackdrop() { | ||
| this.$backdrop.remove() | ||
| this.$backdrop = null | ||
| } | ||
|
|
||
| function escape() { | ||
| var that = this | ||
| if (this.isShown && this.options.keyboard) { | ||
| $(document).on('keyup.dismiss.modal', function ( e ) { | ||
| e.which == 27 && that.hide() | ||
| }) | ||
| } else if (!this.isShown) { | ||
| $(document).off('keyup.dismiss.modal') | ||
| } | ||
| } | ||
|
|
||
|
|
||
| /* MODAL PLUGIN DEFINITION | ||
| * ======================= */ | ||
|
|
||
| $.fn.modal = function (option) { | ||
| return this.each(function () { | ||
| var $this = $(this) | ||
| , data = $this.data('modal') | ||
| , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option) | ||
| if (!data) $this.data('modal', (data = new Modal(this, options))) | ||
| if (typeof option == 'string') data[option]() | ||
| else if (options.show) data.show() | ||
| }) | ||
| } | ||
|
|
||
| $.fn.modal.defaults = { | ||
| backdrop: true | ||
| , keyboard: true | ||
| , show: true | ||
| } | ||
|
|
||
| $.fn.modal.Constructor = Modal | ||
|
|
||
|
|
||
| /* MODAL DATA-API | ||
| * ============== */ | ||
|
|
||
| $(function () { | ||
| $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) { | ||
| var $this = $(this), href | ||
| , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 | ||
| , option = $target.data('modal') ? 'toggle' : $.extend({}, $target.data(), $this.data()) | ||
|
|
||
| e.preventDefault() | ||
| $target.modal(option) | ||
| }) | ||
| }) | ||
|
|
||
| }(window.jQuery); |
| @@ -0,0 +1,98 @@ | ||
| /* =========================================================== | ||
| * bootstrap-popover.js v2.0.3 | ||
| * http://twitter.github.com/bootstrap/javascript.html#popovers | ||
| * =========================================================== | ||
| * Copyright 2012 Twitter, Inc. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * =========================================================== */ | ||
|
|
||
|
|
||
| !function ($) { | ||
|
|
||
| "use strict"; // jshint ;_; | ||
|
|
||
|
|
||
| /* POPOVER PUBLIC CLASS DEFINITION | ||
| * =============================== */ | ||
|
|
||
| var Popover = function ( element, options ) { | ||
| this.init('popover', element, options) | ||
| } | ||
|
|
||
|
|
||
| /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js | ||
| ========================================== */ | ||
|
|
||
| Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, { | ||
|
|
||
| constructor: Popover | ||
|
|
||
| , setContent: function () { | ||
| var $tip = this.tip() | ||
| , title = this.getTitle() | ||
| , content = this.getContent() | ||
|
|
||
| $tip.find('.popover-title')[this.isHTML(title) ? 'html' : 'text'](title) | ||
| $tip.find('.popover-content > *')[this.isHTML(content) ? 'html' : 'text'](content) | ||
|
|
||
| $tip.removeClass('fade top bottom left right in') | ||
| } | ||
|
|
||
| , hasContent: function () { | ||
| return this.getTitle() || this.getContent() | ||
| } | ||
|
|
||
| , getContent: function () { | ||
| var content | ||
| , $e = this.$element | ||
| , o = this.options | ||
|
|
||
| content = $e.attr('data-content') | ||
| || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content) | ||
|
|
||
| return content | ||
| } | ||
|
|
||
| , tip: function () { | ||
| if (!this.$tip) { | ||
| this.$tip = $(this.options.template) | ||
| } | ||
| return this.$tip | ||
| } | ||
|
|
||
| }) | ||
|
|
||
|
|
||
| /* POPOVER PLUGIN DEFINITION | ||
| * ======================= */ | ||
|
|
||
| $.fn.popover = function (option) { | ||
| return this.each(function () { | ||
| var $this = $(this) | ||
| , data = $this.data('popover') | ||
| , options = typeof option == 'object' && option | ||
| if (!data) $this.data('popover', (data = new Popover(this, options))) | ||
| if (typeof option == 'string') data[option]() | ||
| }) | ||
| } | ||
|
|
||
| $.fn.popover.Constructor = Popover | ||
|
|
||
| $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, { | ||
| placement: 'right' | ||
| , content: '' | ||
| , template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>' | ||
| }) | ||
|
|
||
| }(window.jQuery); |
| @@ -0,0 +1,151 @@ | ||
| /* ============================================================= | ||
| * bootstrap-scrollspy.js v2.0.3 | ||
| * http://twitter.github.com/bootstrap/javascript.html#scrollspy | ||
| * ============================================================= | ||
| * Copyright 2012 Twitter, Inc. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * ============================================================== */ | ||
|
|
||
|
|
||
| !function ($) { | ||
|
|
||
| "use strict"; // jshint ;_; | ||
|
|
||
|
|
||
| /* SCROLLSPY CLASS DEFINITION | ||
| * ========================== */ | ||
|
|
||
| function ScrollSpy( element, options) { | ||
| var process = $.proxy(this.process, this) | ||
| , $element = $(element).is('body') ? $(window) : $(element) | ||
| , href | ||
| this.options = $.extend({}, $.fn.scrollspy.defaults, options) | ||
| this.$scrollElement = $element.on('scroll.scroll.data-api', process) | ||
| this.selector = (this.options.target | ||
| || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 | ||
| || '') + ' .nav li > a' | ||
| this.$body = $('body') | ||
| this.refresh() | ||
| this.process() | ||
| } | ||
|
|
||
| ScrollSpy.prototype = { | ||
|
|
||
| constructor: ScrollSpy | ||
|
|
||
| , refresh: function () { | ||
| var self = this | ||
| , $targets | ||
|
|
||
| this.offsets = $([]) | ||
| this.targets = $([]) | ||
|
|
||
| $targets = this.$body | ||
| .find(this.selector) | ||
| .map(function () { | ||
| var $el = $(this) | ||
| , href = $el.data('target') || $el.attr('href') | ||
| , $href = /^#\w/.test(href) && $(href) | ||
| return ( $href | ||
| && href.length | ||
| && [[ $href.position().top, href ]] ) || null | ||
| }) | ||
| .sort(function (a, b) { return a[0] - b[0] }) | ||
| .each(function () { | ||
| self.offsets.push(this[0]) | ||
| self.targets.push(this[1]) | ||
| }) | ||
| } | ||
|
|
||
| , process: function () { | ||
| var scrollTop = this.$scrollElement.scrollTop() + this.options.offset | ||
| , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight | ||
| , maxScroll = scrollHeight - this.$scrollElement.height() | ||
| , offsets = this.offsets | ||
| , targets = this.targets | ||
| , activeTarget = this.activeTarget | ||
| , i | ||
|
|
||
| if (scrollTop >= maxScroll) { | ||
| return activeTarget != (i = targets.last()[0]) | ||
| && this.activate ( i ) | ||
| } | ||
|
|
||
| for (i = offsets.length; i--;) { | ||
| activeTarget != targets[i] | ||
| && scrollTop >= offsets[i] | ||
| && (!offsets[i + 1] || scrollTop <= offsets[i + 1]) | ||
| && this.activate( targets[i] ) | ||
| } | ||
| } | ||
|
|
||
| , activate: function (target) { | ||
| var active | ||
| , selector | ||
|
|
||
| this.activeTarget = target | ||
|
|
||
| $(this.selector) | ||
| .parent('.active') | ||
| .removeClass('active') | ||
|
|
||
| selector = this.selector | ||
| + '[data-target="' + target + '"],' | ||
| + this.selector + '[href="' + target + '"]' | ||
|
|
||
| active = $(selector) | ||
| .parent('li') | ||
| .addClass('active') | ||
|
|
||
| if (active.parent('.dropdown-menu')) { | ||
| active = active.closest('li.dropdown').addClass('active') | ||
| } | ||
|
|
||
| active.trigger('activate') | ||
| } | ||
|
|
||
| } | ||
|
|
||
|
|
||
| /* SCROLLSPY PLUGIN DEFINITION | ||
| * =========================== */ | ||
|
|
||
| $.fn.scrollspy = function ( option ) { | ||
| return this.each(function () { | ||
| var $this = $(this) | ||
| , data = $this.data('scrollspy') | ||
| , options = typeof option == 'object' && option | ||
| if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options))) | ||
| if (typeof option == 'string') data[option]() | ||
| }) | ||
| } | ||
|
|
||
| $.fn.scrollspy.Constructor = ScrollSpy | ||
|
|
||
| $.fn.scrollspy.defaults = { | ||
| offset: 10 | ||
| } | ||
|
|
||
|
|
||
| /* SCROLLSPY DATA-API | ||
| * ================== */ | ||
|
|
||
| $(function () { | ||
| $('[data-spy="scroll"]').each(function () { | ||
| var $spy = $(this) | ||
| $spy.scrollspy($spy.data()) | ||
| }) | ||
| }) | ||
|
|
||
| }(window.jQuery); |
| @@ -0,0 +1,135 @@ | ||
| /* ======================================================== | ||
| * bootstrap-tab.js v2.0.3 | ||
| * http://twitter.github.com/bootstrap/javascript.html#tabs | ||
| * ======================================================== | ||
| * Copyright 2012 Twitter, Inc. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * ======================================================== */ | ||
|
|
||
|
|
||
| !function ($) { | ||
|
|
||
| "use strict"; // jshint ;_; | ||
|
|
||
|
|
||
| /* TAB CLASS DEFINITION | ||
| * ==================== */ | ||
|
|
||
| var Tab = function ( element ) { | ||
| this.element = $(element) | ||
| } | ||
|
|
||
| Tab.prototype = { | ||
|
|
||
| constructor: Tab | ||
|
|
||
| , show: function () { | ||
| var $this = this.element | ||
| , $ul = $this.closest('ul:not(.dropdown-menu)') | ||
| , selector = $this.attr('data-target') | ||
| , previous | ||
| , $target | ||
| , e | ||
|
|
||
| if (!selector) { | ||
| selector = $this.attr('href') | ||
| selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 | ||
| } | ||
|
|
||
| if ( $this.parent('li').hasClass('active') ) return | ||
|
|
||
| previous = $ul.find('.active a').last()[0] | ||
|
|
||
| e = $.Event('show', { | ||
| relatedTarget: previous | ||
| }) | ||
|
|
||
| $this.trigger(e) | ||
|
|
||
| if (e.isDefaultPrevented()) return | ||
|
|
||
| $target = $(selector) | ||
|
|
||
| this.activate($this.parent('li'), $ul) | ||
| this.activate($target, $target.parent(), function () { | ||
| $this.trigger({ | ||
| type: 'shown' | ||
| , relatedTarget: previous | ||
| }) | ||
| }) | ||
| } | ||
|
|
||
| , activate: function ( element, container, callback) { | ||
| var $active = container.find('> .active') | ||
| , transition = callback | ||
| && $.support.transition | ||
| && $active.hasClass('fade') | ||
|
|
||
| function next() { | ||
| $active | ||
| .removeClass('active') | ||
| .find('> .dropdown-menu > .active') | ||
| .removeClass('active') | ||
|
|
||
| element.addClass('active') | ||
|
|
||
| if (transition) { | ||
| element[0].offsetWidth // reflow for transition | ||
| element.addClass('in') | ||
| } else { | ||
| element.removeClass('fade') | ||
| } | ||
|
|
||
| if ( element.parent('.dropdown-menu') ) { | ||
| element.closest('li.dropdown').addClass('active') | ||
| } | ||
|
|
||
| callback && callback() | ||
| } | ||
|
|
||
| transition ? | ||
| $active.one($.support.transition.end, next) : | ||
| next() | ||
|
|
||
| $active.removeClass('in') | ||
| } | ||
| } | ||
|
|
||
|
|
||
| /* TAB PLUGIN DEFINITION | ||
| * ===================== */ | ||
|
|
||
| $.fn.tab = function ( option ) { | ||
| return this.each(function () { | ||
| var $this = $(this) | ||
| , data = $this.data('tab') | ||
| if (!data) $this.data('tab', (data = new Tab(this))) | ||
| if (typeof option == 'string') data[option]() | ||
| }) | ||
| } | ||
|
|
||
| $.fn.tab.Constructor = Tab | ||
|
|
||
|
|
||
| /* TAB DATA-API | ||
| * ============ */ | ||
|
|
||
| $(function () { | ||
| $('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) { | ||
| e.preventDefault() | ||
| $(this).tab('show') | ||
| }) | ||
| }) | ||
|
|
||
| }(window.jQuery); |