- Updated packages. - Added publish profile.tags/2.0.3
@@ -1,4 +1,5 @@ | |||
using System.Web.Mvc; | |||
using System.Web.Optimization; | |||
namespace Teknik.Areas.Contact | |||
{ | |||
@@ -28,6 +29,10 @@ namespace Teknik.Areas.Contact | |||
new { controller = "Contact", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.ContactController).Namespace } | |||
); | |||
// Register Bundles | |||
BundleTable.Bundles.Add(new ScriptBundle("~/bundles/contact").Include( | |||
"~/Areas/Contact/Scripts/Contact.js")); | |||
} | |||
} | |||
} |
@@ -4,11 +4,16 @@ using System.Linq; | |||
using System.Web; | |||
using System.Web.Mvc; | |||
using Teknik.Controllers; | |||
using Teknik.Areas.Contact.ViewModels; | |||
using Teknik.Areas.Contact.Models; | |||
using Teknik.Models; | |||
namespace Teknik.Areas.Contact.Controllers | |||
{ | |||
public class ContactController : DefaultController | |||
{ | |||
private TeknikEntities db = new TeknikEntities(); | |||
// GET: Contact/Contact | |||
[AllowAnonymous] | |||
public ActionResult Index() | |||
@@ -16,7 +21,25 @@ namespace Teknik.Areas.Contact.Controllers | |||
ViewBag.Title = Config.Title + " - Contact"; | |||
ViewBag.Message = "Contact Teknik Support"; | |||
return View(); | |||
return View(new ContactViewModel()); | |||
} | |||
[HttpPost] | |||
[AllowAnonymous] | |||
public ActionResult Submit(ContactViewModel model) | |||
{ | |||
if (ModelState.IsValid) | |||
{ | |||
if (model.Insert()) | |||
{ | |||
return Json(new { result = "true" }); | |||
} | |||
return Json(new { error = "Error submitting message." }); | |||
} | |||
else | |||
{ | |||
return View(model); | |||
} | |||
} | |||
} | |||
} |
@@ -0,0 +1,22 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Web; | |||
namespace Teknik.Areas.Contact.Models | |||
{ | |||
public class Contact | |||
{ | |||
public int ContactId { get; set; } | |||
public string Name { get; set; } | |||
public string Email { get; set; } | |||
public string Subject { get; set; } | |||
public string Message { get; set; } | |||
public DateTime DateAdded { get; set; } | |||
} | |||
} |
@@ -0,0 +1,27 @@ | |||
$(document).ready(function () { | |||
$("#contact_submit").click(function () { | |||
var form = $('#contactForm'); | |||
$.validator.unobtrusive.parse(form); | |||
if ($(form).valid()) { | |||
$.ajax({ | |||
type: "POST", | |||
url: form.attr('action'), | |||
data: form.serialize(), | |||
success: function (html) { | |||
if (html.result == 'true') { | |||
$('#contactForm').each(function(){ | |||
this.reset(); | |||
}); | |||
$("#top_msg").css('display', 'inline', 'important'); | |||
$("#top_msg").html('<div class="alert alert-success alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>Your message has been sent.</div>'); | |||
} | |||
else { | |||
$("#top_msg").css('display', 'inline', 'important'); | |||
$("#top_msg").html('<div class="alert alert-danger alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>' + html.error + '</div>'); | |||
} | |||
} | |||
}); | |||
} | |||
return false; | |||
}); | |||
}); |
@@ -0,0 +1,52 @@ | |||
using System; | |||
using System.ComponentModel.DataAnnotations; | |||
using Teknik.Areas.Contact.Models; | |||
using System.Linq; | |||
using System.Web; | |||
using Teknik.Models; | |||
namespace Teknik.Areas.Contact.ViewModels | |||
{ | |||
public class ContactViewModel | |||
{ | |||
private TeknikEntities db = new TeknikEntities(); | |||
[Required] | |||
[Display(Name = "Name")] | |||
public string Name { get; set; } | |||
[Required] | |||
[Display(Name = "Email")] | |||
[DataType(DataType.EmailAddress)] | |||
public string Email { get; set; } | |||
[Display(Name = "Subject")] | |||
public string Subject { get; set; } | |||
[Required] | |||
[Display(Name = "Message")] | |||
public string Message { get; set; } | |||
public bool Insert() | |||
{ | |||
bool success = true; | |||
try | |||
{ | |||
Models.Contact newContact = db.Contact.Create(); | |||
newContact.Name = Name; | |||
newContact.Email = Email; | |||
newContact.Subject = Subject; | |||
newContact.Message = Message; | |||
newContact.DateAdded = DateTime.Now; | |||
db.Contact.Add(newContact); | |||
db.SaveChanges(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
success = false; | |||
} | |||
return success; | |||
} | |||
} | |||
} |
@@ -1,4 +1,6 @@ | |||
@using Teknik.Models | |||
@model Teknik.Areas.Contact.ViewModels.ContactViewModel | |||
@Scripts.Render("~/bundles/contact") | |||
<div class="container"> | |||
<div class="row"> | |||
<div class="col-sm-12 col-lg-12"> | |||
@@ -12,48 +14,44 @@ | |||
<div class="row"> | |||
<div class="col-md-8"> | |||
<div class="well well-sm"> | |||
<form> | |||
<form role="form" id="contactForm" action="@Url.Action("Submit", "Contact", new { area = "Contact" })" method="post" accept-charset="UTF-8"> | |||
@Html.ValidationSummary(true, "Message send failed.") | |||
<div class="row"> | |||
<div class="col-md-6"> | |||
@if (!Request.IsAuthenticated) | |||
{ | |||
<div class="form-group"> | |||
<label for="contact_name"> | |||
@Html.ValidationMessageFor(u => u.Name) | |||
<label for="Name"> | |||
Name | |||
</label> | |||
<input type="text" class="form-control" id="contact_name" placeholder="Enter name" required="required" /> | |||
<input type="text" class="form-control" id="Name" name="Name" placeholder="Enter name" required="required" value="@((Request.IsAuthenticated) ? User.Identity.Name : string.Empty)" /> | |||
</div> | |||
<div class="form-group"> | |||
<label for="contact_email"> | |||
@Html.ValidationMessageFor(u => u.Email) | |||
<label for="Email"> | |||
Email Address | |||
</label> | |||
<div class="input-group"> | |||
<span class="input-group-addon"> | |||
<span class="glyphicon glyphicon-envelope"></span> | |||
</span> | |||
<input type="email" class="form-control" id="contact_email" placeholder="Enter email" required="required" /> | |||
<input type="email" class="form-control" id="Email" name="Email" placeholder="Enter email" required="required" value="@((Request.IsAuthenticated) ? User.Identity.Name + "@" + ViewBag.Config.Host : string.Empty)" /> | |||
</div> | |||
</div> | |||
} | |||
<div class="form-group"> | |||
<label for="contact_subject"> | |||
@Html.ValidationMessageFor(u => u.Subject) | |||
<label for="Subject"> | |||
Subject | |||
</label> | |||
<select id="contact_subject" name="contact_subject" class="form-control" required="required"> | |||
<option value="na" selected="">Choose One:</option> | |||
<option value="general">General Questions</option> | |||
<option value="suggestions">Suggestions</option> | |||
<option value="service">Service Support</option> | |||
<option value="feedback">Feedback</option> | |||
</select> | |||
<input type="text" class="form-control" id="Subject" name="Subject" placeholder="Subject" required="required" /> | |||
</div> | |||
</div> | |||
<div class="col-md-6"> | |||
<div class="form-group"> | |||
<label for="contact_message"> | |||
@Html.ValidationMessageFor(u => u.Message) | |||
<label for="Message"> | |||
Message | |||
</label> | |||
<textarea name="contact_message" id="contact_message" class="form-control" rows="9" cols="25" required="required" | |||
<textarea id="Message" name="Message" class="form-control" rows="9" cols="25" required="required" | |||
placeholder="Message"></textarea> | |||
</div> | |||
</div> |
@@ -1,14 +1,11 @@ | |||
@model Teknik.Areas.Profile.ViewModels.LoginViewModel | |||
<form role="form" id="loginForm" action="@Url.Action("Login", "Profile", new { area = "Profile" })" method="post" accept-charset="UTF-8"> | |||
@Html.ValidationSummary(true, "Login failed. Check your login details.") | |||
<div class="form-group"> | |||
<input type="text" class="form-control" id="Username" value="" placeholder="Username" name="Username" data-val-required="The Username field is required." data-val="true" /> | |||
@Html.ValidationMessageFor(u => u.Username) | |||
</div> | |||
<div class="form-group"> | |||
<input type="password" class="form-control" id="Password" value="" placeholder="Password" name="Password" data-val-required="The Password field is required." data-val="true" /> | |||
@Html.ValidationMessageFor(u => u.Password) | |||
</div> | |||
<div class="checkbox"> | |||
<label> |
@@ -0,0 +1,587 @@ | |||
/*! | |||
* Bootstrap v3.3.6 (http://getbootstrap.com) | |||
* Copyright 2011-2015 Twitter, Inc. | |||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | |||
*/ | |||
.btn-default, | |||
.btn-primary, | |||
.btn-success, | |||
.btn-info, | |||
.btn-warning, | |||
.btn-danger { | |||
text-shadow: 0 -1px 0 rgba(0, 0, 0, .2); | |||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); | |||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); | |||
} | |||
.btn-default:active, | |||
.btn-primary:active, | |||
.btn-success:active, | |||
.btn-info:active, | |||
.btn-warning:active, | |||
.btn-danger:active, | |||
.btn-default.active, | |||
.btn-primary.active, | |||
.btn-success.active, | |||
.btn-info.active, | |||
.btn-warning.active, | |||
.btn-danger.active { | |||
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); | |||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); | |||
} | |||
.btn-default.disabled, | |||
.btn-primary.disabled, | |||
.btn-success.disabled, | |||
.btn-info.disabled, | |||
.btn-warning.disabled, | |||
.btn-danger.disabled, | |||
.btn-default[disabled], | |||
.btn-primary[disabled], | |||
.btn-success[disabled], | |||
.btn-info[disabled], | |||
.btn-warning[disabled], | |||
.btn-danger[disabled], | |||
fieldset[disabled] .btn-default, | |||
fieldset[disabled] .btn-primary, | |||
fieldset[disabled] .btn-success, | |||
fieldset[disabled] .btn-info, | |||
fieldset[disabled] .btn-warning, | |||
fieldset[disabled] .btn-danger { | |||
-webkit-box-shadow: none; | |||
box-shadow: none; | |||
} | |||
.btn-default .badge, | |||
.btn-primary .badge, | |||
.btn-success .badge, | |||
.btn-info .badge, | |||
.btn-warning .badge, | |||
.btn-danger .badge { | |||
text-shadow: none; | |||
} | |||
.btn:active, | |||
.btn.active { | |||
background-image: none; | |||
} | |||
.btn-default { | |||
text-shadow: 0 1px 0 #fff; | |||
background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%); | |||
background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0)); | |||
background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0); | |||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | |||
background-repeat: repeat-x; | |||
border-color: #dbdbdb; | |||
border-color: #ccc; | |||
} | |||
.btn-default:hover, | |||
.btn-default:focus { | |||
background-color: #e0e0e0; | |||
background-position: 0 -15px; | |||
} | |||
.btn-default:active, | |||
.btn-default.active { | |||
background-color: #e0e0e0; | |||
border-color: #dbdbdb; | |||
} | |||
.btn-default.disabled, | |||
.btn-default[disabled], | |||
fieldset[disabled] .btn-default, | |||
.btn-default.disabled:hover, | |||
.btn-default[disabled]:hover, | |||
fieldset[disabled] .btn-default:hover, | |||
.btn-default.disabled:focus, | |||
.btn-default[disabled]:focus, | |||
fieldset[disabled] .btn-default:focus, | |||
.btn-default.disabled.focus, | |||
.btn-default[disabled].focus, | |||
fieldset[disabled] .btn-default.focus, | |||
.btn-default.disabled:active, | |||
.btn-default[disabled]:active, | |||
fieldset[disabled] .btn-default:active, | |||
.btn-default.disabled.active, | |||
.btn-default[disabled].active, | |||
fieldset[disabled] .btn-default.active { | |||
background-color: #e0e0e0; | |||
background-image: none; | |||
} | |||
.btn-primary { | |||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%); | |||
background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88)); | |||
background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0); | |||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | |||
background-repeat: repeat-x; | |||
border-color: #245580; | |||
} | |||
.btn-primary:hover, | |||
.btn-primary:focus { | |||
background-color: #265a88; | |||
background-position: 0 -15px; | |||
} | |||
.btn-primary:active, | |||
.btn-primary.active { | |||
background-color: #265a88; | |||
border-color: #245580; | |||
} | |||
.btn-primary.disabled, | |||
.btn-primary[disabled], | |||
fieldset[disabled] .btn-primary, | |||
.btn-primary.disabled:hover, | |||
.btn-primary[disabled]:hover, | |||
fieldset[disabled] .btn-primary:hover, | |||
.btn-primary.disabled:focus, | |||
.btn-primary[disabled]:focus, | |||
fieldset[disabled] .btn-primary:focus, | |||
.btn-primary.disabled.focus, | |||
.btn-primary[disabled].focus, | |||
fieldset[disabled] .btn-primary.focus, | |||
.btn-primary.disabled:active, | |||
.btn-primary[disabled]:active, | |||
fieldset[disabled] .btn-primary:active, | |||
.btn-primary.disabled.active, | |||
.btn-primary[disabled].active, | |||
fieldset[disabled] .btn-primary.active { | |||
background-color: #265a88; | |||
background-image: none; | |||
} | |||
.btn-success { | |||
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%); | |||
background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641)); | |||
background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0); | |||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | |||
background-repeat: repeat-x; | |||
border-color: #3e8f3e; | |||
} | |||
.btn-success:hover, | |||
.btn-success:focus { | |||
background-color: #419641; | |||
background-position: 0 -15px; | |||
} | |||
.btn-success:active, | |||
.btn-success.active { | |||
background-color: #419641; | |||
border-color: #3e8f3e; | |||
} | |||
.btn-success.disabled, | |||
.btn-success[disabled], | |||
fieldset[disabled] .btn-success, | |||
.btn-success.disabled:hover, | |||
.btn-success[disabled]:hover, | |||
fieldset[disabled] .btn-success:hover, | |||
.btn-success.disabled:focus, | |||
.btn-success[disabled]:focus, | |||
fieldset[disabled] .btn-success:focus, | |||
.btn-success.disabled.focus, | |||
.btn-success[disabled].focus, | |||
fieldset[disabled] .btn-success.focus, | |||
.btn-success.disabled:active, | |||
.btn-success[disabled]:active, | |||
fieldset[disabled] .btn-success:active, | |||
.btn-success.disabled.active, | |||
.btn-success[disabled].active, | |||
fieldset[disabled] .btn-success.active { | |||
background-color: #419641; | |||
background-image: none; | |||
} | |||
.btn-info { | |||
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); | |||
background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2)); | |||
background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0); | |||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | |||
background-repeat: repeat-x; | |||
border-color: #28a4c9; | |||
} | |||
.btn-info:hover, | |||
.btn-info:focus { | |||
background-color: #2aabd2; | |||
background-position: 0 -15px; | |||
} | |||
.btn-info:active, | |||
.btn-info.active { | |||
background-color: #2aabd2; | |||
border-color: #28a4c9; | |||
} | |||
.btn-info.disabled, | |||
.btn-info[disabled], | |||
fieldset[disabled] .btn-info, | |||
.btn-info.disabled:hover, | |||
.btn-info[disabled]:hover, | |||
fieldset[disabled] .btn-info:hover, | |||
.btn-info.disabled:focus, | |||
.btn-info[disabled]:focus, | |||
fieldset[disabled] .btn-info:focus, | |||
.btn-info.disabled.focus, | |||
.btn-info[disabled].focus, | |||
fieldset[disabled] .btn-info.focus, | |||
.btn-info.disabled:active, | |||
.btn-info[disabled]:active, | |||
fieldset[disabled] .btn-info:active, | |||
.btn-info.disabled.active, | |||
.btn-info[disabled].active, | |||
fieldset[disabled] .btn-info.active { | |||
background-color: #2aabd2; | |||
background-image: none; | |||
} | |||
.btn-warning { | |||
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); | |||
background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316)); | |||
background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0); | |||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | |||
background-repeat: repeat-x; | |||
border-color: #e38d13; | |||
} | |||
.btn-warning:hover, | |||
.btn-warning:focus { | |||
background-color: #eb9316; | |||
background-position: 0 -15px; | |||
} | |||
.btn-warning:active, | |||
.btn-warning.active { | |||
background-color: #eb9316; | |||
border-color: #e38d13; | |||
} | |||
.btn-warning.disabled, | |||
.btn-warning[disabled], | |||
fieldset[disabled] .btn-warning, | |||
.btn-warning.disabled:hover, | |||
.btn-warning[disabled]:hover, | |||
fieldset[disabled] .btn-warning:hover, | |||
.btn-warning.disabled:focus, | |||
.btn-warning[disabled]:focus, | |||
fieldset[disabled] .btn-warning:focus, | |||
.btn-warning.disabled.focus, | |||
.btn-warning[disabled].focus, | |||
fieldset[disabled] .btn-warning.focus, | |||
.btn-warning.disabled:active, | |||
.btn-warning[disabled]:active, | |||
fieldset[disabled] .btn-warning:active, | |||
.btn-warning.disabled.active, | |||
.btn-warning[disabled].active, | |||
fieldset[disabled] .btn-warning.active { | |||
background-color: #eb9316; | |||
background-image: none; | |||
} | |||
.btn-danger { | |||
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%); | |||
background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a)); | |||
background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0); | |||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | |||
background-repeat: repeat-x; | |||
border-color: #b92c28; | |||
} | |||
.btn-danger:hover, | |||
.btn-danger:focus { | |||
background-color: #c12e2a; | |||
background-position: 0 -15px; | |||
} | |||
.btn-danger:active, | |||
.btn-danger.active { | |||
background-color: #c12e2a; | |||
border-color: #b92c28; | |||
} | |||
.btn-danger.disabled, | |||
.btn-danger[disabled], | |||
fieldset[disabled] .btn-danger, | |||
.btn-danger.disabled:hover, | |||
.btn-danger[disabled]:hover, | |||
fieldset[disabled] .btn-danger:hover, | |||
.btn-danger.disabled:focus, | |||
.btn-danger[disabled]:focus, | |||
fieldset[disabled] .btn-danger:focus, | |||
.btn-danger.disabled.focus, | |||
.btn-danger[disabled].focus, | |||
fieldset[disabled] .btn-danger.focus, | |||
.btn-danger.disabled:active, | |||
.btn-danger[disabled]:active, | |||
fieldset[disabled] .btn-danger:active, | |||
.btn-danger.disabled.active, | |||
.btn-danger[disabled].active, | |||
fieldset[disabled] .btn-danger.active { | |||
background-color: #c12e2a; | |||
background-image: none; | |||
} | |||
.thumbnail, | |||
.img-thumbnail { | |||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); | |||
box-shadow: 0 1px 2px rgba(0, 0, 0, .075); | |||
} | |||
.dropdown-menu > li > a:hover, | |||
.dropdown-menu > li > a:focus { | |||
background-color: #e8e8e8; | |||
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); | |||
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); | |||
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); | |||
background-repeat: repeat-x; | |||
} | |||
.dropdown-menu > .active > a, | |||
.dropdown-menu > .active > a:hover, | |||
.dropdown-menu > .active > a:focus { | |||
background-color: #2e6da4; | |||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); | |||
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); | |||
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); | |||
background-repeat: repeat-x; | |||
} | |||
.navbar-default { | |||
background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%); | |||
background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8)); | |||
background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0); | |||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | |||
background-repeat: repeat-x; | |||
border-radius: 4px; | |||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); | |||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); | |||
} | |||
.navbar-default .navbar-nav > .open > a, | |||
.navbar-default .navbar-nav > .active > a { | |||
background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); | |||
background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2)); | |||
background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0); | |||
background-repeat: repeat-x; | |||
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); | |||
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); | |||
} | |||
.navbar-brand, | |||
.navbar-nav > li > a { | |||
text-shadow: 0 1px 0 rgba(255, 255, 255, .25); | |||
} | |||
.navbar-inverse { | |||
background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%); | |||
background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222)); | |||
background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); | |||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | |||
background-repeat: repeat-x; | |||
border-radius: 4px; | |||
} | |||
.navbar-inverse .navbar-nav > .open > a, | |||
.navbar-inverse .navbar-nav > .active > a { | |||
background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%); | |||
background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f)); | |||
background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0); | |||
background-repeat: repeat-x; | |||
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); | |||
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); | |||
} | |||
.navbar-inverse .navbar-brand, | |||
.navbar-inverse .navbar-nav > li > a { | |||
text-shadow: 0 -1px 0 rgba(0, 0, 0, .25); | |||
} | |||
.navbar-static-top, | |||
.navbar-fixed-top, | |||
.navbar-fixed-bottom { | |||
border-radius: 0; | |||
} | |||
@media (max-width: 767px) { | |||
.navbar .navbar-nav .open .dropdown-menu > .active > a, | |||
.navbar .navbar-nav .open .dropdown-menu > .active > a:hover, | |||
.navbar .navbar-nav .open .dropdown-menu > .active > a:focus { | |||
color: #fff; | |||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); | |||
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); | |||
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); | |||
background-repeat: repeat-x; | |||
} | |||
} | |||
.alert { | |||
text-shadow: 0 1px 0 rgba(255, 255, 255, .2); | |||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); | |||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); | |||
} | |||
.alert-success { | |||
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); | |||
background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc)); | |||
background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0); | |||
background-repeat: repeat-x; | |||
border-color: #b2dba1; | |||
} | |||
.alert-info { | |||
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%); | |||
background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0)); | |||
background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0); | |||
background-repeat: repeat-x; | |||
border-color: #9acfea; | |||
} | |||
.alert-warning { | |||
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); | |||
background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0)); | |||
background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0); | |||
background-repeat: repeat-x; | |||
border-color: #f5e79e; | |||
} | |||
.alert-danger { | |||
background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); | |||
background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3)); | |||
background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0); | |||
background-repeat: repeat-x; | |||
border-color: #dca7a7; | |||
} | |||
.progress { | |||
background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); | |||
background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5)); | |||
background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0); | |||
background-repeat: repeat-x; | |||
} | |||
.progress-bar { | |||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%); | |||
background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090)); | |||
background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0); | |||
background-repeat: repeat-x; | |||
} | |||
.progress-bar-success { | |||
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%); | |||
background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44)); | |||
background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0); | |||
background-repeat: repeat-x; | |||
} | |||
.progress-bar-info { | |||
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); | |||
background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5)); | |||
background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0); | |||
background-repeat: repeat-x; | |||
} | |||
.progress-bar-warning { | |||
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); | |||
background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f)); | |||
background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0); | |||
background-repeat: repeat-x; | |||
} | |||
.progress-bar-danger { | |||
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%); | |||
background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c)); | |||
background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0); | |||
background-repeat: repeat-x; | |||
} | |||
.progress-bar-striped { | |||
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); | |||
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); | |||
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); | |||
} | |||
.list-group { | |||
border-radius: 4px; | |||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); | |||
box-shadow: 0 1px 2px rgba(0, 0, 0, .075); | |||
} | |||
.list-group-item.active, | |||
.list-group-item.active:hover, | |||
.list-group-item.active:focus { | |||
text-shadow: 0 -1px 0 #286090; | |||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%); | |||
background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a)); | |||
background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0); | |||
background-repeat: repeat-x; | |||
border-color: #2b669a; | |||
} | |||
.list-group-item.active .badge, | |||
.list-group-item.active:hover .badge, | |||
.list-group-item.active:focus .badge { | |||
text-shadow: none; | |||
} | |||
.panel { | |||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05); | |||
box-shadow: 0 1px 2px rgba(0, 0, 0, .05); | |||
} | |||
.panel-default > .panel-heading { | |||
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); | |||
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); | |||
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); | |||
background-repeat: repeat-x; | |||
} | |||
.panel-primary > .panel-heading { | |||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); | |||
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); | |||
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); | |||
background-repeat: repeat-x; | |||
} | |||
.panel-success > .panel-heading { | |||
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); | |||
background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6)); | |||
background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0); | |||
background-repeat: repeat-x; | |||
} | |||
.panel-info > .panel-heading { | |||
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); | |||
background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3)); | |||
background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0); | |||
background-repeat: repeat-x; | |||
} | |||
.panel-warning > .panel-heading { | |||
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); | |||
background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc)); | |||
background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0); | |||
background-repeat: repeat-x; | |||
} | |||
.panel-danger > .panel-heading { | |||
background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%); | |||
background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc)); | |||
background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0); | |||
background-repeat: repeat-x; | |||
} | |||
.well { | |||
background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); | |||
background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); | |||
background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5)); | |||
background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%); | |||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0); | |||
background-repeat: repeat-x; | |||
border-color: #dcdcdc; | |||
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); | |||
box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); | |||
} | |||
/*# sourceMappingURL=bootstrap-theme.css.map */ |
@@ -3,6 +3,7 @@ using System.Data.Entity; | |||
using System.Data.Entity.Infrastructure; | |||
using Teknik.Areas.Blog.Models; | |||
using Teknik.Areas.Profile.Models; | |||
using Teknik.Areas.Contact.Models; | |||
using Teknik.Migrations; | |||
namespace Teknik.Models | |||
@@ -14,6 +15,7 @@ namespace Teknik.Models | |||
public DbSet<Role> Roles { get; set; } | |||
public DbSet<Blog> Blogs { get; set; } | |||
public DbSet<Post> Posts { get; set; } | |||
public DbSet<Contact> Contact { get; set; } | |||
protected override void OnModelCreating(DbModelBuilder modelBuilder) | |||
{ | |||
@@ -22,6 +24,7 @@ namespace Teknik.Models | |||
modelBuilder.Entity<Role>().ToTable("Roles"); | |||
modelBuilder.Entity<Blog>().ToTable("Blogs"); | |||
modelBuilder.Entity<Post>().ToTable("Posts"); | |||
modelBuilder.Entity<Contact>().ToTable("Contact"); | |||
base.OnModelCreating(modelBuilder); | |||
} |
@@ -1,7 +1,7 @@ | |||
/*! | |||
* Bootstrap v3.3.4 (http://getbootstrap.com) | |||
* Bootstrap v3.3.6 (http://getbootstrap.com) | |||
* Copyright 2011-2015 Twitter, Inc. | |||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | |||
* Licensed under the MIT license | |||
*/ | |||
if (typeof jQuery === 'undefined') { | |||
@@ -11,13 +11,13 @@ if (typeof jQuery === 'undefined') { | |||
+function ($) { | |||
'use strict'; | |||
var version = $.fn.jquery.split(' ')[0].split('.') | |||
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) { | |||
throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher') | |||
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 2)) { | |||
throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3') | |||
} | |||
}(jQuery); | |||
/* ======================================================================== | |||
* Bootstrap: transition.js v3.3.4 | |||
* Bootstrap: transition.js v3.3.6 | |||
* http://getbootstrap.com/javascript/#transitions | |||
* ======================================================================== | |||
* Copyright 2011-2015 Twitter, Inc. | |||
@@ -77,7 +77,7 @@ if (typeof jQuery === 'undefined') { | |||
}(jQuery); | |||
/* ======================================================================== | |||
* Bootstrap: alert.js v3.3.4 | |||
* Bootstrap: alert.js v3.3.6 | |||
* http://getbootstrap.com/javascript/#alerts | |||
* ======================================================================== | |||
* Copyright 2011-2015 Twitter, Inc. | |||
@@ -96,7 +96,7 @@ if (typeof jQuery === 'undefined') { | |||
$(el).on('click', dismiss, this.close) | |||
} | |||
Alert.VERSION = '3.3.4' | |||
Alert.VERSION = '3.3.6' | |||
Alert.TRANSITION_DURATION = 150 | |||
@@ -172,7 +172,7 @@ if (typeof jQuery === 'undefined') { | |||
}(jQuery); | |||
/* ======================================================================== | |||
* Bootstrap: button.js v3.3.4 | |||
* Bootstrap: button.js v3.3.6 | |||
* http://getbootstrap.com/javascript/#buttons | |||
* ======================================================================== | |||
* Copyright 2011-2015 Twitter, Inc. | |||
@@ -192,7 +192,7 @@ if (typeof jQuery === 'undefined') { | |||
this.isLoading = false | |||
} | |||
Button.VERSION = '3.3.4' | |||
Button.VERSION = '3.3.6' | |||
Button.DEFAULTS = { | |||
loadingText: 'loading...' | |||
@@ -204,7 +204,7 @@ if (typeof jQuery === 'undefined') { | |||
var val = $el.is('input') ? 'val' : 'html' | |||
var data = $el.data() | |||
state = state + 'Text' | |||
state += 'Text' | |||
if (data.resetText == null) $el.data('resetText', $el[val]()) | |||
@@ -229,15 +229,19 @@ if (typeof jQuery === 'undefined') { | |||
if ($parent.length) { | |||
var $input = this.$element.find('input') | |||
if ($input.prop('type') == 'radio') { | |||
if ($input.prop('checked') && this.$element.hasClass('active')) changed = false | |||
else $parent.find('.active').removeClass('active') | |||
if ($input.prop('checked')) changed = false | |||
$parent.find('.active').removeClass('active') | |||
this.$element.addClass('active') | |||
} else if ($input.prop('type') == 'checkbox') { | |||
if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false | |||
this.$element.toggleClass('active') | |||
} | |||
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change') | |||
$input.prop('checked', this.$element.hasClass('active')) | |||
if (changed) $input.trigger('change') | |||
} else { | |||
this.$element.attr('aria-pressed', !this.$element.hasClass('active')) | |||
this.$element.toggleClass('active') | |||
} | |||
if (changed) this.$element.toggleClass('active') | |||
} | |||
@@ -280,7 +284,7 @@ if (typeof jQuery === 'undefined') { | |||
var $btn = $(e.target) | |||
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') | |||
Plugin.call($btn, 'toggle') | |||
e.preventDefault() | |||
if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault() | |||
}) | |||
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { | |||
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) | |||
@@ -289,7 +293,7 @@ if (typeof jQuery === 'undefined') { | |||
}(jQuery); | |||
/* ======================================================================== | |||
* Bootstrap: carousel.js v3.3.4 | |||
* Bootstrap: carousel.js v3.3.6 | |||
* http://getbootstrap.com/javascript/#carousel | |||
* ======================================================================== | |||
* Copyright 2011-2015 Twitter, Inc. | |||
@@ -320,7 +324,7 @@ if (typeof jQuery === 'undefined') { | |||
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) | |||
} | |||
Carousel.VERSION = '3.3.4' | |||
Carousel.VERSION = '3.3.6' | |||
Carousel.TRANSITION_DURATION = 600 | |||
@@ -527,7 +531,7 @@ if (typeof jQuery === 'undefined') { | |||
}(jQuery); | |||
/* ======================================================================== | |||
* Bootstrap: collapse.js v3.3.4 | |||
* Bootstrap: collapse.js v3.3.6 | |||
* http://getbootstrap.com/javascript/#collapse | |||
* ======================================================================== | |||
* Copyright 2011-2015 Twitter, Inc. | |||
@@ -557,7 +561,7 @@ if (typeof jQuery === 'undefined') { | |||
if (this.options.toggle) this.toggle() | |||
} | |||
Collapse.VERSION = '3.3.4' | |||
Collapse.VERSION = '3.3.6' | |||
Collapse.TRANSITION_DURATION = 350 | |||
@@ -739,7 +743,7 @@ if (typeof jQuery === 'undefined') { | |||
}(jQuery); | |||
/* ======================================================================== | |||
* Bootstrap: dropdown.js v3.3.4 | |||
* Bootstrap: dropdown.js v3.3.6 | |||
* http://getbootstrap.com/javascript/#dropdowns | |||
* ======================================================================== | |||
* Copyright 2011-2015 Twitter, Inc. | |||
@@ -759,7 +763,41 @@ if (typeof jQuery === 'undefined') { | |||
$(element).on('click.bs.dropdown', this.toggle) | |||
} | |||
Dropdown.VERSION = '3.3.4' | |||
Dropdown.VERSION = '3.3.6' | |||
function getParent($this) { | |||
var selector = $this.attr('data-target') | |||
if (!selector) { | |||
selector = $this.attr('href') | |||
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 | |||
} | |||
var $parent = selector && $(selector) | |||
return $parent && $parent.length ? $parent : $this.parent() | |||
} | |||
function clearMenus(e) { | |||
if (e && e.which === 3) return | |||
$(backdrop).remove() | |||
$(toggle).each(function () { | |||
var $this = $(this) | |||
var $parent = getParent($this) | |||
var relatedTarget = { relatedTarget: this } | |||
if (!$parent.hasClass('open')) return | |||
if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return | |||
$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) | |||
if (e.isDefaultPrevented()) return | |||
$this.attr('aria-expanded', 'false') | |||
$parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget)) | |||
}) | |||
} | |||
Dropdown.prototype.toggle = function (e) { | |||
var $this = $(this) | |||
@@ -774,7 +812,10 @@ if (typeof jQuery === 'undefined') { | |||
if (!isActive) { | |||
if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { | |||
// if mobile we use a backdrop because click events don't delegate | |||
$('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus) | |||
$(document.createElement('div')) | |||
.addClass('dropdown-backdrop') | |||
.insertAfter($(this)) | |||
.on('click', clearMenus) | |||
} | |||
var relatedTarget = { relatedTarget: this } | |||
@@ -788,7 +829,7 @@ if (typeof jQuery === 'undefined') { | |||
$parent | |||
.toggleClass('open') | |||
.trigger('shown.bs.dropdown', relatedTarget) | |||
.trigger($.Event('shown.bs.dropdown', relatedTarget)) | |||
} | |||
return false | |||
@@ -807,57 +848,25 @@ if (typeof jQuery === 'undefined') { | |||
var $parent = getParent($this) | |||
var isActive = $parent.hasClass('open') | |||
if ((!isActive && e.which != 27) || (isActive && e.which == 27)) { | |||
if (!isActive && e.which != 27 || isActive && e.which == 27) { | |||
if (e.which == 27) $parent.find(toggle).trigger('focus') | |||
return $this.trigger('click') | |||
} | |||
var desc = ' li:not(.disabled):visible a' | |||
var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc) | |||
var $items = $parent.find('.dropdown-menu' + desc) | |||
if (!$items.length) return | |||
var index = $items.index(e.target) | |||
if (e.which == 38 && index > 0) index-- // up | |||
if (e.which == 40 && index < $items.length - 1) index++ // down | |||
if (!~index) index = 0 | |||
if (e.which == 38 && index > 0) index-- // up | |||
if (e.which == 40 && index < $items.length - 1) index++ // down | |||
if (!~index) index = 0 | |||
$items.eq(index).trigger('focus') | |||
} | |||
function clearMenus(e) { | |||
if (e && e.which === 3) return | |||
$(backdrop).remove() | |||
$(toggle).each(function () { | |||
var $this = $(this) | |||
var $parent = getParent($this) | |||
var relatedTarget = { relatedTarget: this } | |||
if (!$parent.hasClass('open')) return | |||
$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) | |||
if (e.isDefaultPrevented()) return | |||
$this.attr('aria-expanded', 'false') | |||
$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget) | |||
}) | |||
} | |||
function getParent($this) { | |||
var selector = $this.attr('data-target') | |||
if (!selector) { | |||
selector = $this.attr('href') | |||
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 | |||
} | |||
var $parent = selector && $(selector) | |||
return $parent && $parent.length ? $parent : $this.parent() | |||
} | |||
// DROPDOWN PLUGIN DEFINITION | |||
// ========================== | |||
@@ -895,13 +904,12 @@ if (typeof jQuery === 'undefined') { | |||
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) | |||
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) | |||
.on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown) | |||
.on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown) | |||
.on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown) | |||
.on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown) | |||
}(jQuery); | |||
/* ======================================================================== | |||
* Bootstrap: modal.js v3.3.4 | |||
* Bootstrap: modal.js v3.3.6 | |||
* http://getbootstrap.com/javascript/#modals | |||
* ======================================================================== | |||
* Copyright 2011-2015 Twitter, Inc. | |||
@@ -935,7 +943,7 @@ if (typeof jQuery === 'undefined') { | |||
} | |||
} | |||
Modal.VERSION = '3.3.4' | |||
Modal.VERSION = '3.3.6' | |||
Modal.TRANSITION_DURATION = 300 | |||
Modal.BACKDROP_TRANSITION_DURATION = 150 | |||
@@ -992,9 +1000,7 @@ if (typeof jQuery === 'undefined') { | |||
that.$element[0].offsetWidth // force reflow | |||
} | |||
that.$element | |||
.addClass('in') | |||
.attr('aria-hidden', false) | |||
that.$element.addClass('in') | |||
that.enforceFocus() | |||
@@ -1028,7 +1034,6 @@ if (typeof jQuery === 'undefined') { | |||
this.$element | |||
.removeClass('in') | |||
.attr('aria-hidden', true) | |||
.off('click.dismiss.bs.modal') | |||
.off('mouseup.dismiss.bs.modal') | |||
@@ -1092,7 +1097,8 @@ if (typeof jQuery === 'undefined') { | |||
if (this.isShown && this.options.backdrop) { | |||
var doAnimate = $.support.transition && animate | |||
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />') | |||
this.$backdrop = $(document.createElement('div')) | |||
.addClass('modal-backdrop ' + animate) | |||
.appendTo(this.$body) | |||
this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) { | |||
@@ -1241,7 +1247,7 @@ if (typeof jQuery === 'undefined') { | |||
}(jQuery); | |||
/* ======================================================================== | |||
* Bootstrap: tooltip.js v3.3.4 | |||
* Bootstrap: tooltip.js v3.3.6 | |||
* http://getbootstrap.com/javascript/#tooltip | |||
* Inspired by the original jQuery.tipsy by Jason Frame | |||
* ======================================================================== | |||
@@ -1263,11 +1269,12 @@ if (typeof jQuery === 'undefined') { | |||
this.timeout = null | |||
this.hoverState = null | |||
this.$element = null | |||
this.inState = null | |||
this.init('tooltip', element, options) | |||
} | |||
Tooltip.VERSION = '3.3.4' | |||
Tooltip.VERSION = '3.3.6' | |||
Tooltip.TRANSITION_DURATION = 150 | |||
@@ -1292,7 +1299,8 @@ if (typeof jQuery === 'undefined') { | |||
this.type = type | |||
this.$element = $(element) | |||
this.options = this.getOptions(options) | |||
this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport) | |||
this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport)) | |||
this.inState = { click: false, hover: false, focus: false } | |||
if (this.$element[0] instanceof document.constructor && !this.options.selector) { | |||
throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!') | |||
@@ -1351,16 +1359,20 @@ if (typeof jQuery === 'undefined') { | |||
var self = obj instanceof this.constructor ? | |||
obj : $(obj.currentTarget).data('bs.' + this.type) | |||
if (self && self.$tip && self.$tip.is(':visible')) { | |||
self.hoverState = 'in' | |||
return | |||
} | |||
if (!self) { | |||
self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) | |||
$(obj.currentTarget).data('bs.' + this.type, self) | |||
} | |||
if (obj instanceof $.Event) { | |||
self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true | |||
} | |||
if (self.tip().hasClass('in') || self.hoverState == 'in') { | |||
self.hoverState = 'in' | |||
return | |||
} | |||
clearTimeout(self.timeout) | |||
self.hoverState = 'in' | |||
@@ -1372,6 +1384,14 @@ if (typeof jQuery === 'undefined') { | |||
}, self.options.delay.show) | |||
} | |||
Tooltip.prototype.isInStateTrue = function () { | |||
for (var key in this.inState) { | |||
if (this.inState[key]) return true | |||
} | |||
return false | |||
} | |||
Tooltip.prototype.leave = function (obj) { | |||
var self = obj instanceof this.constructor ? | |||
obj : $(obj.currentTarget).data('bs.' + this.type) | |||
@@ -1381,6 +1401,12 @@ if (typeof jQuery === 'undefined') { | |||
$(obj.currentTarget).data('bs.' + this.type, self) | |||
} | |||
if (obj instanceof $.Event) { | |||
self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false | |||
} | |||
if (self.isInStateTrue()) return | |||
clearTimeout(self.timeout) | |||
self.hoverState = 'out' | |||
@@ -1427,6 +1453,7 @@ if (typeof jQuery === 'undefined') { | |||
.data('bs.' + this.type, this) | |||
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) | |||
this.$element.trigger('inserted.bs.' + this.type) | |||
var pos = this.getPosition() | |||
var actualWidth = $tip[0].offsetWidth | |||
@@ -1434,13 +1461,12 @@ if (typeof jQuery === 'undefined') { | |||
if (autoPlace) { | |||
var orgPlacement = placement | |||
var $container = this.options.container ? $(this.options.container) : this.$element.parent() | |||
var containerDim = this.getPosition($container) | |||
var viewportDim = this.getPosition(this.$viewport) | |||
placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' : | |||
placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' : | |||
placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' : | |||
placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' : | |||
placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' : | |||
placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' : | |||
placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' : | |||
placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' : | |||
placement | |||
$tip | |||
@@ -1481,8 +1507,8 @@ if (typeof jQuery === 'undefined') { | |||
if (isNaN(marginTop)) marginTop = 0 | |||
if (isNaN(marginLeft)) marginLeft = 0 | |||
offset.top = offset.top + marginTop | |||
offset.left = offset.left + marginLeft | |||
offset.top += marginTop | |||
offset.left += marginLeft | |||
// $.fn.offset doesn't round pixel values | |||
// so we use setOffset directly with our own function B-0 | |||
@@ -1564,7 +1590,7 @@ if (typeof jQuery === 'undefined') { | |||
Tooltip.prototype.fixTitle = function () { | |||
var $e = this.$element | |||
if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') { | |||
if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') { | |||
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '') | |||
} | |||
} | |||
@@ -1619,7 +1645,7 @@ if (typeof jQuery === 'undefined') { | |||
var rightEdgeOffset = pos.left + viewportPadding + actualWidth | |||
if (leftEdgeOffset < viewportDimensions.left) { // left overflow | |||
delta.left = viewportDimensions.left - leftEdgeOffset | |||
} else if (rightEdgeOffset > viewportDimensions.width) { // right overflow | |||
} else if (rightEdgeOffset > viewportDimensions.right) { // right overflow | |||
delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset | |||
} | |||
} | |||
@@ -1645,7 +1671,13 @@ if (typeof jQuery === 'undefined') { | |||
} | |||
Tooltip.prototype.tip = function () { | |||
return (this.$tip = this.$tip || $(this.options.template)) | |||
if (!this.$tip) { | |||
this.$tip = $(this.options.template) | |||
if (this.$tip.length != 1) { | |||
throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!') | |||
} | |||
} | |||
return this.$tip | |||
} | |||
Tooltip.prototype.arrow = function () { | |||
@@ -1674,7 +1706,13 @@ if (typeof jQuery === 'undefined') { | |||
} | |||
} | |||
self.tip().hasClass('in') ? self.leave(self) : self.enter(self) | |||
if (e) { | |||
self.inState.click = !self.inState.click | |||
if (self.isInStateTrue()) self.enter(self) | |||
else self.leave(self) | |||
} else { | |||
self.tip().hasClass('in') ? self.leave(self) : self.enter(self) | |||
} | |||
} | |||
Tooltip.prototype.destroy = function () { | |||
@@ -1682,6 +1720,12 @@ if (typeof jQuery === 'undefined') { | |||
clearTimeout(this.timeout) | |||
this.hide(function () { | |||
that.$element.off('.' + that.type).removeData('bs.' + that.type) | |||
if (that.$tip) { | |||
that.$tip.detach() | |||
} | |||
that.$tip = null | |||
that.$arrow = null | |||
that.$viewport = null | |||
}) | |||
} | |||
@@ -1718,7 +1762,7 @@ if (typeof jQuery === 'undefined') { | |||
}(jQuery); | |||
/* ======================================================================== | |||
* Bootstrap: popover.js v3.3.4 | |||
* Bootstrap: popover.js v3.3.6 | |||
* http://getbootstrap.com/javascript/#popovers | |||
* ======================================================================== | |||
* Copyright 2011-2015 Twitter, Inc. | |||
@@ -1738,7 +1782,7 @@ if (typeof jQuery === 'undefined') { | |||
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') | |||
Popover.VERSION = '3.3.4' | |||
Popover.VERSION = '3.3.6' | |||
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { | |||
placement: 'right', | |||
@@ -1827,7 +1871,7 @@ if (typeof jQuery === 'undefined') { | |||
}(jQuery); | |||
/* ======================================================================== | |||
* Bootstrap: scrollspy.js v3.3.4 | |||
* Bootstrap: scrollspy.js v3.3.6 | |||
* http://getbootstrap.com/javascript/#scrollspy | |||
* ======================================================================== | |||
* Copyright 2011-2015 Twitter, Inc. | |||
@@ -1856,7 +1900,7 @@ if (typeof jQuery === 'undefined') { | |||
this.process() | |||
} | |||
ScrollSpy.VERSION = '3.3.4' | |||
ScrollSpy.VERSION = '3.3.6' | |||
ScrollSpy.DEFAULTS = { | |||
offset: 10 | |||
@@ -2000,7 +2044,7 @@ if (typeof jQuery === 'undefined') { | |||
}(jQuery); | |||
/* ======================================================================== | |||
* Bootstrap: tab.js v3.3.4 | |||
* Bootstrap: tab.js v3.3.6 | |||
* http://getbootstrap.com/javascript/#tabs | |||
* ======================================================================== | |||
* Copyright 2011-2015 Twitter, Inc. | |||
@@ -2015,10 +2059,12 @@ if (typeof jQuery === 'undefined') { | |||
// ==================== | |||
var Tab = function (element) { | |||
// jscs:disable requireDollarBeforejQueryAssignment | |||
this.element = $(element) | |||
// jscs:enable requireDollarBeforejQueryAssignment | |||
} | |||
Tab.VERSION = '3.3.4' | |||
Tab.VERSION = '3.3.6' | |||
Tab.TRANSITION_DURATION = 150 | |||
@@ -2066,7 +2112,7 @@ if (typeof jQuery === 'undefined') { | |||
var $active = container.find('> .active') | |||
var transition = callback | |||
&& $.support.transition | |||
&& (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length) | |||
&& ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length) | |||
function next() { | |||
$active | |||
@@ -2154,7 +2200,7 @@ if (typeof jQuery === 'undefined') { | |||
}(jQuery); | |||
/* ======================================================================== | |||
* Bootstrap: affix.js v3.3.4 | |||
* Bootstrap: affix.js v3.3.6 | |||
* http://getbootstrap.com/javascript/#affix | |||
* ======================================================================== | |||
* Copyright 2011-2015 Twitter, Inc. | |||
@@ -2183,7 +2229,7 @@ if (typeof jQuery === 'undefined') { | |||
this.checkPosition() | |||
} | |||
Affix.VERSION = '3.3.4' | |||
Affix.VERSION = '3.3.6' | |||
Affix.RESET = 'affix affix-top affix-bottom' | |||
@@ -2233,7 +2279,7 @@ if (typeof jQuery === 'undefined') { | |||
var offset = this.options.offset | |||
var offsetTop = offset.top | |||
var offsetBottom = offset.bottom | |||
var scrollHeight = $(document.body).height() | |||
var scrollHeight = Math.max($(document).height(), $(document.body).height()) | |||
if (typeof offset != 'object') offsetBottom = offsetTop = offset | |||
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) |
@@ -1,24 +1,10 @@ | |||
/* NUGET: BEGIN LICENSE TEXT | |||
* | |||
* Microsoft grants you the right to use these script files for the sole | |||
* purpose of either: (i) interacting through your browser with the Microsoft | |||
* website or online service, subject to the applicable licensing or use | |||
* terms; or (ii) using the files as included with a Microsoft product subject | |||
* to that product's license terms. Microsoft reserves all other rights to the | |||
* files not expressly granted by Microsoft, whether by implication, estoppel | |||
* or otherwise. Insofar as a script file is dual licensed under GPL, | |||
* Microsoft neither took the code under GPL nor distributes it thereunder but | |||
* under the terms set out in this paragraph. All notices and licenses | |||
* below are for informational purposes only. | |||
* | |||
* NUGET: END LICENSE TEXT */ | |||
/* | |||
/* | |||
* This file has been commented to support Visual Studio Intellisense. | |||
* You should not use this file at runtime inside the browser--it is only | |||
* intended to be used only for design-time IntelliSense. Please use the | |||
* standard jQuery library for all production use. | |||
* | |||
* Comment version: 1.11.1 | |||
* Comment version: 1.14.0 | |||
*/ | |||
/* | |||
@@ -29,7 +15,7 @@ | |||
* for informational purposes only and are not the license terms under | |||
* which Microsoft distributed this file. | |||
* | |||
* jQuery Validation Plugin - v1.11.1 - 2/4/2013 | |||
* jQuery Validation Plugin - v1.14.0 - 2/4/2013 | |||
* https://github.com/jzaefferer/jquery-validation | |||
* Copyright (c) 2013 Jörn Zaefferer; Licensed MIT | |||
* |
@@ -1,28 +1,5 @@ | |||
/* NUGET: BEGIN LICENSE TEXT | |||
* | |||
* Microsoft grants you the right to use these script files for the sole | |||
* purpose of either: (i) interacting through your browser with the Microsoft | |||
* website or online service, subject to the applicable licensing or use | |||
* terms; or (ii) using the files as included with a Microsoft product subject | |||
* to that product's license terms. Microsoft reserves all other rights to the | |||
* files not expressly granted by Microsoft, whether by implication, estoppel | |||
* or otherwise. Insofar as a script file is dual licensed under GPL, | |||
* Microsoft neither took the code under GPL nor distributes it thereunder but | |||
* under the terms set out in this paragraph. All notices and licenses | |||
* below are for informational purposes only. | |||
* | |||
* Copyright (c) Faruk Ates, Paul Irish, Alex Sexton; http://www.modernizr.com/license/ | |||
* | |||
* Includes matchMedia polyfill; Copyright (c) 2010 Filament Group, Inc; http://opensource.org/licenses/MIT | |||
* | |||
* 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 | |||
* | |||
* Includes material from css-support; Copyright (c) 2005-2012 Diego Perini; https://github.com/dperini/css-support/blob/master/LICENSE | |||
* | |||
* NUGET: END LICENSE TEXT */ | |||
/*! | |||
* Modernizr v2.6.2 | |||
* Modernizr v2.8.3 | |||
* www.modernizr.com | |||
* | |||
* Copyright (c) Faruk Ates, Paul Irish, Alex Sexton | |||
@@ -47,7 +24,7 @@ | |||
window.Modernizr = (function( window, document, undefined ) { | |||
var version = '2.6.2', | |||
var version = '2.8.3', | |||
Modernizr = {}, | |||
@@ -179,7 +156,7 @@ window.Modernizr = (function( window, document, undefined ) { | |||
var matchMedia = window.matchMedia || window.msMatchMedia; | |||
if ( matchMedia ) { | |||
return matchMedia(mq).matches; | |||
return matchMedia(mq) && matchMedia(mq).matches || false; | |||
} | |||
var bool; | |||
@@ -628,7 +605,7 @@ window.Modernizr = (function( window, document, undefined ) { | |||
// Note, Android < 4 will pass this test, but can only animate | |||
// a single property at a time | |||
// daneden.me/2011/12/putting-up-with-androids-bullshit/ | |||
// goo.gl/v3V4Gp | |||
tests['cssanimations'] = function() { | |||
return testPropsAll('animationName'); | |||
}; | |||
@@ -1027,35 +1004,40 @@ window.Modernizr = (function( window, document, undefined ) { | |||
modElem = inputElem = null; | |||
/*>>shiv*/ | |||
/*! HTML5 Shiv v3.6.1 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed */ | |||
/** | |||
* @preserve HTML5 Shiv prev3.7.1 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed | |||
*/ | |||
;(function(window, document) { | |||
/*jshint evil:true */ | |||
/** Preset options */ | |||
var options = window.html5 || {}; | |||
/*jshint evil:true */ | |||
/** version */ | |||
var version = '3.7.0'; | |||
/** Used to skip problem elements */ | |||
var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i; | |||
/** Preset options */ | |||
var options = window.html5 || {}; | |||
/** Not all elements can be cloned in IE **/ | |||
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; | |||
/** Used to skip problem elements */ | |||
var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i; | |||
/** Detect whether the browser supports default html5 styles */ | |||
var supportsHtml5Styles; | |||
/** Not all elements can be cloned in IE **/ | |||
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; | |||
/** Name of the expando, to work with multiple documents or to re-shiv one document */ | |||
var expando = '_html5shiv'; | |||
/** Detect whether the browser supports default html5 styles */ | |||
var supportsHtml5Styles; | |||
/** The id for the the documents expando */ | |||
var expanID = 0; | |||
/** Name of the expando, to work with multiple documents or to re-shiv one document */ | |||
var expando = '_html5shiv'; | |||
/** Cached data for each document */ | |||
var expandoData = {}; | |||
/** The id for the the documents expando */ | |||
var expanID = 0; | |||
/** Detect whether the browser supports unknown elements */ | |||
var supportsUnknownElements; | |||
/** Cached data for each document */ | |||
var expandoData = {}; | |||
(function() { | |||
try { | |||
/** Detect whether the browser supports unknown elements */ | |||
var supportsUnknownElements; | |||
(function() { | |||
try { | |||
var a = document.createElement('a'); | |||
a.innerHTML = '<xyz></xyz>'; | |||
//if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles | |||
@@ -1071,248 +1053,256 @@ window.Modernizr = (function( window, document, undefined ) { | |||
typeof frag.createElement == 'undefined' | |||
); | |||
}()); | |||
} catch(e) { | |||
supportsHtml5Styles = true; | |||
supportsUnknownElements = true; | |||
} | |||
} catch(e) { | |||
// assign a false positive if detection fails => unable to shiv | |||
supportsHtml5Styles = true; | |||
supportsUnknownElements = true; | |||
} | |||
}()); | |||
}()); | |||
/*--------------------------------------------------------------------------*/ | |||
/*--------------------------------------------------------------------------*/ | |||
/** | |||
* Creates a style sheet with the given CSS text and adds it to the document. | |||
* @private | |||
* @param {Document} ownerDocument The document. | |||
* @param {String} cssText The CSS text. | |||
* @returns {StyleSheet} The style element. | |||
*/ | |||
function addStyleSheet(ownerDocument, cssText) { | |||
var p = ownerDocument.createElement('p'), | |||
parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement; | |||
/** | |||
* Creates a style sheet with the given CSS text and adds it to the document. | |||
* @private | |||
* @param {Document} ownerDocument The document. | |||
* @param {String} cssText The CSS text. | |||
* @returns {StyleSheet} The style element. | |||
*/ | |||
function addStyleSheet(ownerDocument, cssText) { | |||
var p = ownerDocument.createElement('p'), | |||
parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement; | |||
p.innerHTML = 'x<style>' + cssText + '</style>'; | |||
return parent.insertBefore(p.lastChild, parent.firstChild); | |||
} | |||
p.innerHTML = 'x<style>' + cssText + '</style>'; | |||
return parent.insertBefore(p.lastChild, parent.firstChild); | |||
} | |||
/** | |||
* Returns the value of `html5.elements` as an array. | |||
* @private | |||
* @returns {Array} An array of shived element node names. | |||
*/ | |||
function getElements() { | |||
var elements = html5.elements; | |||
return typeof elements == 'string' ? elements.split(' ') : elements; | |||
} | |||
/** | |||
* Returns the value of `html5.elements` as an array. | |||
* @private | |||
* @returns {Array} An array of shived element node names. | |||
*/ | |||
function getElements() { | |||
var elements = html5.elements; | |||
return typeof elements == 'string' ? elements.split(' ') : elements; | |||
} | |||
/** | |||
* Returns the data associated to the given document | |||
* @private | |||
* @param {Document} ownerDocument The document. | |||
* @returns {Object} An object of data. | |||
*/ | |||
function getExpandoData(ownerDocument) { | |||
var data = expandoData[ownerDocument[expando]]; | |||
if (!data) { | |||
* Returns the data associated to the given document | |||
* @private | |||
* @param {Document} ownerDocument The document. | |||
* @returns {Object} An object of data. | |||
*/ | |||
function getExpandoData(ownerDocument) { | |||
var data = expandoData[ownerDocument[expando]]; | |||
if (!data) { | |||
data = {}; | |||
expanID++; | |||
ownerDocument[expando] = expanID; | |||
expandoData[expanID] = data; | |||
} | |||
return data; | |||
} | |||
return data; | |||
} | |||
/** | |||
* returns a shived element for the given nodeName and document | |||
* @memberOf html5 | |||
* @param {String} nodeName name of the element | |||
* @param {Document} ownerDocument The context document. | |||
* @returns {Object} The shived element. | |||
*/ | |||
function createElement(nodeName, ownerDocument, data){ | |||
if (!ownerDocument) { | |||
/** | |||
* returns a shived element for the given nodeName and document | |||
* @memberOf html5 | |||
* @param {String} nodeName name of the element | |||
* @param {Document} ownerDocument The context document. | |||
* @returns {Object} The shived element. | |||
*/ | |||
function createElement(nodeName, ownerDocument, data){ | |||
if (!ownerDocument) { | |||
ownerDocument = document; | |||
} | |||
if(supportsUnknownElements){ | |||
} | |||
if(supportsUnknownElements){ | |||
return ownerDocument.createElement(nodeName); | |||
} | |||
if (!data) { | |||
} | |||
if (!data) { | |||
data = getExpandoData(ownerDocument); | |||
} | |||
var node; | |||
} | |||
var node; | |||
if (data.cache[nodeName]) { | |||
if (data.cache[nodeName]) { | |||
node = data.cache[nodeName].cloneNode(); | |||
} else if (saveClones.test(nodeName)) { | |||
} else if (saveClones.test(nodeName)) { | |||
node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode(); | |||
} else { | |||
} else { | |||
node = data.createElem(nodeName); | |||
} | |||
} | |||
// Avoid adding some elements to fragments in IE < 9 because | |||
// * Attributes like `name` or `type` cannot be set/changed once an element | |||
// is inserted into a document/fragment | |||
// * Link elements with `src` attributes that are inaccessible, as with | |||
// a 403 response, will cause the tab/window to crash | |||
// * Script elements appended to fragments will execute when their `src` | |||
// or `text` property is set | |||
return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node; | |||
} | |||
// Avoid adding some elements to fragments in IE < 9 because | |||
// * Attributes like `name` or `type` cannot be set/changed once an element | |||
// is inserted into a document/fragment | |||
// * Link elements with `src` attributes that are inaccessible, as with | |||
// a 403 response, will cause the tab/window to crash | |||
// * Script elements appended to fragments will execute when their `src` | |||
// or `text` property is set | |||
return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node; | |||
} | |||
/** | |||
* returns a shived DocumentFragment for the given document | |||
* @memberOf html5 | |||
* @param {Document} ownerDocument The context document. | |||
* @returns {Object} The shived DocumentFragment. | |||
*/ | |||
function createDocumentFragment(ownerDocument, data){ | |||
if (!ownerDocument) { | |||
/** | |||
* returns a shived DocumentFragment for the given document | |||
* @memberOf html5 | |||
* @param {Document} ownerDocument The context document. | |||
* @returns {Object} The shived DocumentFragment. | |||
*/ | |||
function createDocumentFragment(ownerDocument, data){ | |||
if (!ownerDocument) { | |||
ownerDocument = document; | |||
} | |||
if(supportsUnknownElements){ | |||
} | |||
if(supportsUnknownElements){ | |||
return ownerDocument.createDocumentFragment(); | |||
} | |||
data = data || getExpandoData(ownerDocument); | |||
var clone = data.frag.cloneNode(), | |||
i = 0, | |||
elems = getElements(), | |||
l = elems.length; | |||
for(;i<l;i++){ | |||
} | |||
data = data || getExpandoData(ownerDocument); | |||
var clone = data.frag.cloneNode(), | |||
i = 0, | |||
elems = getElements(), | |||
l = elems.length; | |||
for(;i<l;i++){ | |||
clone.createElement(elems[i]); | |||
} | |||
return clone; | |||
} | |||
return clone; | |||
} | |||
/** | |||
* Shivs the `createElement` and `createDocumentFragment` methods of the document. | |||
* @private | |||
* @param {Document|DocumentFragment} ownerDocument The document. | |||
* @param {Object} data of the document. | |||
*/ | |||
function shivMethods(ownerDocument, data) { | |||
if (!data.cache) { | |||
/** | |||
* Shivs the `createElement` and `createDocumentFragment` methods of the document. | |||
* @private | |||
* @param {Document|DocumentFragment} ownerDocument The document. | |||
* @param {Object} data of the document. | |||
*/ | |||
function shivMethods(ownerDocument, data) { | |||
if (!data.cache) { | |||
data.cache = {}; | |||
data.createElem = ownerDocument.createElement; | |||
data.createFrag = ownerDocument.createDocumentFragment; | |||
data.frag = data.createFrag(); | |||
} | |||
ownerDocument.createElement = function(nodeName) { | |||
//abort shiv | |||
if (!html5.shivMethods) { | |||
return data.createElem(nodeName); | |||
} | |||
return createElement(nodeName, ownerDocument, data); | |||
}; | |||
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' + | |||
'var n=f.cloneNode(),c=n.createElement;' + | |||
'h.shivMethods&&(' + | |||
// unroll the `createElement` calls | |||
getElements().join().replace(/\w+/g, function(nodeName) { | |||
data.createElem(nodeName); | |||
data.frag.createElement(nodeName); | |||
return 'c("' + nodeName + '")'; | |||
}) + | |||
');return n}' | |||
)(html5, data.frag); | |||
} | |||
/*--------------------------------------------------------------------------*/ | |||
/** | |||
* Shivs the given document. | |||
* @memberOf html5 | |||
* @param {Document} ownerDocument The document to shiv. | |||
* @returns {Document} The shived document. | |||
*/ | |||
function shivDocument(ownerDocument) { | |||
if (!ownerDocument) { | |||
ownerDocument = document; | |||
} | |||
var data = getExpandoData(ownerDocument); | |||
if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) { | |||
data.hasCSS = !!addStyleSheet(ownerDocument, | |||
// corrects block display not defined in IE6/7/8/9 | |||
'article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}' + | |||
// adds styling not present in IE6/7/8/9 | |||
'mark{background:#FF0;color:#000}' | |||
); | |||
} | |||
if (!supportsUnknownElements) { | |||
shivMethods(ownerDocument, data); | |||
ownerDocument.createElement = function(nodeName) { | |||
//abort shiv | |||
if (!html5.shivMethods) { | |||
return data.createElem(nodeName); | |||
} | |||
return createElement(nodeName, ownerDocument, data); | |||
}; | |||
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' + | |||
'var n=f.cloneNode(),c=n.createElement;' + | |||
'h.shivMethods&&(' + | |||
// unroll the `createElement` calls | |||
getElements().join().replace(/[\w\-]+/g, function(nodeName) { | |||
data.createElem(nodeName); | |||
data.frag.createElement(nodeName); | |||
return 'c("' + nodeName + '")'; | |||
}) + | |||
');return n}' | |||
)(html5, data.frag); | |||
} | |||
return ownerDocument; | |||
} | |||
/*--------------------------------------------------------------------------*/ | |||
/** | |||
* The `html5` object is exposed so that more elements can be shived and | |||
* existing shiving can be detected on iframes. | |||
* @type Object | |||
* @example | |||
* | |||
* // options can be changed before the script is included | |||
* html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false }; | |||
*/ | |||
var html5 = { | |||
/*--------------------------------------------------------------------------*/ | |||
/** | |||
* An array or space separated string of node names of the elements to shiv. | |||
* Shivs the given document. | |||
* @memberOf html5 | |||
* @type Array|String | |||
* @param {Document} ownerDocument The document to shiv. | |||
* @returns {Document} The shived document. | |||
*/ | |||
'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video', | |||
/** | |||
* A flag to indicate that the HTML5 style sheet should be inserted. | |||
* @memberOf html5 | |||
* @type Boolean | |||
*/ | |||
'shivCSS': (options.shivCSS !== false), | |||
/** | |||
* Is equal to true if a browser supports creating unknown/HTML5 elements | |||
* @memberOf html5 | |||
* @type boolean | |||
*/ | |||
'supportsUnknownElements': supportsUnknownElements, | |||
function shivDocument(ownerDocument) { | |||
if (!ownerDocument) { | |||
ownerDocument = document; | |||
} | |||
var data = getExpandoData(ownerDocument); | |||
if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) { | |||
data.hasCSS = !!addStyleSheet(ownerDocument, | |||
// corrects block display not defined in IE6/7/8/9 | |||
'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' + | |||
// adds styling not present in IE6/7/8/9 | |||
'mark{background:#FF0;color:#000}' + | |||
// hides non-rendered elements | |||
'template{display:none}' | |||
); | |||
} | |||
if (!supportsUnknownElements) { | |||
shivMethods(ownerDocument, data); | |||
} | |||
return ownerDocument; | |||
} | |||
/** | |||
* A flag to indicate that the document's `createElement` and `createDocumentFragment` | |||
* methods should be overwritten. | |||
* @memberOf html5 | |||
* @type Boolean | |||
*/ | |||
'shivMethods': (options.shivMethods !== false), | |||
/*--------------------------------------------------------------------------*/ | |||
/** | |||
* A string to describe the type of `html5` object ("default" or "default print"). | |||
* @memberOf html5 | |||
* @type String | |||
* The `html5` object is exposed so that more elements can be shived and | |||
* existing shiving can be detected on iframes. | |||
* @type Object | |||
* @example | |||
* | |||
* // options can be changed before the script is included | |||
* html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false }; | |||
*/ | |||
'type': 'default', | |||
// shivs the document according to the specified `html5` object options | |||
'shivDocument': shivDocument, | |||
//creates a shived element | |||
createElement: createElement, | |||
//creates a shived documentFragment | |||
createDocumentFragment: createDocumentFragment | |||
}; | |||