فهرست منبع

Merge master. Resolve merge conflicts

Edd Baldry 8 سال پیش
والد
کامیت
00549bd506

+ 0 - 1
bakerydemo/locations/models.py

@@ -8,7 +8,6 @@ from modelcluster.fields import ParentalKey
 
 from wagtail.wagtailcore.fields import StreamField
 from wagtail.wagtailadmin.edit_handlers import FieldPanel, InlinePanel, StreamFieldPanel
-
 from wagtail.wagtailcore.models import Orderable, Page
 from wagtail.wagtailsearch import index
 from wagtail.wagtailimages.edit_handlers import ImageChooserPanel

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 4
bakerydemo/static/css/clean-blog.min.css


+ 187 - 309
bakerydemo/static/css/main.css

@@ -1,15 +1,26 @@
-/* Space out content a bit */
+/* The bakery demo avoids using tooling so doesn't use SASS. This is a static */
+/* CSS file that extends Bootstrap. It's deliberately verbose to aid          */
+/* readability with global themes, themes for each list view and themes for   */
+/* each detail view                                                           */
+/* 1. Global styles --------------------------------------------------------- */
+/* 2. Page header ----------------------------------------------------------- */
+/* 3. Main menu ------------------------------------------------------------- */
+/* 4. Breadcrumb ------------------------------------------------------------ */
+/* 5. Location styles ------------------------------------------------------- */
+/* 6. Blog styles ----------------------------------------------------------- */
+/* 7. Bread styles ---------------------------------------------------------- */
+/* 8. Form styles ----------------------------------------------------------- */
+/* 9. Homepage styles ------------------------------------------------------- */
+/* 9. Miscellaneous/ Helper styles ------------------------------------------ */
+
+/* Global styles */
 body {
   padding-top: 0;
   padding-bottom: 0;
   font-size: 19px;
   font-family: 'Alegreya', serif;
-  /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#ffffff+0,ffffff+50,e9e4dd+100 */
-  background: rgb(255,255,255); /* Old browsers */
-  background: -moz-linear-gradient(-45deg,  rgba(255,255,255,1) 0%, rgba(255,255,255,1) 50%, rgba(233,228,221,1) 100%); /* FF3.6-15 */
-  background: -webkit-linear-gradient(-45deg,  rgba(255,255,255,1) 0%,rgba(255,255,255,1) 50%,rgba(233,228,221,1) 100%); /* Chrome10-25,Safari5.1-6 */
-  background: linear-gradient(135deg,  rgba(255,255,255,1) 0%,rgba(255,255,255,1) 50%,rgba(233,228,221,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
-  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e9e4dd',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
+  background: rgb(255,255,255);
+  background: linear-gradient(135deg,  rgba(255,255,255,1) 0%,rgba(255,255,255,1) 50%,rgba(233,228,221,1) 100%);
   min-height: 100vh;
 }
 
@@ -48,26 +59,31 @@ h4 {
   font-size: 22px;
 }
 
+p {
+  margin: 0 0 30px;
+  color: #444;
+}
+
 a, a:focus, a:visited {
   color: #d4566b;
   text-decoration: none;
 }
 
 a:hover {
-  text-decoration: none;
   color: #eb7400;
+  text-decoration: none;
 }
 
 a.btn {
-  display: inline-block;
   background-color: #d4566b;
   color: white;
+  display: inline-block;
   font-family: 'Lato', sans-serif;
-  padding: 15px 20px;
   font-size: 16px;
-  text-transform: uppercase;
-  letter-spacing: 0.15em;
   font-weight: 300;
+  letter-spacing: 0.15em;
+  padding: 15px 20px;
+  text-transform: uppercase;
 }
 
 a.btn:hover {
@@ -76,13 +92,11 @@ a.btn:hover {
 }
 
 a.btn-sm {
-    padding: 6px 8px;
-    font-size: 10px;
-    line-height: normal;
-    -webkit-border-radius: 4px;
-       -moz-border-radius: 4px;
-            border-radius: 4px;
-    }
+  border-radius: 4px;
+  font-size: 10px;
+  line-height: normal;
+  padding: 6px 8px;
+}
 
 .header input {
   border-radius: 3px;
@@ -92,28 +106,8 @@ a.btn-sm {
   width: 100%;
 }
 
-p {
-  margin: 0 0 30px;
-  color: #444;
-}
-
-.intro {
-  font-family: 'Lato', sans-serif;
-  font-weight: 300;
-  margin: 0 0 40px;
-  font-size: 22px;
-}
-
-.stand-first {
-  color: rgba(255,255,255,0.8);
-  margin: 0;
-}
-
-
-
 /* queries for type */
 @media (min-width: 768px) {
-
   h1 {
     font-size: 60px;
   }
@@ -130,7 +124,6 @@ p {
   p {
     margin: 0 0 30px;
   }
-
 }
 
 ul {
@@ -152,54 +145,142 @@ figure {
     margin: 0 0 50px;
   }
 }
-
 figcaption {
   background-color: rgba(99,33,13,0.8);
-  position: absolute;
-  width: 75%;
-  left: 0;
   bottom: 0;
-  padding: 10px;
   color: white;
   font-family: 'Lato', sans-serif;
   font-size: 16px;
   font-weight: 300;
+  left: 0;
+  padding: 10px;
+  position: absolute;
+  width: 75%;
 }
-
 img {
   display: block;
   width: 100%;
 }
 
+/* Generic detail page styles */
+.intro {
+  font-family: 'Lato', sans-serif;
+  font-weight: 300;
+  margin: 0 0 40px;
+  font-size: 22px;
+}
+.stand-first {
+  color: rgba(255,255,255,0.8);
+  margin: 0;
+}
+
+/* Hero image area */
+.hero {
+  background-size: cover;
+  background-position: center;
+  padding: 200px 0 30px 0;
+  position: relative;
+  margin: 0 0 30px;
+}
+@media screen and (min-width: 768px) {
+  .hero {
+    padding: 400px 0 60px 0;
+    margin: 0 0 40px;
+  }
+}
+.hero-gradient-mask {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  bottom: 0;
+  background: linear-gradient(to bottom,  rgba(0,0,0,0) 0%,rgba(0,0,0,0.01) 1%,rgba(0,0,0,1) 100%);
+}
+blockquote {
+  border-left: 5px solid #d4566b;
+  margin: 0 0 50px;
+}
+blockquote p {
+  font-size: 30px;
+  margin: 0 0 10px;
+}
+blockquote footer::before {
+  display: none;
+}
+blockquote footer p {
+  font-size: 1.8em;
+  font-style: italic;
+}
+cite {
+  font-family: 'Lato', sans-serif;
+  text-transform: uppercase;
+  color: #888;
+  font-size: 12px;
+  font-style: normal;
+  letter-spacing: 0.15em;
+}
+
+@media screen and (min-width: 768px) {
+  .header,
+  .footer {
+    padding-right: 0;
+    padding-left: 0;
+  }
+}
+
+/* Page header */
+.header {
+  padding: 15px 0 15px;
+  width: 100%;
+  background: rgb(25,17,18);
+  background: linear-gradient(135deg, rgba(25,17,18,1) 0%,rgba(55,28,25,1) 100%);
+  z-index: 10;
+}
+.header h3 {
+  margin-top: 0;
+  margin-bottom: 0;
+  line-height: 40px;
+}
+/* Logo */
+.logo, .logo:visited, .logo:focus {
+  display: inline-block;
+  padding: 0;
+  color: white;
+  font-size: 30px;
+  font-weight: 300;
+  margin: 0 0 0;
+}
+.logo:hover {
+  color: #d4566b;
+  text-decoration: none;
+}
 .search {
-  margin: 15px 0 0 0;
   display: none;
+  margin: 15px 0 0 0;
   position: relative;
 }
 @media (min-width: 768px) {
   .search {
+    display: inline-block;
     float: right;
     margin: 0 0 0 30px;
-    display: inline-block;
   }
 }
-
 .search-icon {
-  position: absolute;
   display: block;
-  width: 20px;
+  display: inline-block;
   height: 20px;
-  top: 10px;
+  position: absolute;
   right: 10px;
-  display: inline-block;
+  top: 10px;
+  width: 20px;
 }
-
 .search-icon svg {
   fill: #d4566b;
-  width: 20px;
   height: 20px;
+  width: 20px;
 }
 
+/* Main menu */
 nav {
   margin: 15px 0 5px;
   display: none;
@@ -207,7 +288,6 @@ nav {
 #main-navigation {
   padding-left: 0;
 }
-
 @media (min-width: 768px) {
   nav {
     margin: 15px 0 0 0;
@@ -215,25 +295,22 @@ nav {
     display: block;
   }
 }
-
 .nav-pills>li+li {
-    margin-left: 0;
+  margin-left: 0;
 }
-
 .nav-pills>li>a {
-  color: white;
-  border-top: 1px solid transparent;
   border-radius: 0;
-  text-transform: uppercase;
-  letter-spacing: 0.15em;
-  font-weight: 300;
-  padding: 10px 10px;
-  font-size: 11px;
+  border-top: 1px solid transparent;
+  color: white;
   color: white;
   font-family: 'Lato', sans-serif;
+  font-size: 11px;
+  font-weight: 300;
+  letter-spacing: 0.15em;
   margin-top: -1px;
+  padding: 10px 10px;
+  text-transform: uppercase;
 }
-
 @media (min-width: 768px) {
   .nav-pills>li>a {
     padding: 10px 20px;
@@ -270,7 +347,9 @@ nav {
   border-top: 1px solid #d4566b;
   font-weight: 400;
 }
-
+.nav-pills> li:first-of-type > a {
+  padding-left: 0;
+}
 .nav .open>a, .nav .open>a:focus, .nav .open>a:hover {
   background-color: transparent;
   border-top: 1px solid #d4566b;
@@ -293,7 +372,24 @@ nav {
   background-color: transparent;
   color: #d4566b;
 }
-/* Everything but the jumbotron gets side spacing for mobile first views */
+/* Menu dropdown hack to allow toggling */
+li.has-submenu a.allow-toggle {
+  float: left;
+  padding-right: 0;
+}
+.caret-custom {
+    float: right;
+    display: inline-block!important;
+    padding: 10px 10px 15px 5px!important;
+}
+.caret-custom:after {
+    content: "▼"!important;
+}
+/* Custom page footer */
+.footer {
+  padding-top: 19px;
+  color: #777;
+}
 .footer {
   font-size: 16px;
   font-family: 'Lato', sans-serif;
@@ -302,43 +398,14 @@ nav {
   font-weight: 300;
   background-color: white;
 }
-
 .footer p {
   margin: 0;
 }
-
-/* Custom page header */
-.header {
-  padding: 15px 0 15px;
-/*  position: absolute;*/
-  width: 100%;
-  background: rgb(25,17,18); /* Old browsers */
-  background: -moz-linear-gradient(-45deg,  rgba(25,17,18,1) 0%, rgba(55,28,25,1) 100%); /* FF3.6-15 */
-  background: -webkit-linear-gradient(-45deg,  rgba(25,17,18,1) 0%,rgba(55,28,25,1) 100%); /* Chrome10-25,Safari5.1-6 */
-  background: linear-gradient(135deg,  rgba(25,17,18,1) 0%,rgba(55,28,25,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
-  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#191112', endColorstr='#371c19',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
-  z-index: 10;
-}
-/* Make the masthead heading the same height as the navigation */
-.header h3 {
-  margin-top: 0;
-  margin-bottom: 0;
-  line-height: 40px;
-}
-
-/* Custom page footer */
-.footer {
-  padding-top: 19px;
-  color: #777;
-}
-
 .container {
   width: auto;
   padding-left: 20px;
   padding-right: 20px;
 }
-
-/* Customize container */
 @media (min-width: 768px) {
   .container {
     max-width: 1400px;
@@ -350,179 +417,7 @@ nav {
   margin: 30px 0;
 }
 
-/* Main marketing message and sign up button */
-.jumbotron {
-  text-align: center;
-  border-bottom: 1px solid #e5e5e5;
-}
-.jumbotron .btn {
-  padding: 14px 24px;
-  font-size: 21px;
-}
-
-/* Supporting marketing content */
-.marketing {
-  margin: 40px 0;
-}
-.marketing p + h4 {
-  margin-top: 28px;
-}
-
-/* Article title and hero image */
-.hero {
-  background-size: cover;
-  background-position: center;
-  padding: 200px 0 30px 0;
-  position: relative;
-  margin: 0 0 30px;
-}
-
-@media screen and (min-width: 768px) {
-
-  .hero {
-    padding: 400px 0 60px 0;
-    margin: 0 0 40px;
-  }
-
-}
-
-
-
-.hero-gradient-mask {
-  position: absolute;
-  width: 100%;
-  height: 100%;
-  bottom: 0;
-  background: -moz-linear-gradient(top,  rgba(0,0,0,0) 0%, rgba(0,0,0,0.01) 1%, rgba(0,0,0,1) 100%); /* FF3.6-15 */
-  background: -webkit-linear-gradient(top,  rgba(0,0,0,0) 0%,rgba(0,0,0,0.01) 1%,rgba(0,0,0,1) 100%); /* Chrome10-25,Safari5.1-6 */
-  background: linear-gradient(to bottom,  rgba(0,0,0,0) 0%,rgba(0,0,0,0.01) 1%,rgba(0,0,0,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
-  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
-}
-
-/* Logo */
-.logo, .logo:visited, .logo:focus {
-  display: inline-block;
-  padding: 0;
-  color: white;
-  font-size: 30px;
-  font-weight: 300;
-  margin: 0 0 0;
-}
-
-
-.logo:hover {
-  color: #d4566b;
-  text-decoration: none;
-}
-
-
-blockquote {
-  border-left: 5px solid #d4566b;
-  margin: 0 0 50px;
-}
-
-blockquote p {
-  font-size: 30px;
-  margin: 0 0 10px;
-}
-
-blockquote footer::before {
-  display: none;
-}
-blockquote footer p {
-  font-size: 1.8em;
-  font-style: italic;
-}
-
-cite {
-  font-family: 'Lato', sans-serif;
-  text-transform: uppercase;
-  color: #888;
-  font-size: 12px;
-  font-style: normal;
-  letter-spacing: 0.15em;
-}
-
-/* Responsive: Portrait tablets and up */
-@media screen and (min-width: 768px) {
-  /* Remove the padding we set earlier */
-  .header,
-  .marketing,
-  .footer {
-    padding-right: 0;
-    padding-left: 0;
-  }
-  /* Remove the bottom border on the jumbotron for visual effect */
-  .jumbotron {
-    border-bottom: 0;
-  }
-}
-
-/* Responsive: Portrait tablets and up */
-@media screen and (min-width: 1024px) {
-
-}
-
-/* Menu dropdown hack */
-li.has-submenu a.allow-toggle {
-  float: left;
-  padding-right: 0;
-}
-.caret-custom {
-    float: right;
-    display: inline-block!important;
-    padding: 10px 10px 15px 5px!important;
-}
-.caret-custom:after {
-    content: "▼"!important;
-}
-
-/* Edd styling */
-.site-title {
-  border-bottom: 1px #eee solid;
-}
-.site-title h1 {
-  font-family: 'Alegreya', serif;
-  font-size: 1.5em;
-  margin-top: 10px;
-}
-
-.navbar-form {
-  border: 1px solid #ddd;
-  padding: 0;
-  border-radius: 5px;
-  margin-right: 0px;
-}
-.navbar-form .form-group .form-control {
-  border: none;
-  box-shadow: none!important;
-  font-family: 'Lato', sans-serif;
-}
-.navbar-right button.btn.btn-default {
-  margin-left: -10px;
-  border: none;
-  border-left: 1px solid #ddd;
-  border-radius: 0;
-}
-.navbar-default {
-  background-color: transparent;
-  border-color: transparent;
-}
-.navbar-nav a {
-  font-size: 14px;
-}
-.navbar-nav a span {
-  font-size: 10px;
-}
-
-.navbar.navbar-default.navbar-custom {
-  border-bottom: 1px #eee solid;
-}
-
-.nav-pills> li:first-of-type > a {
-  padding-left: 0;
-}
-
+/* Breadcrumbs */
 .breadcrumb-container {
   background: linear-gradient(to right, rgba(21,38,44,0.8) 0%,rgba(0,0,0,0.9) 100%);
   margin-top: -1px;
@@ -617,11 +512,9 @@ span.day {
 time.location-time {
   display: block;
 }
-
 .map-container {
   height: 550px;
 }
-
 .location-address {
   background-color: rgba(233,228,221,1);
   padding: 10px 30px;
@@ -630,24 +523,6 @@ time.location-time {
   z-index: 1;
 }
 
-/* Blog styles */
-.blog-meta {
-    margin-top: -40px;
-    margin-bottom: 20px;
-}
-.blog-avatar {
-    border-radius: 100%;
-    display: inline;
-    width: unset;
-}
-.blog-avatars {
-    margin-bottom: 20px;
-}
-.blog-avatars .author {
-  display: inline-block;
-  margin-right: 30px;
-}
-
 /* Blog list view */
 .blog-tags>li {
   border-right: 1px solid rgba(0,0,0,0.1);
@@ -734,6 +609,7 @@ time.location-time {
   z-index: 1;
 }
 
+/* used to style tags on blog */
 span.outline {
   border-radius: 3px;
   border: 1px solid rgba(0,0,0,0.1);
@@ -742,6 +618,24 @@ span.outline {
   text-transform: uppercase;
 }
 
+/* Blog detail page */
+.blog-meta {
+    margin-top: -40px;
+    margin-bottom: 20px;
+}
+.blog-avatar {
+    border-radius: 100%;
+    display: inline;
+    width: unset;
+}
+.blog-avatars {
+    margin-bottom: 20px;
+}
+.blog-avatars .author {
+  display: inline-block;
+  margin-right: 30px;
+}
+
 /* Bread styles */
 /* Bread listview */
 .bread-list-item {
@@ -944,7 +838,6 @@ span.outline {
 .homepage .home-hero .hero-cta-link:active:before {
   transform: translateX(4px);
 }
-
 .homepage .streamfield {
   background: linear-gradient(45deg, rgba(170,170,170,1) 0%,rgba(238,238,238,1) 44%);
 }
@@ -960,7 +853,6 @@ span.outline {
 .homepage .streamfield-column h5 {
   text-align: center;
 }
-
 .homepage .promo-row {
   padding: 40px 0 40px 0;
 }
@@ -1008,18 +900,15 @@ span.outline {
     margin-right: 15px;
   }
 }
-
 .homepage .promo figure img {
   border-radius: 100%;
   margin: auto;
   width: auto;
 }
-
 .homepage .feature-1 h2 {
   margin-top: 0;
   margin-bottom: 20px;
 }
-
 .homepage .feature-1 .featured-children li,
 .homepage .feature-2 .featured-children li,
 .homepage .feature-3 .featured-children li {
@@ -1028,71 +917,58 @@ span.outline {
   list-style: none;
   margin-bottom: 10px;
 }
-
 .homepage .feature-1 .featured-children li figure {
   width: 100%;
   overflow: hidden;
   margin: 0;
 }
-
 .homepage .feature-1 .featured-children li img {
   width: auto;
 }
-
 .homepage .feature-1 .featured-children li h3 {
   margin-top: 40px;
   font-weight: 300;
   font-size: 1.4em;
 }
-
 .homepage .feature-2 {
   padding: 40px 0 20px;
 }
-
 .homepage .feature-2 .feature-2-row {
   display: flex;
   flex-wrap: wrap;
 }
-
 .homepage .feature-2 h2,
 .homepage .feature-3 h2 {
   text-align: center;
   margin: 20px;
 }
-
 .homepage .feature-2 .feature-2-item {
   display: flex;
   flex-direction: column;
   margin: 0 auto 20px;
 }
-
 .homepage .feature-2 .feature-2-item figure {
   margin-bottom: 0;
 }
-
 .homepage .feature-2 .feature-2-item img {
   min-height: 210px;
 }
-
 .homepage .feature-2 .feature-2-item .feature-2-text {
   background-color: #dfdfdf;
   border-radius: 0 0 10px 10px;
   padding: 0 20px;
   flex: 1;
 }
-
 .homepage .feature-2 figure,
 .homepage .feature-3 figure {
   background-color: #eb7400;
   margin: 0;
 }
-
 @media (max-width: 766px) {
   .homepage .feature-2 .feature-2-row {
     display: inline-block;
   }
 }
-
 .homepage .feature-3 h3 {
   color: #fff;
   font-weight: 300;
@@ -1108,6 +984,8 @@ span.outline {
 .homepage .feature-3 li:hover img {
   opacity: 0.3;
 }
+
+/* Miscellaneous helper styles */
 /* No gutters */
 .row.no-gutters {
   margin-right: 0;

+ 0 - 6
bakerydemo/static/js/clean-blog.min.js

@@ -1,6 +0,0 @@
-/*!
- * Start Bootstrap - Clean Blog v3.3.7+1 (http://startbootstrap.com/template-overviews/clean-blog)
- * Copyright 2013-2016 Start Bootstrap
- * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE)
- */
-$(function(){$("body").on("input propertychange",".floating-label-form-group",function(o){$(this).toggleClass("floating-label-form-group-with-value",!!$(o.target).val())}).on("focus",".floating-label-form-group",function(){$(this).addClass("floating-label-form-group-with-focus")}).on("blur",".floating-label-form-group",function(){$(this).removeClass("floating-label-form-group-with-focus")})}),jQuery(document).ready(function(o){var s=1170;if(o(window).width()>s){var i=o(".navbar-custom").height();o(window).on("scroll",{previousTop:0},function(){var s=o(window).scrollTop();s<this.previousTop?s>0&&o(".navbar-custom").hasClass("is-fixed")?o(".navbar-custom").addClass("is-visible"):o(".navbar-custom").removeClass("is-visible is-fixed"):s>this.previousTop&&(o(".navbar-custom").removeClass("is-visible"),s>i&&!o(".navbar-custom").hasClass("is-fixed")&&o(".navbar-custom").addClass("is-fixed")),this.previousTop=s})}});

+ 0 - 72
bakerydemo/static/js/contact_me.js

@@ -1,72 +0,0 @@
-// Contact Form Scripts
-
-$(function() {
-
-    $("#contactForm input,#contactForm textarea").jqBootstrapValidation({
-        preventSubmit: true,
-        submitError: function($form, event, errors) {
-            // additional error messages or events
-        },
-        submitSuccess: function($form, event) {
-            event.preventDefault(); // prevent default submit behaviour
-            // get values from FORM
-            var name = $("input#name").val();
-            var email = $("input#email").val();
-            var phone = $("input#phone").val();
-            var message = $("textarea#message").val();
-            var firstName = name; // For Success/Failure Message
-            // Check for white space in name for Success/Fail message
-            if (firstName.indexOf(' ') >= 0) {
-                firstName = name.split(' ').slice(0, -1).join(' ');
-            }
-            $.ajax({
-                url: "././mail/contact_me.php",
-                type: "POST",
-                data: {
-                    name: name,
-                    phone: phone,
-                    email: email,
-                    message: message
-                },
-                cache: false,
-                success: function() {
-                    // Success message
-                    $('#success').html("<div class='alert alert-success'>");
-                    $('#success > .alert-success').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;")
-                        .append("</button>");
-                    $('#success > .alert-success')
-                        .append("<strong>Your message has been sent. </strong>");
-                    $('#success > .alert-success')
-                        .append('</div>');
-
-                    //clear all fields
-                    $('#contactForm').trigger("reset");
-                },
-                error: function() {
-                    // Fail message
-                    $('#success').html("<div class='alert alert-danger'>");
-                    $('#success > .alert-danger').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;")
-                        .append("</button>");
-                    $('#success > .alert-danger').append("<strong>Sorry " + firstName + ", it seems that my mail server is not responding. Please try again later!");
-                    $('#success > .alert-danger').append('</div>');
-                    //clear all fields
-                    $('#contactForm').trigger("reset");
-                },
-            });
-        },
-        filter: function() {
-            return $(this).is(":visible");
-        },
-    });
-
-    $("a[data-toggle=\"tab\"]").click(function(e) {
-        e.preventDefault();
-        $(this).tab("show");
-    });
-});
-
-
-/*When clicking on Full hide fail/success boxes */
-$('#name').focus(function() {
-    $('#success').html('');
-});

+ 0 - 912
bakerydemo/static/js/jqBootstrapValidation.js

@@ -1,912 +0,0 @@
-/* jqBootstrapValidation
- * A plugin for automating validation on Twitter Bootstrap formatted forms.
- *
- * v1.3.6
- *
- * License: MIT <http://opensource.org/licenses/mit-license.php> - see LICENSE file
- *
- * http://ReactiveRaven.github.com/jqBootstrapValidation/
- */
-
-(function( $ ){
-
-	var createdElements = [];
-
-	var defaults = {
-		options: {
-			prependExistingHelpBlock: false,
-			sniffHtml: true, // sniff for 'required', 'maxlength', etc
-			preventSubmit: true, // stop the form submit event from firing if validation fails
-			submitError: false, // function called if there is an error when trying to submit
-			submitSuccess: false, // function called just before a successful submit event is sent to the server
-            semanticallyStrict: false, // set to true to tidy up generated HTML output
-			autoAdd: {
-				helpBlocks: true
-			},
-            filter: function () {
-                // return $(this).is(":visible"); // only validate elements you can see
-                return true; // validate everything
-            }
-		},
-    methods: {
-      init : function( options ) {
-
-        var settings = $.extend(true, {}, defaults);
-
-        settings.options = $.extend(true, settings.options, options);
-
-        var $siblingElements = this;
-
-        var uniqueForms = $.unique(
-          $siblingElements.map( function () {
-            return $(this).parents("form")[0];
-          }).toArray()
-        );
-
-        $(uniqueForms).bind("submit", function (e) {
-          var $form = $(this);
-          var warningsFound = 0;
-          var $inputs = $form.find("input,textarea,select").not("[type=submit],[type=image]").filter(settings.options.filter);
-          $inputs.trigger("submit.validation").trigger("validationLostFocus.validation");
-
-          $inputs.each(function (i, el) {
-            var $this = $(el),
-              $controlGroup = $this.parents(".form-group").first();
-            if (
-              $controlGroup.hasClass("warning")
-            ) {
-              $controlGroup.removeClass("warning").addClass("error");
-              warningsFound++;
-            }
-          });
-
-          $inputs.trigger("validationLostFocus.validation");
-
-          if (warningsFound) {
-            if (settings.options.preventSubmit) {
-              e.preventDefault();
-            }
-            $form.addClass("error");
-            if ($.isFunction(settings.options.submitError)) {
-              settings.options.submitError($form, e, $inputs.jqBootstrapValidation("collectErrors", true));
-            }
-          } else {
-            $form.removeClass("error");
-            if ($.isFunction(settings.options.submitSuccess)) {
-              settings.options.submitSuccess($form, e);
-            }
-          }
-        });
-
-        return this.each(function(){
-
-          // Get references to everything we're interested in
-          var $this = $(this),
-            $controlGroup = $this.parents(".form-group").first(),
-            $helpBlock = $controlGroup.find(".help-block").first(),
-            $form = $this.parents("form").first(),
-            validatorNames = [];
-
-          // create message container if not exists
-          if (!$helpBlock.length && settings.options.autoAdd && settings.options.autoAdd.helpBlocks) {
-              $helpBlock = $('<div class="help-block" />');
-              $controlGroup.find('.controls').append($helpBlock);
-							createdElements.push($helpBlock[0]);
-          }
-
-          // =============================================================
-          //                                     SNIFF HTML FOR VALIDATORS
-          // =============================================================
-
-          // *snort sniff snuffle*
-
-          if (settings.options.sniffHtml) {
-            var message = "";
-            // ---------------------------------------------------------
-            //                                                   PATTERN
-            // ---------------------------------------------------------
-            if ($this.attr("pattern") !== undefined) {
-              message = "Not in the expected format<!-- data-validation-pattern-message to override -->";
-              if ($this.data("validationPatternMessage")) {
-                message = $this.data("validationPatternMessage");
-              }
-              $this.data("validationPatternMessage", message);
-              $this.data("validationPatternRegex", $this.attr("pattern"));
-            }
-            // ---------------------------------------------------------
-            //                                                       MAX
-            // ---------------------------------------------------------
-            if ($this.attr("max") !== undefined || $this.attr("aria-valuemax") !== undefined) {
-              var max = ($this.attr("max") !== undefined ? $this.attr("max") : $this.attr("aria-valuemax"));
-              message = "Too high: Maximum of '" + max + "'<!-- data-validation-max-message to override -->";
-              if ($this.data("validationMaxMessage")) {
-                message = $this.data("validationMaxMessage");
-              }
-              $this.data("validationMaxMessage", message);
-              $this.data("validationMaxMax", max);
-            }
-            // ---------------------------------------------------------
-            //                                                       MIN
-            // ---------------------------------------------------------
-            if ($this.attr("min") !== undefined || $this.attr("aria-valuemin") !== undefined) {
-              var min = ($this.attr("min") !== undefined ? $this.attr("min") : $this.attr("aria-valuemin"));
-              message = "Too low: Minimum of '" + min + "'<!-- data-validation-min-message to override -->";
-              if ($this.data("validationMinMessage")) {
-                message = $this.data("validationMinMessage");
-              }
-              $this.data("validationMinMessage", message);
-              $this.data("validationMinMin", min);
-            }
-            // ---------------------------------------------------------
-            //                                                 MAXLENGTH
-            // ---------------------------------------------------------
-            if ($this.attr("maxlength") !== undefined) {
-              message = "Too long: Maximum of '" + $this.attr("maxlength") + "' characters<!-- data-validation-maxlength-message to override -->";
-              if ($this.data("validationMaxlengthMessage")) {
-                message = $this.data("validationMaxlengthMessage");
-              }
-              $this.data("validationMaxlengthMessage", message);
-              $this.data("validationMaxlengthMaxlength", $this.attr("maxlength"));
-            }
-            // ---------------------------------------------------------
-            //                                                 MINLENGTH
-            // ---------------------------------------------------------
-            if ($this.attr("minlength") !== undefined) {
-              message = "Too short: Minimum of '" + $this.attr("minlength") + "' characters<!-- data-validation-minlength-message to override -->";
-              if ($this.data("validationMinlengthMessage")) {
-                message = $this.data("validationMinlengthMessage");
-              }
-              $this.data("validationMinlengthMessage", message);
-              $this.data("validationMinlengthMinlength", $this.attr("minlength"));
-            }
-            // ---------------------------------------------------------
-            //                                                  REQUIRED
-            // ---------------------------------------------------------
-            if ($this.attr("required") !== undefined || $this.attr("aria-required") !== undefined) {
-              message = settings.builtInValidators.required.message;
-              if ($this.data("validationRequiredMessage")) {
-                message = $this.data("validationRequiredMessage");
-              }
-              $this.data("validationRequiredMessage", message);
-            }
-            // ---------------------------------------------------------
-            //                                                    NUMBER
-            // ---------------------------------------------------------
-            if ($this.attr("type") !== undefined && $this.attr("type").toLowerCase() === "number") {
-              message = settings.builtInValidators.number.message;
-              if ($this.data("validationNumberMessage")) {
-                message = $this.data("validationNumberMessage");
-              }
-              $this.data("validationNumberMessage", message);
-            }
-            // ---------------------------------------------------------
-            //                                                     EMAIL
-            // ---------------------------------------------------------
-            if ($this.attr("type") !== undefined && $this.attr("type").toLowerCase() === "email") {
-              message = "Not a valid email address<!-- data-validator-validemail-message to override -->";
-              if ($this.data("validationValidemailMessage")) {
-                message = $this.data("validationValidemailMessage");
-              } else if ($this.data("validationEmailMessage")) {
-                message = $this.data("validationEmailMessage");
-              }
-              $this.data("validationValidemailMessage", message);
-            }
-            // ---------------------------------------------------------
-            //                                                MINCHECKED
-            // ---------------------------------------------------------
-            if ($this.attr("minchecked") !== undefined) {
-              message = "Not enough options checked; Minimum of '" + $this.attr("minchecked") + "' required<!-- data-validation-minchecked-message to override -->";
-              if ($this.data("validationMincheckedMessage")) {
-                message = $this.data("validationMincheckedMessage");
-              }
-              $this.data("validationMincheckedMessage", message);
-              $this.data("validationMincheckedMinchecked", $this.attr("minchecked"));
-            }
-            // ---------------------------------------------------------
-            //                                                MAXCHECKED
-            // ---------------------------------------------------------
-            if ($this.attr("maxchecked") !== undefined) {
-              message = "Too many options checked; Maximum of '" + $this.attr("maxchecked") + "' required<!-- data-validation-maxchecked-message to override -->";
-              if ($this.data("validationMaxcheckedMessage")) {
-                message = $this.data("validationMaxcheckedMessage");
-              }
-              $this.data("validationMaxcheckedMessage", message);
-              $this.data("validationMaxcheckedMaxchecked", $this.attr("maxchecked"));
-            }
-          }
-
-          // =============================================================
-          //                                       COLLECT VALIDATOR NAMES
-          // =============================================================
-
-          // Get named validators
-          if ($this.data("validation") !== undefined) {
-            validatorNames = $this.data("validation").split(",");
-          }
-
-          // Get extra ones defined on the element's data attributes
-          $.each($this.data(), function (i, el) {
-            var parts = i.replace(/([A-Z])/g, ",$1").split(",");
-            if (parts[0] === "validation" && parts[1]) {
-              validatorNames.push(parts[1]);
-            }
-          });
-
-          // =============================================================
-          //                                     NORMALISE VALIDATOR NAMES
-          // =============================================================
-
-          var validatorNamesToInspect = validatorNames;
-          var newValidatorNamesToInspect = [];
-
-          do // repeatedly expand 'shortcut' validators into their real validators
-          {
-            // Uppercase only the first letter of each name
-            $.each(validatorNames, function (i, el) {
-              validatorNames[i] = formatValidatorName(el);
-            });
-
-            // Remove duplicate validator names
-            validatorNames = $.unique(validatorNames);
-
-            // Pull out the new validator names from each shortcut
-            newValidatorNamesToInspect = [];
-            $.each(validatorNamesToInspect, function(i, el) {
-              if ($this.data("validation" + el + "Shortcut") !== undefined) {
-                // Are these custom validators?
-                // Pull them out!
-                $.each($this.data("validation" + el + "Shortcut").split(","), function(i2, el2) {
-                  newValidatorNamesToInspect.push(el2);
-                });
-              } else if (settings.builtInValidators[el.toLowerCase()]) {
-                // Is this a recognised built-in?
-                // Pull it out!
-                var validator = settings.builtInValidators[el.toLowerCase()];
-                if (validator.type.toLowerCase() === "shortcut") {
-                  $.each(validator.shortcut.split(","), function (i, el) {
-                    el = formatValidatorName(el);
-                    newValidatorNamesToInspect.push(el);
-                    validatorNames.push(el);
-                  });
-                }
-              }
-            });
-
-            validatorNamesToInspect = newValidatorNamesToInspect;
-
-          } while (validatorNamesToInspect.length > 0)
-
-          // =============================================================
-          //                                       SET UP VALIDATOR ARRAYS
-          // =============================================================
-
-          var validators = {};
-
-          $.each(validatorNames, function (i, el) {
-            // Set up the 'override' message
-            var message = $this.data("validation" + el + "Message");
-            var hasOverrideMessage = (message !== undefined);
-            var foundValidator = false;
-            message =
-              (
-                message
-                  ? message
-                  : "'" + el + "' validation failed <!-- Add attribute 'data-validation-" + el.toLowerCase() + "-message' to input to change this message -->"
-              )
-            ;
-
-            $.each(
-              settings.validatorTypes,
-              function (validatorType, validatorTemplate) {
-                if (validators[validatorType] === undefined) {
-                  validators[validatorType] = [];
-                }
-                if (!foundValidator && $this.data("validation" + el + formatValidatorName(validatorTemplate.name)) !== undefined) {
-                  validators[validatorType].push(
-                    $.extend(
-                      true,
-                      {
-                        name: formatValidatorName(validatorTemplate.name),
-                        message: message
-                      },
-                      validatorTemplate.init($this, el)
-                    )
-                  );
-                  foundValidator = true;
-                }
-              }
-            );
-
-            if (!foundValidator && settings.builtInValidators[el.toLowerCase()]) {
-
-              var validator = $.extend(true, {}, settings.builtInValidators[el.toLowerCase()]);
-              if (hasOverrideMessage) {
-                validator.message = message;
-              }
-              var validatorType = validator.type.toLowerCase();
-
-              if (validatorType === "shortcut") {
-                foundValidator = true;
-              } else {
-                $.each(
-                  settings.validatorTypes,
-                  function (validatorTemplateType, validatorTemplate) {
-                    if (validators[validatorTemplateType] === undefined) {
-                      validators[validatorTemplateType] = [];
-                    }
-                    if (!foundValidator && validatorType === validatorTemplateType.toLowerCase()) {
-                      $this.data("validation" + el + formatValidatorName(validatorTemplate.name), validator[validatorTemplate.name.toLowerCase()]);
-                      validators[validatorType].push(
-                        $.extend(
-                          validator,
-                          validatorTemplate.init($this, el)
-                        )
-                      );
-                      foundValidator = true;
-                    }
-                  }
-                );
-              }
-            }
-
-            if (! foundValidator) {
-              $.error("Cannot find validation info for '" + el + "'");
-            }
-          });
-
-          // =============================================================
-          //                                         STORE FALLBACK VALUES
-          // =============================================================
-
-          $helpBlock.data(
-            "original-contents",
-            (
-              $helpBlock.data("original-contents")
-                ? $helpBlock.data("original-contents")
-                : $helpBlock.html()
-            )
-          );
-
-          $helpBlock.data(
-            "original-role",
-            (
-              $helpBlock.data("original-role")
-                ? $helpBlock.data("original-role")
-                : $helpBlock.attr("role")
-            )
-          );
-
-          $controlGroup.data(
-            "original-classes",
-            (
-              $controlGroup.data("original-clases")
-                ? $controlGroup.data("original-classes")
-                : $controlGroup.attr("class")
-            )
-          );
-
-          $this.data(
-            "original-aria-invalid",
-            (
-              $this.data("original-aria-invalid")
-                ? $this.data("original-aria-invalid")
-                : $this.attr("aria-invalid")
-            )
-          );
-
-          // =============================================================
-          //                                                    VALIDATION
-          // =============================================================
-
-          $this.bind(
-            "validation.validation",
-            function (event, params) {
-
-              var value = getValue($this);
-
-              // Get a list of the errors to apply
-              var errorsFound = [];
-
-              $.each(validators, function (validatorType, validatorTypeArray) {
-                if (value || value.length || (params && params.includeEmpty) || (!!settings.validatorTypes[validatorType].blockSubmit && params && !!params.submitting)) {
-                  $.each(validatorTypeArray, function (i, validator) {
-                    if (settings.validatorTypes[validatorType].validate($this, value, validator)) {
-                      errorsFound.push(validator.message);
-                    }
-                  });
-                }
-              });
-
-              return errorsFound;
-            }
-          );
-
-          $this.bind(
-            "getValidators.validation",
-            function () {
-              return validators;
-            }
-          );
-
-          // =============================================================
-          //                                             WATCH FOR CHANGES
-          // =============================================================
-          $this.bind(
-            "submit.validation",
-            function () {
-              return $this.triggerHandler("change.validation", {submitting: true});
-            }
-          );
-          $this.bind(
-            [
-              "keyup",
-              "focus",
-              "blur",
-              "click",
-              "keydown",
-              "keypress",
-              "change"
-            ].join(".validation ") + ".validation",
-            function (e, params) {
-
-              var value = getValue($this);
-
-              var errorsFound = [];
-
-              $controlGroup.find("input,textarea,select").each(function (i, el) {
-                var oldCount = errorsFound.length;
-                $.each($(el).triggerHandler("validation.validation", params), function (j, message) {
-                  errorsFound.push(message);
-                });
-                if (errorsFound.length > oldCount) {
-                  $(el).attr("aria-invalid", "true");
-                } else {
-                  var original = $this.data("original-aria-invalid");
-                  $(el).attr("aria-invalid", (original !== undefined ? original : false));
-                }
-              });
-
-              $form.find("input,select,textarea").not($this).not("[name=\"" + $this.attr("name") + "\"]").trigger("validationLostFocus.validation");
-
-              errorsFound = $.unique(errorsFound.sort());
-
-              // Were there any errors?
-              if (errorsFound.length) {
-                // Better flag it up as a warning.
-                $controlGroup.removeClass("success error").addClass("warning");
-
-                // How many errors did we find?
-                if (settings.options.semanticallyStrict && errorsFound.length === 1) {
-                  // Only one? Being strict? Just output it.
-                  $helpBlock.html(errorsFound[0] + 
-                    ( settings.options.prependExistingHelpBlock ? $helpBlock.data("original-contents") : "" ));
-                } else {
-                  // Multiple? Being sloppy? Glue them together into an UL.
-                  $helpBlock.html("<ul role=\"alert\"><li>" + errorsFound.join("</li><li>") + "</li></ul>" +
-                    ( settings.options.prependExistingHelpBlock ? $helpBlock.data("original-contents") : "" ));
-                }
-              } else {
-                $controlGroup.removeClass("warning error success");
-                if (value.length > 0) {
-                  $controlGroup.addClass("success");
-                }
-                $helpBlock.html($helpBlock.data("original-contents"));
-              }
-
-              if (e.type === "blur") {
-                $controlGroup.removeClass("success");
-              }
-            }
-          );
-          $this.bind("validationLostFocus.validation", function () {
-            $controlGroup.removeClass("success");
-          });
-        });
-      },
-      destroy : function( ) {
-
-        return this.each(
-          function() {
-
-            var
-              $this = $(this),
-              $controlGroup = $this.parents(".form-group").first(),
-              $helpBlock = $controlGroup.find(".help-block").first();
-
-            // remove our events
-            $this.unbind('.validation'); // events are namespaced.
-            // reset help text
-            $helpBlock.html($helpBlock.data("original-contents"));
-            // reset classes
-            $controlGroup.attr("class", $controlGroup.data("original-classes"));
-            // reset aria
-            $this.attr("aria-invalid", $this.data("original-aria-invalid"));
-            // reset role
-            $helpBlock.attr("role", $this.data("original-role"));
-						// remove all elements we created
-						if (createdElements.indexOf($helpBlock[0]) > -1) {
-							$helpBlock.remove();
-						}
-
-          }
-        );
-
-      },
-      collectErrors : function(includeEmpty) {
-
-        var errorMessages = {};
-        this.each(function (i, el) {
-          var $el = $(el);
-          var name = $el.attr("name");
-          var errors = $el.triggerHandler("validation.validation", {includeEmpty: true});
-          errorMessages[name] = $.extend(true, errors, errorMessages[name]);
-        });
-
-        $.each(errorMessages, function (i, el) {
-          if (el.length === 0) {
-            delete errorMessages[i];
-          }
-        });
-
-        return errorMessages;
-
-      },
-      hasErrors: function() {
-
-        var errorMessages = [];
-
-        this.each(function (i, el) {
-          errorMessages = errorMessages.concat(
-            $(el).triggerHandler("getValidators.validation") ? $(el).triggerHandler("validation.validation", {submitting: true}) : []
-          );
-        });
-
-        return (errorMessages.length > 0);
-      },
-      override : function (newDefaults) {
-        defaults = $.extend(true, defaults, newDefaults);
-      }
-    },
-		validatorTypes: {
-      callback: {
-        name: "callback",
-        init: function ($this, name) {
-          return {
-            validatorName: name,
-            callback: $this.data("validation" + name + "Callback"),
-            lastValue: $this.val(),
-            lastValid: true,
-            lastFinished: true
-          };
-        },
-        validate: function ($this, value, validator) {
-          if (validator.lastValue === value && validator.lastFinished) {
-            return !validator.lastValid;
-          }
-
-          if (validator.lastFinished === true)
-          {
-            validator.lastValue = value;
-            validator.lastValid = true;
-            validator.lastFinished = false;
-
-            var rrjqbvValidator = validator;
-            var rrjqbvThis = $this;
-            executeFunctionByName(
-              validator.callback,
-              window,
-              $this,
-              value,
-              function (data) {
-                if (rrjqbvValidator.lastValue === data.value) {
-                  rrjqbvValidator.lastValid = data.valid;
-                  if (data.message) {
-                    rrjqbvValidator.message = data.message;
-                  }
-                  rrjqbvValidator.lastFinished = true;
-                  rrjqbvThis.data("validation" + rrjqbvValidator.validatorName + "Message", rrjqbvValidator.message);
-                  // Timeout is set to avoid problems with the events being considered 'already fired'
-                  setTimeout(function () {
-                    rrjqbvThis.trigger("change.validation");
-                  }, 1); // doesn't need a long timeout, just long enough for the event bubble to burst
-                }
-              }
-            );
-          }
-
-          return false;
-
-        }
-      },
-      ajax: {
-        name: "ajax",
-        init: function ($this, name) {
-          return {
-            validatorName: name,
-            url: $this.data("validation" + name + "Ajax"),
-            lastValue: $this.val(),
-            lastValid: true,
-            lastFinished: true
-          };
-        },
-        validate: function ($this, value, validator) {
-          if (""+validator.lastValue === ""+value && validator.lastFinished === true) {
-            return validator.lastValid === false;
-          }
-
-          if (validator.lastFinished === true)
-          {
-            validator.lastValue = value;
-            validator.lastValid = true;
-            validator.lastFinished = false;
-            $.ajax({
-              url: validator.url,
-              data: "value=" + value + "&field=" + $this.attr("name"),
-              dataType: "json",
-              success: function (data) {
-                if (""+validator.lastValue === ""+data.value) {
-                  validator.lastValid = !!(data.valid);
-                  if (data.message) {
-                    validator.message = data.message;
-                  }
-                  validator.lastFinished = true;
-                  $this.data("validation" + validator.validatorName + "Message", validator.message);
-                  // Timeout is set to avoid problems with the events being considered 'already fired'
-                  setTimeout(function () {
-                    $this.trigger("change.validation");
-                  }, 1); // doesn't need a long timeout, just long enough for the event bubble to burst
-                }
-              },
-              failure: function () {
-                validator.lastValid = true;
-                validator.message = "ajax call failed";
-                validator.lastFinished = true;
-                $this.data("validation" + validator.validatorName + "Message", validator.message);
-                // Timeout is set to avoid problems with the events being considered 'already fired'
-                setTimeout(function () {
-                  $this.trigger("change.validation");
-                }, 1); // doesn't need a long timeout, just long enough for the event bubble to burst
-              }
-            });
-          }
-
-          return false;
-
-        }
-      },
-			regex: {
-				name: "regex",
-				init: function ($this, name) {
-					return {regex: regexFromString($this.data("validation" + name + "Regex"))};
-				},
-				validate: function ($this, value, validator) {
-					return (!validator.regex.test(value) && ! validator.negative)
-						|| (validator.regex.test(value) && validator.negative);
-				}
-			},
-			required: {
-				name: "required",
-				init: function ($this, name) {
-					return {};
-				},
-				validate: function ($this, value, validator) {
-					return !!(value.length === 0  && ! validator.negative)
-						|| !!(value.length > 0 && validator.negative);
-				},
-        blockSubmit: true
-			},
-			match: {
-				name: "match",
-				init: function ($this, name) {
-					var element = $this.parents("form").first().find("[name=\"" + $this.data("validation" + name + "Match") + "\"]").first();
-					element.bind("validation.validation", function () {
-						$this.trigger("change.validation", {submitting: true});
-					});
-					return {"element": element};
-				},
-				validate: function ($this, value, validator) {
-					return (value !== validator.element.val() && ! validator.negative)
-						|| (value === validator.element.val() && validator.negative);
-				},
-        blockSubmit: true
-			},
-			max: {
-				name: "max",
-				init: function ($this, name) {
-					return {max: $this.data("validation" + name + "Max")};
-				},
-				validate: function ($this, value, validator) {
-					return (parseFloat(value, 10) > parseFloat(validator.max, 10) && ! validator.negative)
-						|| (parseFloat(value, 10) <= parseFloat(validator.max, 10) && validator.negative);
-				}
-			},
-			min: {
-				name: "min",
-				init: function ($this, name) {
-					return {min: $this.data("validation" + name + "Min")};
-				},
-				validate: function ($this, value, validator) {
-					return (parseFloat(value) < parseFloat(validator.min) && ! validator.negative)
-						|| (parseFloat(value) >= parseFloat(validator.min) && validator.negative);
-				}
-			},
-			maxlength: {
-				name: "maxlength",
-				init: function ($this, name) {
-					return {maxlength: $this.data("validation" + name + "Maxlength")};
-				},
-				validate: function ($this, value, validator) {
-					return ((value.length > validator.maxlength) && ! validator.negative)
-						|| ((value.length <= validator.maxlength) && validator.negative);
-				}
-			},
-			minlength: {
-				name: "minlength",
-				init: function ($this, name) {
-					return {minlength: $this.data("validation" + name + "Minlength")};
-				},
-				validate: function ($this, value, validator) {
-					return ((value.length < validator.minlength) && ! validator.negative)
-						|| ((value.length >= validator.minlength) && validator.negative);
-				}
-			},
-			maxchecked: {
-				name: "maxchecked",
-				init: function ($this, name) {
-					var elements = $this.parents("form").first().find("[name=\"" + $this.attr("name") + "\"]");
-					elements.bind("click.validation", function () {
-						$this.trigger("change.validation", {includeEmpty: true});
-					});
-					return {maxchecked: $this.data("validation" + name + "Maxchecked"), elements: elements};
-				},
-				validate: function ($this, value, validator) {
-					return (validator.elements.filter(":checked").length > validator.maxchecked && ! validator.negative)
-						|| (validator.elements.filter(":checked").length <= validator.maxchecked && validator.negative);
-				},
-        blockSubmit: true
-			},
-			minchecked: {
-				name: "minchecked",
-				init: function ($this, name) {
-					var elements = $this.parents("form").first().find("[name=\"" + $this.attr("name") + "\"]");
-					elements.bind("click.validation", function () {
-						$this.trigger("change.validation", {includeEmpty: true});
-					});
-					return {minchecked: $this.data("validation" + name + "Minchecked"), elements: elements};
-				},
-				validate: function ($this, value, validator) {
-					return (validator.elements.filter(":checked").length < validator.minchecked && ! validator.negative)
-						|| (validator.elements.filter(":checked").length >= validator.minchecked && validator.negative);
-				},
-        blockSubmit: true
-			}
-		},
-		builtInValidators: {
-			email: {
-				name: "Email",
-				type: "shortcut",
-				shortcut: "validemail"
-			},
-			validemail: {
-				name: "Validemail",
-				type: "regex",
-				regex: "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\\.[A-Za-z]{2,4}",
-				message: "Not a valid email address<!-- data-validator-validemail-message to override -->"
-			},
-			passwordagain: {
-				name: "Passwordagain",
-				type: "match",
-				match: "password",
-				message: "Does not match the given password<!-- data-validator-paswordagain-message to override -->"
-			},
-			positive: {
-				name: "Positive",
-				type: "shortcut",
-				shortcut: "number,positivenumber"
-			},
-			negative: {
-				name: "Negative",
-				type: "shortcut",
-				shortcut: "number,negativenumber"
-			},
-			number: {
-				name: "Number",
-				type: "regex",
-				regex: "([+-]?\\\d+(\\\.\\\d*)?([eE][+-]?[0-9]+)?)?",
-				message: "Must be a number<!-- data-validator-number-message to override -->"
-			},
-			integer: {
-				name: "Integer",
-				type: "regex",
-				regex: "[+-]?\\\d+",
-				message: "No decimal places allowed<!-- data-validator-integer-message to override -->"
-			},
-			positivenumber: {
-				name: "Positivenumber",
-				type: "min",
-				min: 0,
-				message: "Must be a positive number<!-- data-validator-positivenumber-message to override -->"
-			},
-			negativenumber: {
-				name: "Negativenumber",
-				type: "max",
-				max: 0,
-				message: "Must be a negative number<!-- data-validator-negativenumber-message to override -->"
-			},
-			required: {
-				name: "Required",
-				type: "required",
-				message: "This is required<!-- data-validator-required-message to override -->"
-			},
-			checkone: {
-				name: "Checkone",
-				type: "minchecked",
-				minchecked: 1,
-				message: "Check at least one option<!-- data-validation-checkone-message to override -->"
-			}
-		}
-	};
-
-	var formatValidatorName = function (name) {
-		return name
-			.toLowerCase()
-			.replace(
-				/(^|\s)([a-z])/g ,
-				function(m,p1,p2) {
-					return p1+p2.toUpperCase();
-				}
-			)
-		;
-	};
-
-	var getValue = function ($this) {
-		// Extract the value we're talking about
-		var value = $this.val();
-		var type = $this.attr("type");
-		if (type === "checkbox") {
-			value = ($this.is(":checked") ? value : "");
-		}
-		if (type === "radio") {
-			value = ($('input[name="' + $this.attr("name") + '"]:checked').length > 0 ? value : "");
-		}
-		return value;
-	};
-
-  function regexFromString(inputstring) {
-		return new RegExp("^" + inputstring + "$");
-	}
-
-  /**
-   * Thanks to Jason Bunting via StackOverflow.com
-   *
-   * http://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string#answer-359910
-   * Short link: http://tinyurl.com/executeFunctionByName
-  **/
-  function executeFunctionByName(functionName, context /*, args*/) {
-    var args = Array.prototype.slice.call(arguments).splice(2);
-    var namespaces = functionName.split(".");
-    var func = namespaces.pop();
-    for(var i = 0; i < namespaces.length; i++) {
-      context = context[namespaces[i]];
-    }
-    return context[func].apply(this, args);
-  }
-
-	$.fn.jqBootstrapValidation = function( method ) {
-
-		if ( defaults.methods[method] ) {
-			return defaults.methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
-		} else if ( typeof method === 'object' || ! method ) {
-			return defaults.methods.init.apply( this, arguments );
-		} else {
-		$.error( 'Method ' +  method + ' does not exist on jQuery.jqBootstrapValidation' );
-			return null;
-		}
-
-	};
-
-  $.jqBootstrapValidation = function (options) {
-    $(":input").not("[type=image],[type=submit]").jqBootstrapValidation.apply(this,arguments);
-  };
-
-})( jQuery );

+ 0 - 3
bakerydemo/templates/base.html

@@ -41,9 +41,6 @@
     <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
     <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
 
-    <!-- Theme JavaScript -->
-    <script src="{% static 'js/clean-blog.min.js' %}"></script>
-
 </body>
 
 </html>

+ 0 - 8
bakerydemo/templates/base/home_page.html

@@ -118,11 +118,3 @@
 </div>
 </div>
 {% endblock content %}
-
-HERO
-----
-promo | bread
------
-Blog x3
------
-Location x 6

+ 0 - 2
bakerydemo/templates/blocks/blockquote.html

@@ -1,7 +1,5 @@
 {% load wagtailimages_tags %}
 
-
 <blockquote><p class="text">{{ self.text }}</p>
 <footer><p class="attribute_name">{{ self.attribute_name}}</p></footer>
 </blockquote>
-

+ 5 - 5
bakerydemo/templates/blocks/heading_block.html

@@ -1,3 +1,8 @@
+{% comment %}
+    Content is coming from the StandardBlock StreamField
+    class within `blocks.py`
+{% endcomment %}
+
 {% if self.size == 'h2' %}
         <h2>{{ self.heading_text }}</h2>
 
@@ -8,8 +13,3 @@
         <h4>{{ self.heading_text }}</h4>
 
 {% endif %}
-
-{% comment %}
-    Content is coming from the StandardBlock StreamField
-    class within `blocks.py`
-{% endcomment %}

+ 31 - 30
bakerydemo/templates/blog/blog_page.html

@@ -3,41 +3,42 @@
 
 {% block content %}
 
-{% image self.image fill-1920x600 as hero_img %}
-    {% include "base/include/header-hero.html" %}
+    {% image self.image fill-1920x600 as hero_img %}
+        {% include "base/include/header-hero.html" %}
 
-<div class="container">
-    <div class="row">
-        <div class="col-md-8">
-            {% if page.introduction %}
-                <p class="intro">{{ page.introduction }}</p>
-            {% endif %}
+    <div class="container">
+        <div class="row">
+            <div class="col-md-8">
+                {% if page.introduction %}
+                    <p class="intro">{{ page.introduction }}</p>
+                {% endif %}
 
-            <div class="blog-meta">
-                {% if page.authors %}
-                <div class="blog-avatars">
-                    {% for author in page.authors %}
-                        <div class="author">{% image author.image fill-50x50-c100 class="blog-avatar" %} {{ author.first_name }} {{ author.last_name }}</div>
-                    {% endfor %}
+                <div class="blog-meta">
+                    {% if page.authors %}
+                        <div class="blog-avatars">
+                            {% for author in page.authors %}
+                                <div class="author">{% image author.image fill-50x50-c100 class="blog-avatar" %}
+                                    {{ author.first_name }} {{ author.last_name }}</div>
+                            {% endfor %}
+                        </div>
+                    {% endif %}
+
+                    {% if page.date_published %}
+                        <div class="blog-byline">
+                            {{ page.date_published }}
+                        </div>
+                    {% endif %}
                 </div>
-                {% endif %}
-                
-                {% if page.date_published %}
-                    <div class="blog-byline">
-                        {{ page.date_published }}
-                    </div>
-                {% endif %}
-            </div>
 
-            {{ page.body }}
+                {{ page.body }}
 
-            {% if page.get_tags %}
-                Tagged with:<br />
-                {% for tag in page.get_tags  %}
-                    <a href="{{ tag.url }}" class="btn btn-sm">{{ tag }}</a>
-                {% endfor %}
-            {% endif %}
+                {% if page.get_tags %}
+                    Tagged with:<br />
+                    {% for tag in page.get_tags  %}
+                        <a href="{{ tag.url }}" class="btn btn-sm">{{ tag }}</a>
+                    {% endfor %}
+                {% endif %}
+            </div>
         </div>
     </div>
-</div>
 {% endblock content %}

+ 49 - 52
bakerydemo/templates/breads/bread_page.html

@@ -2,66 +2,63 @@
 {% load wagtailimages_tags %}
 
 {% block content %}
-<div class="container bread-detail">
-    <div class="row">
-        <div class="col-md-12">
-            <div class="col-md-6">
-                <div class="row">
-                    <h1>{{ page.title }}</h1>
-                    
-                    <figure class="hidden-md-up">
-                        {% image page.image width-500 %}
-                    </figure>
-                    
-                    {% if page.introduction %}
-                        <p class="introduction">
-                            {{ page.introduction }}
-                        </p>
-                    {% endif %}
+    <div class="container bread-detail">
+        <div class="row">
+            <div class="col-md-12">
+                <div class="col-md-6">
+                    <div class="row">
+                        <h1>{{ page.title }}</h1>
 
-                    {{ page.body }}
-                </div>
-            </div>
+                        <figure class="hidden-md-up">
+                            {% image page.image width-500 %}
+                        </figure>
 
-            <div class="col-md-5 col-md-offset-1">
-                <div class="row">
-                    <figure class="hidden-md-down">
-                        {% image page.image width-500 %}
-                    </figure>
-                    <ul class="bread-meta">
-                        {% if page.origin %}
-                            <li>
-                                <h4>Origin</h4>
-                                <p>{{ page.origin }}</p>
-                            </li>
-                        {% endif %}
-                        {% if page.bread_type %}
-                            <li>
-                                <h4>Type</h4>
-                                <p>{{ page.bread_type }}</p>
-                            </li>      
+                        {% if page.introduction %}
+                            <p class="introduction">
+                                {{ page.introduction }}
+                            </p>
                         {% endif %}
-                        {% with ingredients=page.ingredients.all %}
-                            {% if ingredients %}
+
+                        {{ page.body }}
+                    </div>
+                </div>
+
+                <div class="col-md-5 col-md-offset-1">
+                    <div class="row">
+                        <figure class="hidden-md-down">
+                            {% image page.image width-500 %}
+                        </figure>
+                        <ul class="bread-meta">
+                            {% if page.origin %}
                                 <li>
-                                    <h4>Ingredients</h4>
-                                    <ul>
-                                        {% for ingredient in ingredients %}
-                                            <li>
-                                                {{ ingredient.name }}
-                                            </li>
-                                        {% endfor %}
-                                    </ul>
+                                    <h4>Origin</h4>
+                                    <p>{{ page.origin }}</p>
                                 </li>
                             {% endif %}
-                        {% endwith %}
-                    </ul>
+                            {% if page.bread_type %}
+                                <li>
+                                    <h4>Type</h4>
+                                    <p>{{ page.bread_type }}</p>
+                                </li>
+                            {% endif %}
+                            {% with ingredients=page.ingredients.all %}
+                                {% if ingredients %}
+                                    <li>
+                                        <h4>Ingredients</h4>
+                                        <ul>
+                                            {% for ingredient in ingredients %}
+                                                <li>
+                                                    {{ ingredient.name }}
+                                                </li>
+                                            {% endfor %}
+                                        </ul>
+                                    </li>
+                                {% endif %}
+                            {% endwith %}
+                        </ul>
+                    </div>
                 </div>
             </div>
         </div>
-
-
-        </div>
     </div>
-</div>
 {% endblock content %}

+ 26 - 28
bakerydemo/templates/breads/breads_index_page.html

@@ -2,27 +2,27 @@
 {% load wagtailcore_tags navigation_tags wagtailimages_tags %}
 
 {% block content %}
-<div class="container">
-    <div class="row">
-        <div class="col-md-12">
-            <h1>{{ page.title }}</h1>
-            <p>{{ page.introduction}}</p>
+    <div class="container">
+        <div class="row">
+            <div class="col-md-12">
+                <h1>{{ page.title }}</h1>
+                <p>{{ page.introduction}}</p>
+            </div>
         </div>
     </div>
-</div>
 
-<div class="container">
-    <div class="row bread-list">
-    {% for bread in breads %}
+    <div class="container">
+        <div class="row bread-list">
+        {% for bread in breads %}
             <div class="col-xs-12 col-md-6 bread-list-item">
-            
                 <div class="row">
                     <div class="col-xs-4 col-sm-4 image">
-                    <a href="{% pageurl bread %}">
-                        {% image bread.image fill-180x180-c100 as image %}
-                                        <img src="{{ image.url }}" width="{{ image.width }}" height="{{ image.height }}" alt="{{ image.alt }}" class="" />
-                        </div>
-                    </a>
+                        <a href="{% pageurl bread %}">
+                            {% image bread.image fill-180x180-c100 as image %}
+                            <img src="{{ image.url }}" width="{{ image.width }}"
+                                height="{{ image.height }}" alt="{{ image.alt }}" class="" />
+                        </a>
+                    </div>
                     <div class="col-xs-6 col-sm-7">
                         <a href="{% pageurl bread %}">
                             <h2>{{ bread.title }}</h2>
@@ -32,25 +32,23 @@
                             <li><span>Origin</span> {{ bread.origin }}</li>
                         {% endif %}
                         {% if bread.bread_type %}
-                            <li><span>Type</span> {{ bread.bread_type }}</li>        
+                            <li><span>Type</span> {{ bread.bread_type }}</li>
                         {% endif %}
                         </ul>
                     </div>
                 </div>
-            </a>
             </div>
-    {% endfor %}
+        {% endfor %}
+        </div>
     </div>
-</div>
 
-
-{% if breads.paginator.count > 1 %}
-<div class="container">
-    <div class="row">
-        <div class="col-md-12">
-        {% include "includes/pagination.html" with subpages=breads %}
+    {% if breads.paginator.count > 1 %}
+        <div class="container">
+            <div class="row">
+                <div class="col-md-12">
+                {% include "includes/pagination.html" with subpages=breads %}
+                </div>
+            </div>
         </div>
-    </div>
-</div>
-{% endif %}
+    {% endif %}
 {% endblock content %}

+ 1 - 0
bakerydemo/templates/includes/header.html

@@ -1,4 +1,5 @@
 {% load navigation_tags %}
+
 <div class="header clearfix" role="banner">
     <div class="container">
         <div class="row">

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است