├── .travis.yml
├── spring-boot-with-email
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── templates
│ │ │ │ ├── email
│ │ │ │ │ ├── email.pebble
│ │ │ │ │ └── confirmation.pebble
│ │ │ │ ├── sidebar.pebble
│ │ │ │ ├── footer.pebble
│ │ │ │ ├── panels
│ │ │ │ │ ├── groups-panel.pebble
│ │ │ │ │ ├── panel.pebble
│ │ │ │ │ ├── favorites-panel.pebble
│ │ │ │ │ └── friends-panel.pebble
│ │ │ │ ├── navbar.pebble
│ │ │ │ ├── profile.pebble
│ │ │ │ ├── home.pebble
│ │ │ │ └── base.pebble
│ │ │ ├── static
│ │ │ │ ├── images
│ │ │ │ │ ├── 1.jpg
│ │ │ │ │ ├── 2.jpg
│ │ │ │ │ ├── 3.jpg
│ │ │ │ │ ├── 4.jpg
│ │ │ │ │ ├── 5.jpg
│ │ │ │ │ ├── 6.jpg
│ │ │ │ │ ├── 7.jpg
│ │ │ │ │ └── 8.jpg
│ │ │ │ ├── css
│ │ │ │ │ └── style.css
│ │ │ │ └── js
│ │ │ │ │ └── bootstrap.min.js
│ │ │ └── log4j2.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ ├── controller
│ │ │ ├── EmailForm.java
│ │ │ ├── EmailController.java
│ │ │ ├── HomeController.java
│ │ │ └── ProfileController.java
│ │ │ ├── Application.java
│ │ │ ├── service
│ │ │ ├── EmailService.java
│ │ │ ├── UserService.java
│ │ │ └── PostService.java
│ │ │ └── data
│ │ │ ├── Post.java
│ │ │ └── User.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── example
│ │ └── ApplicationTest.java
└── pom.xml
├── java-config
├── src
│ └── main
│ │ ├── webapp
│ │ ├── resources
│ │ │ ├── images
│ │ │ │ ├── 1.jpg
│ │ │ │ ├── 2.jpg
│ │ │ │ ├── 3.jpg
│ │ │ │ ├── 4.jpg
│ │ │ │ ├── 5.jpg
│ │ │ │ ├── 6.jpg
│ │ │ │ ├── 7.jpg
│ │ │ │ └── 8.jpg
│ │ │ ├── css
│ │ │ │ └── style.css
│ │ │ └── js
│ │ │ │ └── bootstrap.min.js
│ │ └── WEB-INF
│ │ │ └── templates
│ │ │ ├── sidebar.html
│ │ │ ├── footer.html
│ │ │ ├── panels
│ │ │ ├── groups-panel.html
│ │ │ ├── panel.html
│ │ │ ├── favorites-panel.html
│ │ │ └── friends-panel.html
│ │ │ ├── navbar.html
│ │ │ ├── home.html
│ │ │ ├── profile.html
│ │ │ └── base.html
│ │ ├── resources
│ │ └── log4j2.xml
│ │ └── java
│ │ └── com
│ │ └── example
│ │ ├── controller
│ │ ├── HomeController.java
│ │ └── ProfileController.java
│ │ ├── data
│ │ ├── Post.java
│ │ └── User.java
│ │ ├── service
│ │ ├── UserService.java
│ │ └── PostService.java
│ │ └── config
│ │ ├── WebAppInitializer.java
│ │ └── MvcConfig.java
└── pom.xml
├── spring-boot
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── static
│ │ │ │ ├── images
│ │ │ │ │ ├── 1.jpg
│ │ │ │ │ ├── 2.jpg
│ │ │ │ │ ├── 3.jpg
│ │ │ │ │ ├── 4.jpg
│ │ │ │ │ ├── 5.jpg
│ │ │ │ │ ├── 6.jpg
│ │ │ │ │ ├── 7.jpg
│ │ │ │ │ └── 8.jpg
│ │ │ │ ├── css
│ │ │ │ │ └── style.css
│ │ │ │ └── js
│ │ │ │ │ └── bootstrap.min.js
│ │ │ ├── templates
│ │ │ │ ├── sidebar.pebble
│ │ │ │ ├── footer.pebble
│ │ │ │ ├── panels
│ │ │ │ │ ├── groups-panel.pebble
│ │ │ │ │ ├── panel.pebble
│ │ │ │ │ ├── favorites-panel.pebble
│ │ │ │ │ └── friends-panel.pebble
│ │ │ │ ├── navbar.pebble
│ │ │ │ ├── home.pebble
│ │ │ │ ├── profile.pebble
│ │ │ │ └── base.pebble
│ │ │ └── log4j2.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ ├── Application.java
│ │ │ ├── controller
│ │ │ ├── HomeController.java
│ │ │ └── ProfileController.java
│ │ │ ├── data
│ │ │ ├── Post.java
│ │ │ └── User.java
│ │ │ └── service
│ │ │ ├── UserService.java
│ │ │ └── PostService.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── example
│ │ └── ApplicationTest.java
└── pom.xml
├── xml-config
├── src
│ └── main
│ │ ├── webapp
│ │ ├── resources
│ │ │ ├── images
│ │ │ │ ├── 1.jpg
│ │ │ │ ├── 2.jpg
│ │ │ │ ├── 3.jpg
│ │ │ │ ├── 4.jpg
│ │ │ │ ├── 5.jpg
│ │ │ │ ├── 6.jpg
│ │ │ │ ├── 7.jpg
│ │ │ │ └── 8.jpg
│ │ │ ├── css
│ │ │ │ └── style.css
│ │ │ └── js
│ │ │ │ └── bootstrap.min.js
│ │ └── WEB-INF
│ │ │ ├── templates
│ │ │ ├── sidebar.html
│ │ │ ├── footer.html
│ │ │ ├── panels
│ │ │ │ ├── groups-panel.html
│ │ │ │ ├── panel.html
│ │ │ │ ├── favorites-panel.html
│ │ │ │ └── friends-panel.html
│ │ │ ├── navbar.html
│ │ │ ├── home.html
│ │ │ ├── profile.html
│ │ │ └── base.html
│ │ │ ├── web.xml
│ │ │ └── applicationContext.xml
│ │ ├── resources
│ │ └── log4j2.xml
│ │ └── java
│ │ └── com
│ │ └── example
│ │ ├── factory
│ │ ├── PebbleEngineFactory.java
│ │ └── ServletContextFactory.java
│ │ ├── controller
│ │ ├── HomeController.java
│ │ └── ProfileController.java
│ │ ├── data
│ │ ├── Post.java
│ │ └── User.java
│ │ └── service
│ │ ├── UserService.java
│ │ └── PostService.java
└── pom.xml
├── README.md
├── .gitignore
├── .gitattributes
├── LICENSE
└── pom.xml
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: java
2 | jdk:
3 | - openjdk8
4 | - openjdk11
5 |
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/templates/email/email.pebble:
--------------------------------------------------------------------------------
1 | This is a sample email with comment {{ comment }}
--------------------------------------------------------------------------------
/java-config/src/main/webapp/resources/images/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/java-config/src/main/webapp/resources/images/1.jpg
--------------------------------------------------------------------------------
/java-config/src/main/webapp/resources/images/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/java-config/src/main/webapp/resources/images/2.jpg
--------------------------------------------------------------------------------
/java-config/src/main/webapp/resources/images/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/java-config/src/main/webapp/resources/images/3.jpg
--------------------------------------------------------------------------------
/java-config/src/main/webapp/resources/images/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/java-config/src/main/webapp/resources/images/4.jpg
--------------------------------------------------------------------------------
/java-config/src/main/webapp/resources/images/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/java-config/src/main/webapp/resources/images/5.jpg
--------------------------------------------------------------------------------
/java-config/src/main/webapp/resources/images/6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/java-config/src/main/webapp/resources/images/6.jpg
--------------------------------------------------------------------------------
/java-config/src/main/webapp/resources/images/7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/java-config/src/main/webapp/resources/images/7.jpg
--------------------------------------------------------------------------------
/java-config/src/main/webapp/resources/images/8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/java-config/src/main/webapp/resources/images/8.jpg
--------------------------------------------------------------------------------
/spring-boot/src/main/resources/static/images/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/spring-boot/src/main/resources/static/images/1.jpg
--------------------------------------------------------------------------------
/spring-boot/src/main/resources/static/images/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/spring-boot/src/main/resources/static/images/2.jpg
--------------------------------------------------------------------------------
/spring-boot/src/main/resources/static/images/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/spring-boot/src/main/resources/static/images/3.jpg
--------------------------------------------------------------------------------
/spring-boot/src/main/resources/static/images/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/spring-boot/src/main/resources/static/images/4.jpg
--------------------------------------------------------------------------------
/spring-boot/src/main/resources/static/images/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/spring-boot/src/main/resources/static/images/5.jpg
--------------------------------------------------------------------------------
/spring-boot/src/main/resources/static/images/6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/spring-boot/src/main/resources/static/images/6.jpg
--------------------------------------------------------------------------------
/spring-boot/src/main/resources/static/images/7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/spring-boot/src/main/resources/static/images/7.jpg
--------------------------------------------------------------------------------
/spring-boot/src/main/resources/static/images/8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/spring-boot/src/main/resources/static/images/8.jpg
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/resources/images/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/xml-config/src/main/webapp/resources/images/1.jpg
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/resources/images/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/xml-config/src/main/webapp/resources/images/2.jpg
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/resources/images/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/xml-config/src/main/webapp/resources/images/3.jpg
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/resources/images/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/xml-config/src/main/webapp/resources/images/4.jpg
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/resources/images/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/xml-config/src/main/webapp/resources/images/5.jpg
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/resources/images/6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/xml-config/src/main/webapp/resources/images/6.jpg
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/resources/images/7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/xml-config/src/main/webapp/resources/images/7.jpg
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/resources/images/8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/xml-config/src/main/webapp/resources/images/8.jpg
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | pebble-example-spring
2 | =====================
3 |
4 | **NO LONGER SUPPORTED.** Please use [spring-petclinic](https://github.com/PebbleTemplates/spring-petclinic) instead
5 |
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/static/images/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/spring-boot-with-email/src/main/resources/static/images/1.jpg
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/static/images/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/spring-boot-with-email/src/main/resources/static/images/2.jpg
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/static/images/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/spring-boot-with-email/src/main/resources/static/images/3.jpg
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/static/images/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/spring-boot-with-email/src/main/resources/static/images/4.jpg
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/static/images/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/spring-boot-with-email/src/main/resources/static/images/5.jpg
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/static/images/6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/spring-boot-with-email/src/main/resources/static/images/6.jpg
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/static/images/7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/spring-boot-with-email/src/main/resources/static/images/7.jpg
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/static/images/8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PebbleTemplates/pebble-example-spring/HEAD/spring-boot-with-email/src/main/resources/static/images/8.jpg
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/templates/email/confirmation.pebble:
--------------------------------------------------------------------------------
1 | {% extends 'base' %}
2 | {% set activeNav = 'home' %}
3 |
4 | {% block content %}
5 | Email was sent successfully
6 | {% endblock content%}
--------------------------------------------------------------------------------
/java-config/src/main/webapp/WEB-INF/templates/sidebar.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spring-boot/src/main/resources/templates/sidebar.pebble:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/WEB-INF/templates/sidebar.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/templates/sidebar.pebble:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/java-config/src/main/webapp/WEB-INF/templates/footer.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spring-boot/src/main/resources/templates/footer.pebble:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/WEB-INF/templates/footer.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/templates/footer.pebble:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 |
3 | # Package Files #
4 | *.jar
5 | *.war
6 | *.ear
7 |
8 | # Mac OS X
9 | .DS_Store
10 |
11 | # Eclipse #
12 | .project
13 | .classpath
14 | .settings/
15 |
16 | # IntelliJ
17 | .idea/
18 | *.iml
19 | *.ipr
20 | *.iws
21 |
22 | target/*
23 | /target
24 | /bin/
25 |
--------------------------------------------------------------------------------
/spring-boot/src/test/java/com/example/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.example;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class ApplicationTest {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-with-email/src/test/java/com/example/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.example;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class ApplicationTest {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/java/com/example/controller/EmailForm.java:
--------------------------------------------------------------------------------
1 | package com.example.controller;
2 |
3 | public class EmailForm {
4 |
5 | private String comment;
6 |
7 | public String getComment() {
8 | return this.comment;
9 | }
10 |
11 | public void setComment(String comment) {
12 | this.comment = comment;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/spring-boot/src/main/java/com/example/Application.java:
--------------------------------------------------------------------------------
1 | package com.example;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/java/com/example/Application.java:
--------------------------------------------------------------------------------
1 | package com.example;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot/src/main/resources/log4j2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/java-config/src/main/resources/log4j2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/xml-config/src/main/resources/log4j2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/log4j2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/spring-boot/src/main/resources/templates/panels/groups-panel.pebble:
--------------------------------------------------------------------------------
1 | {% extends 'panels/panel' %}
2 |
3 | {% block title %} Groups {% endblock %}
4 |
5 | {% block navItems %}
6 | {# The panelNavigation macro is located in the parent template #}
7 | {{ panelNavigation('home#highschool', 'High School') }}
8 | {{ panelNavigation('home#university', 'University Club') }}
9 | {{ panelNavigation('home#programming', 'Programming Club') }}
10 | {% endblock %}
--------------------------------------------------------------------------------
/java-config/src/main/webapp/WEB-INF/templates/panels/groups-panel.html:
--------------------------------------------------------------------------------
1 | {% extends 'panels/panel' %}
2 |
3 | {% block title %} Groups {% endblock %}
4 |
5 | {% block navItems %}
6 | {# The panelNavigation macro is located in the parent template #}
7 | {{ panelNavigation('home#highschool', 'High School') }}
8 | {{ panelNavigation('home#university', 'University Club') }}
9 | {{ panelNavigation('home#programming', 'Programming Club') }}
10 | {% endblock %}
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/WEB-INF/templates/panels/groups-panel.html:
--------------------------------------------------------------------------------
1 | {% extends 'panels/panel' %}
2 |
3 | {% block title %} Groups {% endblock %}
4 |
5 | {% block navItems %}
6 | {# The panelNavigation macro is located in the parent template #}
7 | {{ panelNavigation('home#highschool', 'High School') }}
8 | {{ panelNavigation('home#university', 'University Club') }}
9 | {{ panelNavigation('home#programming', 'Programming Club') }}
10 | {% endblock %}
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/templates/panels/groups-panel.pebble:
--------------------------------------------------------------------------------
1 | {% extends 'panels/panel' %}
2 |
3 | {% block title %} Groups {% endblock %}
4 |
5 | {% block navItems %}
6 | {# The panelNavigation macro is located in the parent template #}
7 | {{ panelNavigation('home#highschool', 'High School') }}
8 | {{ panelNavigation('home#university', 'University Club') }}
9 | {{ panelNavigation('home#programming', 'Programming Club') }}
10 | {% endblock %}
--------------------------------------------------------------------------------
/java-config/src/main/webapp/WEB-INF/templates/panels/panel.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{% block title %}{% endblock %}
4 |
5 |
6 |
7 |
8 | {% block navItems %}{% endblock %}
9 |
10 |
11 |
12 |
13 | {% macro panelNavigation(href, name) %}
14 | {{ name }}
15 | {% endmacro %}
--------------------------------------------------------------------------------
/spring-boot/src/main/resources/templates/panels/panel.pebble:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{% block title %}{% endblock %}
4 |
5 |
6 |
7 |
8 | {% block navItems %}{% endblock %}
9 |
10 |
11 |
12 |
13 | {% macro panelNavigation(href, name) %}
14 | {{ name }}
15 | {% endmacro %}
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/WEB-INF/templates/panels/panel.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{% block title %}{% endblock %}
4 |
5 |
6 |
7 |
8 | {% block navItems %}{% endblock %}
9 |
10 |
11 |
12 |
13 | {% macro panelNavigation(href, name) %}
14 | {{ name }}
15 | {% endmacro %}
--------------------------------------------------------------------------------
/spring-boot/src/main/resources/templates/panels/favorites-panel.pebble:
--------------------------------------------------------------------------------
1 | {% extends 'panels/panel' %}
2 |
3 | {% block title %} Favorites {% endblock %}
4 |
5 | {% block navItems %}
6 | {# The panelNavigation macro is located in the parent template #}
7 | {{ panelNavigation('home#news', 'News Feed') }}
8 | {{ panelNavigation('home#messages', 'Mesages') }}
9 | {{ panelNavigation('home#events', 'Events') }}
10 | {{ panelNavigation('home#photos', 'Photos') }}
11 | {% endblock %}
--------------------------------------------------------------------------------
/java-config/src/main/webapp/WEB-INF/templates/panels/favorites-panel.html:
--------------------------------------------------------------------------------
1 | {% extends 'panels/panel' %}
2 |
3 | {% block title %} Favorites {% endblock %}
4 |
5 | {% block navItems %}
6 | {# The panelNavigation macro is located in the parent template #}
7 | {{ panelNavigation('home#news', 'News Feed') }}
8 | {{ panelNavigation('home#messages', 'Mesages') }}
9 | {{ panelNavigation('home#events', 'Events') }}
10 | {{ panelNavigation('home#photos', 'Photos') }}
11 | {% endblock %}
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/templates/panels/panel.pebble:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{% block title %}{% endblock %}
4 |
5 |
6 |
7 |
8 | {% block navItems %}{% endblock %}
9 |
10 |
11 |
12 |
13 | {% macro panelNavigation(href, name) %}
14 | {{ name }}
15 | {% endmacro %}
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/WEB-INF/templates/panels/favorites-panel.html:
--------------------------------------------------------------------------------
1 | {% extends 'panels/panel' %}
2 |
3 | {% block title %} Favorites {% endblock %}
4 |
5 | {% block navItems %}
6 | {# The panelNavigation macro is located in the parent template #}
7 | {{ panelNavigation('home#news', 'News Feed') }}
8 | {{ panelNavigation('home#messages', 'Mesages') }}
9 | {{ panelNavigation('home#events', 'Events') }}
10 | {{ panelNavigation('home#photos', 'Photos') }}
11 | {% endblock %}
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/templates/panels/favorites-panel.pebble:
--------------------------------------------------------------------------------
1 | {% extends 'panels/panel' %}
2 |
3 | {% block title %} Favorites {% endblock %}
4 |
5 | {% block navItems %}
6 | {# The panelNavigation macro is located in the parent template #}
7 | {{ panelNavigation('home#news', 'News Feed') }}
8 | {{ panelNavigation('home#messages', 'Mesages') }}
9 | {{ panelNavigation('home#events', 'Events') }}
10 | {{ panelNavigation('home#photos', 'Photos') }}
11 | {% endblock %}
--------------------------------------------------------------------------------
/spring-boot/src/main/resources/templates/panels/friends-panel.pebble:
--------------------------------------------------------------------------------
1 | {% extends 'panels/panel' %}
2 |
3 | {% block title %} Friends {% endblock %}
4 |
5 | {% block navItems %}
6 | {# The panelNavigation macro is located in the parent template #}
7 | {{ panelNavigation('home#family', 'Family') }}
8 | {{ panelNavigation('home#coworkers', 'Coworkers') }}
9 | {{ panelNavigation('home#acquaintances', 'Acquaintances') }}
10 | {{ panelNavigation('home#bestfriends', 'Best Friends') }}
11 | {% endblock %}
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/WEB-INF/templates/panels/friends-panel.html:
--------------------------------------------------------------------------------
1 | {% extends 'panels/panel' %}
2 |
3 | {% block title %} Friends {% endblock %}
4 |
5 | {% block navItems %}
6 | {# The panelNavigation macro is located in the parent template #}
7 | {{ panelNavigation('home#family', 'Family') }}
8 | {{ panelNavigation('home#coworkers', 'Coworkers') }}
9 | {{ panelNavigation('home#acquaintances', 'Acquaintances') }}
10 | {{ panelNavigation('home#bestfriends', 'Best Friends') }}
11 | {% endblock %}
--------------------------------------------------------------------------------
/java-config/src/main/webapp/WEB-INF/templates/panels/friends-panel.html:
--------------------------------------------------------------------------------
1 | {% extends 'panels/panel' %}
2 |
3 | {% block title %} Friends {% endblock %}
4 |
5 | {% block navItems %}
6 | {# The panelNavigation macro is located in the parent template #}
7 | {{ panelNavigation('home#family', 'Family') }}
8 | {{ panelNavigation('home#coworkers', 'Coworkers') }}
9 | {{ panelNavigation('home#acquaintances', 'Acquaintances') }}
10 | {{ panelNavigation('home#bestfriends', 'Best Friends') }}
11 | {% endblock %}
--------------------------------------------------------------------------------
/java-config/src/main/webapp/resources/css/style.css:
--------------------------------------------------------------------------------
1 | .muted{ color: #999; }
2 | .container .credit { margin:20px 0;}
3 | #wrap { padding-top:60px; }
4 | #footer { background-color: #f5f5f5; height:60px;}
5 |
6 | .news-item { margin-top:20px; padding-bottom:20px; border-bottom: 1px solid #efefef; }
7 |
8 | p.like-count { margin-top:30px; font-size:12px; color:#ccc; margin-bottom:0px;}
9 | .comments{ background: #edeff4; padding:10px; }
10 | .comments input { border:1px solid #ddd; padding:3px 5px; width:100%;}
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/resources/css/style.css:
--------------------------------------------------------------------------------
1 | .muted{ color: #999; }
2 | .container .credit { margin:20px 0;}
3 | #wrap { padding-top:60px; }
4 | #footer { background-color: #f5f5f5; height:60px;}
5 |
6 | .news-item { margin-top:20px; padding-bottom:20px; border-bottom: 1px solid #efefef; }
7 |
8 | p.like-count { margin-top:30px; font-size:12px; color:#ccc; margin-bottom:0px;}
9 | .comments{ background: #edeff4; padding:10px; }
10 | .comments input { border:1px solid #ddd; padding:3px 5px; width:100%;}
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/templates/panels/friends-panel.pebble:
--------------------------------------------------------------------------------
1 | {% extends 'panels/panel' %}
2 |
3 | {% block title %} Friends {% endblock %}
4 |
5 | {% block navItems %}
6 | {# The panelNavigation macro is located in the parent template #}
7 | {{ panelNavigation('home#family', 'Family') }}
8 | {{ panelNavigation('home#coworkers', 'Coworkers') }}
9 | {{ panelNavigation('home#acquaintances', 'Acquaintances') }}
10 | {{ panelNavigation('home#bestfriends', 'Best Friends') }}
11 | {% endblock %}
--------------------------------------------------------------------------------
/xml-config/src/main/java/com/example/factory/PebbleEngineFactory.java:
--------------------------------------------------------------------------------
1 | package com.example.factory;
2 |
3 | import com.mitchellbosecke.pebble.PebbleEngine;
4 | import com.mitchellbosecke.pebble.loader.Loader;
5 | import com.mitchellbosecke.pebble.spring4.extension.SpringExtension;
6 |
7 | public class PebbleEngineFactory {
8 |
9 | public static PebbleEngine instance(Loader> loader, SpringExtension springExtension) {
10 | return new PebbleEngine.Builder().loader(loader).extension(springExtension).build();
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 | *.sln merge=union
7 | *.csproj merge=union
8 | *.vbproj merge=union
9 | *.fsproj merge=union
10 | *.dbproj merge=union
11 |
12 | # Standard to msysgit
13 | *.doc diff=astextplain
14 | *.DOC diff=astextplain
15 | *.docx diff=astextplain
16 | *.DOCX diff=astextplain
17 | *.dot diff=astextplain
18 | *.DOT diff=astextplain
19 | *.pdf diff=astextplain
20 | *.PDF diff=astextplain
21 | *.rtf diff=astextplain
22 | *.RTF diff=astextplain
23 |
--------------------------------------------------------------------------------
/spring-boot/src/main/resources/templates/navbar.pebble:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/WEB-INF/templates/navbar.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/java-config/src/main/webapp/WEB-INF/templates/navbar.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/java/com/example/controller/EmailController.java:
--------------------------------------------------------------------------------
1 | package com.example.controller;
2 |
3 | import com.example.service.EmailService;
4 | import org.springframework.stereotype.Controller;
5 | import org.springframework.web.bind.annotation.PostMapping;
6 |
7 | @Controller
8 | public class EmailController {
9 |
10 | private final EmailService emailService;
11 |
12 | public EmailController(EmailService emailService) {
13 | this.emailService = emailService;
14 | }
15 |
16 | @PostMapping("/emails")
17 | public String sendEmail(EmailForm emailForm) {
18 | this.emailService.sendEmail(emailForm.getComment());
19 | return "email/confirmation";
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/templates/navbar.pebble:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spring-boot/src/main/resources/static/css/style.css:
--------------------------------------------------------------------------------
1 | .muted {
2 | color: #999;
3 | }
4 |
5 | .container .credit {
6 | margin: 20px 0;
7 | }
8 |
9 | #wrap {
10 | padding-top: 60px;
11 | }
12 |
13 | #footer {
14 | background-color: #f5f5f5;
15 | height: 60px;
16 | }
17 |
18 | .news-item {
19 | margin-top: 20px;
20 | padding-bottom: 20px;
21 | border-bottom: 1px solid #efefef;
22 | }
23 |
24 | p.like-count {
25 | margin-top: 30px;
26 | font-size: 12px;
27 | color: #ccc;
28 | margin-bottom: 0px;
29 | }
30 |
31 | .comments {
32 | background: #edeff4;
33 | padding: 10px;
34 | }
35 |
36 | .comments input {
37 | border: 1px solid #ddd;
38 | padding: 3px 5px;
39 | width: 100%;
40 | }
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/static/css/style.css:
--------------------------------------------------------------------------------
1 | .muted {
2 | color: #999;
3 | }
4 |
5 | .container .credit {
6 | margin: 20px 0;
7 | }
8 |
9 | #wrap {
10 | padding-top: 60px;
11 | }
12 |
13 | #footer {
14 | background-color: #f5f5f5;
15 | height: 60px;
16 | }
17 |
18 | .news-item {
19 | margin-top: 20px;
20 | padding-bottom: 20px;
21 | border-bottom: 1px solid #efefef;
22 | }
23 |
24 | p.like-count {
25 | margin-top: 30px;
26 | font-size: 12px;
27 | color: #ccc;
28 | margin-bottom: 0px;
29 | }
30 |
31 | .comments {
32 | background: #edeff4;
33 | padding: 10px;
34 | }
35 |
36 | .comments input {
37 | border: 1px solid #ddd;
38 | padding: 3px 5px;
39 | width: 100%;
40 | }
--------------------------------------------------------------------------------
/spring-boot/src/main/java/com/example/controller/HomeController.java:
--------------------------------------------------------------------------------
1 | package com.example.controller;
2 |
3 | import com.example.service.PostService;
4 | import org.springframework.stereotype.Controller;
5 | import org.springframework.ui.Model;
6 | import org.springframework.web.bind.annotation.GetMapping;
7 |
8 | @Controller
9 | public class HomeController {
10 |
11 | private final PostService postService;
12 |
13 | public HomeController(PostService postService) {
14 | this.postService = postService;
15 | }
16 |
17 | @GetMapping({"/", "/home"})
18 | public String getUserListing(Model model) {
19 | model.addAttribute("posts", this.postService.getPosts());
20 | return "home";
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/java/com/example/controller/HomeController.java:
--------------------------------------------------------------------------------
1 | package com.example.controller;
2 |
3 | import com.example.service.PostService;
4 | import org.springframework.stereotype.Controller;
5 | import org.springframework.ui.Model;
6 | import org.springframework.web.bind.annotation.GetMapping;
7 |
8 | @Controller
9 | public class HomeController {
10 |
11 | private final PostService postService;
12 |
13 | public HomeController(PostService postService) {
14 | this.postService = postService;
15 | }
16 |
17 | @GetMapping({"/", "/home"})
18 | public String getUserListing(Model model) {
19 | model.addAttribute("posts", this.postService.getPosts());
20 | return "home";
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/spring-boot/src/main/java/com/example/controller/ProfileController.java:
--------------------------------------------------------------------------------
1 | package com.example.controller;
2 |
3 | import com.example.service.UserService;
4 | import org.springframework.stereotype.Controller;
5 | import org.springframework.ui.Model;
6 | import org.springframework.web.bind.annotation.GetMapping;
7 | import org.springframework.web.bind.annotation.RequestParam;
8 |
9 | @Controller
10 | public class ProfileController {
11 |
12 | private final UserService userService;
13 |
14 | public ProfileController(UserService userService) {
15 | this.userService = userService;
16 | }
17 |
18 | @GetMapping(value = "/profile")
19 | public String getUserProfile(@RequestParam("id") long id, Model model) {
20 | model.addAttribute("user", this.userService.getUser(id));
21 | return "profile";
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/java/com/example/controller/ProfileController.java:
--------------------------------------------------------------------------------
1 | package com.example.controller;
2 |
3 | import com.example.service.UserService;
4 | import org.springframework.stereotype.Controller;
5 | import org.springframework.ui.Model;
6 | import org.springframework.web.bind.annotation.GetMapping;
7 | import org.springframework.web.bind.annotation.RequestParam;
8 |
9 | @Controller
10 | public class ProfileController {
11 |
12 | private final UserService userService;
13 |
14 | public ProfileController(UserService userService) {
15 | this.userService = userService;
16 | }
17 |
18 | @GetMapping(value = "/profile")
19 | public String getUserProfile(@RequestParam("id") long id, Model model) {
20 | model.addAttribute("user", this.userService.getUser(id));
21 | return "profile";
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/spring-boot/src/main/resources/templates/home.pebble:
--------------------------------------------------------------------------------
1 | {% extends 'base' %}
2 | {% set activeNav = 'home' %}
3 |
4 | {% block content %}
5 |
6 | {% for post in posts %}
7 |
8 |
13 |
14 |
15 |
{{ post.details }}
16 |
{{ post.likes }} likes
17 |
20 |
21 |
22 | {% endfor %}
23 |
24 | {% endblock content%}
--------------------------------------------------------------------------------
/java-config/src/main/webapp/WEB-INF/templates/home.html:
--------------------------------------------------------------------------------
1 | {% extends 'base' %}
2 | {% set activeNav = 'home' %}
3 |
4 | {% block content %}
5 |
6 | {% for post in posts %}
7 |
8 |
13 |
14 |
15 |
{{ post.details }}
16 |
{{ post.likes }} likes
17 |
20 |
21 |
22 | {% endfor %}
23 |
24 | {% endblock content%}
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/WEB-INF/templates/home.html:
--------------------------------------------------------------------------------
1 | {% extends 'base' %}
2 | {% set activeNav = 'home' %}
3 |
4 | {% block content %}
5 |
6 | {% for post in posts %}
7 |
8 |
13 |
14 |
15 |
{{ post.details }}
16 |
{{ post.likes }} likes
17 |
20 |
21 |
22 | {% endfor %}
23 |
24 | {% endblock content%}
--------------------------------------------------------------------------------
/spring-boot/src/main/resources/templates/profile.pebble:
--------------------------------------------------------------------------------
1 | {% extends 'base' %}
2 | {% set activeNav = 'profile' %}
3 |
4 | {% block content %}
5 |
6 |
7 |
8 | {{ user.firstName | capitalize}} {{ user.lastName | capitalize}}
9 |
10 |
11 |
12 |

13 |
14 |
15 |
16 |
17 |
18 | - ID
19 | - {{ user.id }}
20 |
21 | - Birthday
22 | - {{ user.birthday | date("MMMM DD, YYYY") | default("-") }}
23 |
24 | - Gender
25 | - {{ user.gender }}
26 |
27 | - Email
28 | - {{ user.email }}
29 |
30 |
31 |
32 |
33 |
34 |
35 | {% endblock content%}
--------------------------------------------------------------------------------
/java-config/src/main/webapp/WEB-INF/templates/profile.html:
--------------------------------------------------------------------------------
1 | {% extends 'base' %}
2 | {% set activeNav = 'profile' %}
3 |
4 | {% block content %}
5 |
6 |
7 |
8 | {{ user.firstName | capitalize}} {{ user.lastName | capitalize}}
9 |
10 |
11 |
12 |

13 |
14 |
15 |
16 |
17 |
18 | - ID
19 | - {{ user.id }}
20 |
21 | - Birthday
22 | - {{ user.birthday | date("MMMM DD, YYYY") | default("-") }}
23 |
24 | - Gender
25 | - {{ user.gender }}
26 |
27 | - Email
28 | - {{ user.email }}
29 |
30 |
31 |
32 |
33 |
34 |
35 | {% endblock content%}
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/templates/profile.pebble:
--------------------------------------------------------------------------------
1 | {% extends 'base' %}
2 | {% set activeNav = 'profile' %}
3 |
4 | {% block content %}
5 |
6 |
7 |
8 | {{ user.firstName | capitalize}} {{ user.lastName | capitalize}}
9 |
10 |
11 |
12 |

13 |
14 |
15 |
16 |
17 |
18 | - ID
19 | - {{ user.id }}
20 |
21 | - Birthday
22 | - {{ user.birthday | date("MMMM DD, YYYY") | default("-") }}
23 |
24 | - Gender
25 | - {{ user.gender }}
26 |
27 | - Email
28 | - {{ user.email }}
29 |
30 |
31 |
32 |
33 |
34 |
35 | {% endblock content%}
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/WEB-INF/templates/profile.html:
--------------------------------------------------------------------------------
1 | {% extends 'base' %}
2 | {% set activeNav = 'profile' %}
3 |
4 | {% block content %}
5 |
6 |
7 |
8 | {{ user.firstName | capitalize}} {{ user.lastName | capitalize}}
9 |
10 |
11 |
12 |

13 |
14 |
15 |
16 |
17 |
18 | - ID
19 | - {{ user.id }}
20 |
21 | - Birthday
22 | - {{ user.birthday | date("MMMM DD, YYYY") | default("-") }}
23 |
24 | - Gender
25 | - {{ user.gender }}
26 |
27 | - Email
28 | - {{ user.email }}
29 |
30 |
31 |
32 |
33 |
34 |
35 | {% endblock content%}
--------------------------------------------------------------------------------
/java-config/src/main/java/com/example/controller/HomeController.java:
--------------------------------------------------------------------------------
1 | package com.example.controller;
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.stereotype.Controller;
5 | import org.springframework.web.bind.annotation.RequestMapping;
6 | import org.springframework.web.bind.annotation.RequestMethod;
7 | import org.springframework.web.servlet.ModelAndView;
8 |
9 | import com.example.service.PostService;
10 |
11 | @Controller
12 | public class HomeController {
13 |
14 | @Autowired
15 | private PostService postService;
16 |
17 | @RequestMapping(value = { "/", "/home" }, method = RequestMethod.GET)
18 | public ModelAndView getUserListing() {
19 | ModelAndView mav = new ModelAndView();
20 | mav.addObject("posts", this.postService.getPosts());
21 | mav.setViewName("home");
22 | return mav;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/xml-config/src/main/java/com/example/controller/HomeController.java:
--------------------------------------------------------------------------------
1 | package com.example.controller;
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.stereotype.Controller;
5 | import org.springframework.web.bind.annotation.RequestMapping;
6 | import org.springframework.web.bind.annotation.RequestMethod;
7 | import org.springframework.web.servlet.ModelAndView;
8 |
9 | import com.example.service.PostService;
10 |
11 | @Controller
12 | public class HomeController {
13 |
14 | @Autowired
15 | private PostService postService;
16 |
17 | @RequestMapping(value = { "/", "/home" }, method = RequestMethod.GET)
18 | public ModelAndView getUserListing() {
19 | ModelAndView mav = new ModelAndView();
20 | mav.addObject("posts", this.postService.getPosts());
21 | mav.setViewName("home");
22 | return mav;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/xml-config/src/main/java/com/example/controller/ProfileController.java:
--------------------------------------------------------------------------------
1 | package com.example.controller;
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.stereotype.Controller;
5 | import org.springframework.web.bind.annotation.RequestMapping;
6 | import org.springframework.web.bind.annotation.RequestParam;
7 | import org.springframework.web.servlet.ModelAndView;
8 |
9 | import com.example.service.UserService;
10 |
11 | @Controller
12 | public class ProfileController {
13 |
14 | @Autowired
15 | private UserService userService;
16 |
17 | @RequestMapping(value = "/profile")
18 | public ModelAndView getUserProfile(@RequestParam("id") long id) {
19 | ModelAndView mav = new ModelAndView();
20 | mav.addObject("user", this.userService.getUser(id));
21 | mav.setViewName("profile");
22 | return mav;
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/java-config/src/main/java/com/example/controller/ProfileController.java:
--------------------------------------------------------------------------------
1 | package com.example.controller;
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.stereotype.Controller;
5 | import org.springframework.web.bind.annotation.RequestMapping;
6 | import org.springframework.web.bind.annotation.RequestParam;
7 | import org.springframework.web.servlet.ModelAndView;
8 |
9 | import com.example.service.UserService;
10 |
11 | @Controller
12 | public class ProfileController {
13 |
14 | @Autowired
15 | private UserService userService;
16 |
17 | @RequestMapping(value = "/profile")
18 | public ModelAndView getUserProfile(@RequestParam("id") long id) {
19 | ModelAndView mav = new ModelAndView();
20 | mav.addObject("user", this.userService.getUser(id));
21 | mav.setViewName("profile");
22 | return mav;
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/xml-config/src/main/java/com/example/factory/ServletContextFactory.java:
--------------------------------------------------------------------------------
1 | package com.example.factory;
2 |
3 | import javax.servlet.ServletContext;
4 |
5 | import org.springframework.beans.factory.FactoryBean;
6 | import org.springframework.web.context.ServletContextAware;
7 |
8 | public class ServletContextFactory implements FactoryBean, ServletContextAware {
9 |
10 | private ServletContext servletContext;
11 |
12 | @Override
13 | public ServletContext getObject() throws Exception {
14 | return this.servletContext;
15 | }
16 |
17 | @Override
18 | public Class> getObjectType() {
19 | return ServletContext.class;
20 | }
21 |
22 | @Override
23 | public boolean isSingleton() {
24 | return true;
25 | }
26 |
27 | @Override
28 | public void setServletContext(ServletContext servletContext) {
29 | this.servletContext = servletContext;
30 | }
31 |
32 | }
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/templates/home.pebble:
--------------------------------------------------------------------------------
1 | {% extends 'base' %}
2 | {% set activeNav = 'home' %}
3 |
4 | {% block content %}
5 |
6 | {% for post in posts %}
7 |
8 |
13 |
14 |
15 |
{{ post.details }}
16 |
{{ post.likes }} likes
17 |
18 |
24 |
25 |
26 | {% endfor %}
27 |
28 | {% endblock content%}
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | Pebble Example - Spring
7 |
8 |
9 | org.springframework.web.context.ContextLoaderListener
10 |
11 |
12 |
13 | Spring MVC Dispatcher Servlet
14 | org.springframework.web.servlet.DispatcherServlet
15 |
16 | contextConfigLocation
17 | /WEB-INF/applicationContext.xml
18 |
19 | 1
20 |
21 |
22 |
23 | Spring MVC Dispatcher Servlet
24 | /
25 |
26 |
27 |
--------------------------------------------------------------------------------
/spring-boot/src/main/resources/templates/base.pebble:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Pebble Spring Example
7 |
8 |
9 |
10 |
11 |
12 | {% include 'navbar' %}
13 |
14 |
15 |
16 |
17 |
18 | {% include 'sidebar' %}
19 |
20 |
21 | {% block content %}
22 | {# This section is to be overriden by child templates #}
23 | {% endblock content %}
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | {% include 'footer' %}
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/templates/base.pebble:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Pebble Spring Example
7 |
8 |
9 |
10 |
11 |
12 | {% include 'navbar' %}
13 |
14 |
15 |
16 |
17 |
18 | {% include 'sidebar' %}
19 |
20 |
21 | {% block content %}
22 | {# This section is to be overriden by child templates #}
23 | {% endblock content %}
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | {% include 'footer' %}
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/java-config/src/main/webapp/WEB-INF/templates/base.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Pebble Spring Example
7 |
8 |
9 |
10 |
11 |
12 | {% include 'navbar' %}
13 |
14 |
15 |
16 |
17 |
18 | {% include 'sidebar' %}
19 |
20 |
21 | {% block content %}
22 | {# This section is to be overriden by child templates #}
23 | {% endblock content %}
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | {% include 'footer' %}
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/WEB-INF/templates/base.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Pebble Spring Example
7 |
8 |
9 |
10 |
11 |
12 | {% include 'navbar' %}
13 |
14 |
15 |
16 |
17 |
18 | {% include 'sidebar' %}
19 |
20 |
21 | {% block content %}
22 | {# This section is to be overriden by child templates #}
23 | {% endblock content %}
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | {% include 'footer' %}
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/java/com/example/service/EmailService.java:
--------------------------------------------------------------------------------
1 | package com.example.service;
2 |
3 | import com.mitchellbosecke.pebble.PebbleEngine;
4 | import com.mitchellbosecke.pebble.template.PebbleTemplate;
5 | import java.io.IOException;
6 | import java.io.StringWriter;
7 | import java.io.Writer;
8 | import java.util.HashMap;
9 | import java.util.Map;
10 | import org.slf4j.Logger;
11 | import org.slf4j.LoggerFactory;
12 | import org.springframework.stereotype.Service;
13 |
14 | @Service
15 | public class EmailService {
16 |
17 | private static final Logger LOG = LoggerFactory.getLogger(EmailService.class);
18 | private final PebbleEngine pebbleEngine;
19 |
20 | public EmailService(PebbleEngine pebbleEngine) {
21 | this.pebbleEngine = pebbleEngine;
22 | }
23 |
24 | public void sendEmail(String comment) {
25 | PebbleTemplate template = this.pebbleEngine.getTemplate("email/email");
26 |
27 | Map context = new HashMap<>();
28 | context.put("comment", comment);
29 | Writer writer = new StringWriter();
30 |
31 | try {
32 | template.evaluate(writer, context);
33 | } catch (IOException e) {
34 | throw new RuntimeException(e);
35 | }
36 |
37 | LOG.info("Send email with content={}", writer.toString());
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/spring-boot/src/main/java/com/example/data/Post.java:
--------------------------------------------------------------------------------
1 | package com.example.data;
2 |
3 | import java.util.Date;
4 |
5 | public class Post {
6 |
7 | private long userId;
8 |
9 | private String userName;
10 |
11 | private Date date;
12 |
13 | private String details;
14 |
15 | private int likes;
16 |
17 | public long getUserId() {
18 | return this.userId;
19 | }
20 |
21 | public Post(long userId, String userName, Date date, int likes, String details) {
22 | super();
23 | this.userId = userId;
24 | this.userName = userName;
25 | this.date = date;
26 | this.likes = likes;
27 | this.details = details;
28 | }
29 |
30 | public void setUserId(long userId) {
31 | this.userId = userId;
32 | }
33 |
34 | public String getUserName() {
35 | return this.userName;
36 | }
37 |
38 | public void setUserName(String userName) {
39 | this.userName = userName;
40 | }
41 |
42 | public Date getDate() {
43 | return this.date;
44 | }
45 |
46 | public void setDate(Date date) {
47 | this.date = date;
48 | }
49 |
50 | public String getDetails() {
51 | return this.details;
52 | }
53 |
54 | public void setDetails(String details) {
55 | this.details = details;
56 | }
57 |
58 | public int getLikes() {
59 | return this.likes;
60 | }
61 |
62 | public void setLikes(int likes) {
63 | this.likes = likes;
64 | }
65 |
66 | }
67 |
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/java/com/example/data/Post.java:
--------------------------------------------------------------------------------
1 | package com.example.data;
2 |
3 | import java.util.Date;
4 |
5 | public class Post {
6 |
7 | private long userId;
8 |
9 | private String userName;
10 |
11 | private Date date;
12 |
13 | private String details;
14 |
15 | private int likes;
16 |
17 | public long getUserId() {
18 | return this.userId;
19 | }
20 |
21 | public Post(long userId, String userName, Date date, int likes, String details) {
22 | super();
23 | this.userId = userId;
24 | this.userName = userName;
25 | this.date = date;
26 | this.likes = likes;
27 | this.details = details;
28 | }
29 |
30 | public void setUserId(long userId) {
31 | this.userId = userId;
32 | }
33 |
34 | public String getUserName() {
35 | return this.userName;
36 | }
37 |
38 | public void setUserName(String userName) {
39 | this.userName = userName;
40 | }
41 |
42 | public Date getDate() {
43 | return this.date;
44 | }
45 |
46 | public void setDate(Date date) {
47 | this.date = date;
48 | }
49 |
50 | public String getDetails() {
51 | return this.details;
52 | }
53 |
54 | public void setDetails(String details) {
55 | this.details = details;
56 | }
57 |
58 | public int getLikes() {
59 | return this.likes;
60 | }
61 |
62 | public void setLikes(int likes) {
63 | this.likes = likes;
64 | }
65 |
66 | }
67 |
--------------------------------------------------------------------------------
/spring-boot/src/main/java/com/example/service/UserService.java:
--------------------------------------------------------------------------------
1 | package com.example.service;
2 |
3 | import com.example.data.User;
4 | import java.util.ArrayList;
5 | import java.util.Date;
6 | import java.util.List;
7 | import org.springframework.stereotype.Service;
8 |
9 | @Service
10 | public class UserService {
11 |
12 | private static List users = new ArrayList<>();
13 |
14 | static {
15 | users.add(new User(1, "Katniss", "Everdeen", new Date(), "Female", "keverdeen@gmail.com"));
16 | users.add(new User(2, "Tyrion", "Lannister", new Date(), "Male", "lann_the_man@gmail.com"));
17 | users.add(new User(3, "Hank", "Schrader", new Date(), "Male", "minerals@marie.com"));
18 | users.add(new User(4, "Steve", "Holt", null, "Male", "steve@holt.com"));
19 | users.add(new User(5, "Rick", "O'Connell", new Date(), "Male", "themummy@gmail.com"));
20 | users.add(new User(6, "Samwise", "Gamgee", null, "Male", "sammie_3@gmail.com"));
21 | users.add(new User(7, "Elaine", "Benes", new Date(), "Female", "e_ben@hotmail.com"));
22 | users.add(new User(8, "Kenny", "Powers", new Date(), "Male", "f_this_noise@aol.com"));
23 | }
24 |
25 | public List getUsers() {
26 | return users;
27 | }
28 |
29 | public User getUser(long id) {
30 | User result = null;
31 | for (User user : users) {
32 | if (user.getId() == id) {
33 | result = user;
34 | break;
35 | }
36 | }
37 | return result;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/java/com/example/service/UserService.java:
--------------------------------------------------------------------------------
1 | package com.example.service;
2 |
3 | import com.example.data.User;
4 | import java.util.ArrayList;
5 | import java.util.Date;
6 | import java.util.List;
7 | import org.springframework.stereotype.Service;
8 |
9 | @Service
10 | public class UserService {
11 |
12 | private static List users = new ArrayList<>();
13 |
14 | static {
15 | users.add(new User(1, "Katniss", "Everdeen", new Date(), "Female", "keverdeen@gmail.com"));
16 | users.add(new User(2, "Tyrion", "Lannister", new Date(), "Male", "lann_the_man@gmail.com"));
17 | users.add(new User(3, "Hank", "Schrader", new Date(), "Male", "minerals@marie.com"));
18 | users.add(new User(4, "Steve", "Holt", null, "Male", "steve@holt.com"));
19 | users.add(new User(5, "Rick", "O'Connell", new Date(), "Male", "themummy@gmail.com"));
20 | users.add(new User(6, "Samwise", "Gamgee", null, "Male", "sammie_3@gmail.com"));
21 | users.add(new User(7, "Elaine", "Benes", new Date(), "Female", "e_ben@hotmail.com"));
22 | users.add(new User(8, "Kenny", "Powers", new Date(), "Male", "f_this_noise@aol.com"));
23 | }
24 |
25 | public List getUsers() {
26 | return users;
27 | }
28 |
29 | public User getUser(long id) {
30 | User result = null;
31 | for (User user : users) {
32 | if (user.getId() == id) {
33 | result = user;
34 | break;
35 | }
36 | }
37 | return result;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/java-config/src/main/java/com/example/data/Post.java:
--------------------------------------------------------------------------------
1 | package com.example.data;
2 |
3 | import java.util.Date;
4 |
5 | public class Post {
6 |
7 | private long userId;
8 |
9 | private String userName;
10 |
11 | private Date date;
12 |
13 | private String details;
14 |
15 | private int likes;
16 |
17 | public long getUserId() {
18 | return userId;
19 | }
20 |
21 | public Post(long userId, String userName, Date date, int likes, String details) {
22 | super();
23 | this.userId = userId;
24 | this.userName = userName;
25 | this.date = date;
26 | this.likes = likes;
27 | this.details = details;
28 | }
29 |
30 | public void setUserId(long userId) {
31 | this.userId = userId;
32 | }
33 |
34 | public String getUserName() {
35 | return userName;
36 | }
37 |
38 | public void setUserName(String userName) {
39 | this.userName = userName;
40 | }
41 |
42 | public Date getDate() {
43 | return date;
44 | }
45 |
46 | public void setDate(Date date) {
47 | this.date = date;
48 | }
49 |
50 | public String getDetails() {
51 | return details;
52 | }
53 |
54 | public void setDetails(String details) {
55 | this.details = details;
56 | }
57 |
58 | public int getLikes() {
59 | return likes;
60 | }
61 |
62 | public void setLikes(int likes) {
63 | this.likes = likes;
64 | }
65 |
66 | }
67 |
--------------------------------------------------------------------------------
/xml-config/src/main/java/com/example/data/Post.java:
--------------------------------------------------------------------------------
1 | package com.example.data;
2 |
3 | import java.util.Date;
4 |
5 | public class Post {
6 |
7 | private long userId;
8 |
9 | private String userName;
10 |
11 | private Date date;
12 |
13 | private String details;
14 |
15 | private int likes;
16 |
17 | public long getUserId() {
18 | return userId;
19 | }
20 |
21 | public Post(long userId, String userName, Date date, int likes, String details) {
22 | super();
23 | this.userId = userId;
24 | this.userName = userName;
25 | this.date = date;
26 | this.likes = likes;
27 | this.details = details;
28 | }
29 |
30 | public void setUserId(long userId) {
31 | this.userId = userId;
32 | }
33 |
34 | public String getUserName() {
35 | return userName;
36 | }
37 |
38 | public void setUserName(String userName) {
39 | this.userName = userName;
40 | }
41 |
42 | public Date getDate() {
43 | return date;
44 | }
45 |
46 | public void setDate(Date date) {
47 | this.date = date;
48 | }
49 |
50 | public String getDetails() {
51 | return details;
52 | }
53 |
54 | public void setDetails(String details) {
55 | this.details = details;
56 | }
57 |
58 | public int getLikes() {
59 | return likes;
60 | }
61 |
62 | public void setLikes(int likes) {
63 | this.likes = likes;
64 | }
65 |
66 | }
67 |
--------------------------------------------------------------------------------
/spring-boot/src/main/java/com/example/service/PostService.java:
--------------------------------------------------------------------------------
1 | package com.example.service;
2 |
3 | import com.example.data.Post;
4 | import java.util.ArrayList;
5 | import java.util.Date;
6 | import java.util.List;
7 | import org.springframework.stereotype.Service;
8 |
9 | @Service
10 | public class PostService {
11 |
12 | private static List posts = new ArrayList<>();
13 |
14 | static {
15 | posts.add(
16 | new Post(1, "Katniss Everdeen", new Date(), 2,
17 | "Ugh. I'm so hungry. Does anyone want to play a game?"));
18 | posts.add(new Post(2, "Tyrion Lannister", new Date(), 0,
19 | "Is it okay to hate your family? Like are you serious nephew? Seriously serious?"));
20 | posts.add(new Post(3, "Hank Schrader", new Date(), 0,
21 | "Hey does anyone on here know a W.W? I'm working on a case."));
22 | posts.add(new Post(4, "Steve Holt", null, 45, "STEVE HOLT"));
23 | posts.add(new Post(5, "Rick O'Connell", new Date(), 1,
24 | "IT LOOKS TO ME LIKE YOU'RE ON THE WRONG SIDE OF THE RIVER"));
25 | posts.add(new Post(6, "Samwise Gamgee", null, 7,
26 | "Welp. I don't think I'm going to be home for awhile."));
27 | posts.add(new Post(7, "Elaine Benes", new Date(), 3,
28 | "You're through, Soup Nazi. Pack it up. No more soup for you. Next!"));
29 | posts.add(
30 | new Post(8, "Kenny Powers", new Date(), -1,
31 | "Anyone want a kid? I'm done with this. F*** this noise."));
32 | }
33 |
34 | public List getPosts() {
35 | return posts;
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/java-config/src/main/java/com/example/service/UserService.java:
--------------------------------------------------------------------------------
1 | package com.example.service;
2 |
3 | import java.util.ArrayList;
4 | import java.util.Date;
5 | import java.util.List;
6 |
7 | import org.springframework.stereotype.Service;
8 |
9 | import com.example.data.User;
10 |
11 | @Service
12 | public class UserService {
13 |
14 | private static List users = new ArrayList<>();
15 |
16 | static {
17 | users.add(new User(1, "Katniss", "Everdeen", new Date(), "Female", "keverdeen@gmail.com"));
18 | users.add(new User(2, "Tyrion", "Lannister", new Date(), "Male", "lann_the_man@gmail.com"));
19 | users.add(new User(3, "Hank", "Schrader", new Date(), "Male", "minerals@marie.com"));
20 | users.add(new User(4, "Steve", "Holt", null, "Male", "steve@holt.com"));
21 | users.add(new User(5, "Rick", "O'Connell", new Date(), "Male", "themummy@gmail.com"));
22 | users.add(new User(6, "Samwise", "Gamgee", null, "Male", "sammie_3@gmail.com"));
23 | users.add(new User(7, "Elaine", "Benes", new Date(), "Female", "e_ben@hotmail.com"));
24 | users.add(new User(8, "Kenny", "Powers", new Date(), "Male", "f_this_noise@aol.com"));
25 | }
26 |
27 | public List getUsers() {
28 | return users;
29 | }
30 |
31 | public User getUser(long id) {
32 | User result = null;
33 | for (User user : users) {
34 | if (user.getId() == id) {
35 | result = user;
36 | break;
37 | }
38 | }
39 | return result;
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/java/com/example/service/PostService.java:
--------------------------------------------------------------------------------
1 | package com.example.service;
2 |
3 | import com.example.data.Post;
4 | import java.util.ArrayList;
5 | import java.util.Date;
6 | import java.util.List;
7 | import org.springframework.stereotype.Service;
8 |
9 | @Service
10 | public class PostService {
11 |
12 | private static List posts = new ArrayList<>();
13 |
14 | static {
15 | posts.add(
16 | new Post(1, "Katniss Everdeen", new Date(), 2,
17 | "Ugh. I'm so hungry. Does anyone want to play a game?"));
18 | posts.add(new Post(2, "Tyrion Lannister", new Date(), 0,
19 | "Is it okay to hate your family? Like are you serious nephew? Seriously serious?"));
20 | posts.add(new Post(3, "Hank Schrader", new Date(), 0,
21 | "Hey does anyone on here know a W.W? I'm working on a case."));
22 | posts.add(new Post(4, "Steve Holt", null, 45, "STEVE HOLT"));
23 | posts.add(new Post(5, "Rick O'Connell", new Date(), 1,
24 | "IT LOOKS TO ME LIKE YOU'RE ON THE WRONG SIDE OF THE RIVER"));
25 | posts.add(new Post(6, "Samwise Gamgee", null, 7,
26 | "Welp. I don't think I'm going to be home for awhile."));
27 | posts.add(new Post(7, "Elaine Benes", new Date(), 3,
28 | "You're through, Soup Nazi. Pack it up. No more soup for you. Next!"));
29 | posts.add(
30 | new Post(8, "Kenny Powers", new Date(), -1,
31 | "Anyone want a kid? I'm done with this. F*** this noise."));
32 | }
33 |
34 | public List getPosts() {
35 | return posts;
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/xml-config/src/main/java/com/example/service/UserService.java:
--------------------------------------------------------------------------------
1 | package com.example.service;
2 |
3 | import java.util.ArrayList;
4 | import java.util.Date;
5 | import java.util.List;
6 |
7 | import org.springframework.stereotype.Service;
8 |
9 | import com.example.data.User;
10 |
11 | @Service
12 | public class UserService {
13 |
14 | private static List users = new ArrayList<>();
15 |
16 | static {
17 | users.add(new User(1, "Katniss", "Everdeen", new Date(), "Female", "keverdeen@gmail.com"));
18 | users.add(new User(2, "Tyrion", "Lannister", new Date(), "Male", "lann_the_man@gmail.com"));
19 | users.add(new User(3, "Hank", "Schrader", new Date(), "Male", "minerals@marie.com"));
20 | users.add(new User(4, "Steve", "Holt", null, "Male", "steve@holt.com"));
21 | users.add(new User(5, "Rick", "O'Connell", new Date(), "Male", "themummy@gmail.com"));
22 | users.add(new User(6, "Samwise", "Gamgee", null, "Male", "sammie_3@gmail.com"));
23 | users.add(new User(7, "Elaine", "Benes", new Date(), "Female", "e_ben@hotmail.com"));
24 | users.add(new User(8, "Kenny", "Powers", new Date(), "Male", "f_this_noise@aol.com"));
25 | }
26 |
27 | public List getUsers() {
28 | return users;
29 | }
30 |
31 | public User getUser(long id) {
32 | User result = null;
33 | for (User user : users) {
34 | if (user.getId() == id) {
35 | result = user;
36 | break;
37 | }
38 | }
39 | return result;
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2014, Mitchell Bösecke
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without modification,
5 | are permitted provided that the following conditions are met:
6 |
7 | * Redistributions of source code must retain the above copyright notice, this
8 | list of conditions and the following disclaimer.
9 |
10 | * Redistributions in binary form must reproduce the above copyright notice, this
11 | list of conditions and the following disclaimer in the documentation and/or
12 | other materials provided with the distribution.
13 |
14 | * Neither the name of the {organization} nor the names of its
15 | contributors may be used to endorse or promote products derived from
16 | this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
22 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/java-config/src/main/java/com/example/service/PostService.java:
--------------------------------------------------------------------------------
1 | package com.example.service;
2 |
3 | import java.util.ArrayList;
4 | import java.util.Date;
5 | import java.util.List;
6 |
7 | import org.springframework.stereotype.Service;
8 |
9 | import com.example.data.Post;
10 |
11 | @Service
12 | public class PostService {
13 |
14 | private static List posts = new ArrayList<>();
15 |
16 | static {
17 | posts.add(
18 | new Post(1, "Katniss Everdeen", new Date(), 2, "Ugh. I'm so hungry. Does anyone want to play a game?"));
19 | posts.add(new Post(2, "Tyrion Lannister", new Date(), 0,
20 | "Is it okay to hate your family? Like are you serious nephew? Seriously serious?"));
21 | posts.add(new Post(3, "Hank Schrader", new Date(), 0,
22 | "Hey does anyone on here know a W.W? I'm working on a case."));
23 | posts.add(new Post(4, "Steve Holt", null, 45, "STEVE HOLT"));
24 | posts.add(new Post(5, "Rick O'Connell", new Date(), 1,
25 | "IT LOOKS TO ME LIKE YOU'RE ON THE WRONG SIDE OF THE RIVER"));
26 | posts.add(new Post(6, "Samwise Gamgee", null, 7, "Welp. I don't think I'm going to be home for awhile."));
27 | posts.add(new Post(7, "Elaine Benes", new Date(), 3,
28 | "You're through, Soup Nazi. Pack it up. No more soup for you. Next!"));
29 | posts.add(
30 | new Post(8, "Kenny Powers", new Date(), -1, "Anyone want a kid? I'm done with this. F*** this noise."));
31 | }
32 |
33 | public List getPosts() {
34 | return posts;
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/xml-config/src/main/java/com/example/service/PostService.java:
--------------------------------------------------------------------------------
1 | package com.example.service;
2 |
3 | import java.util.ArrayList;
4 | import java.util.Date;
5 | import java.util.List;
6 |
7 | import org.springframework.stereotype.Service;
8 |
9 | import com.example.data.Post;
10 |
11 | @Service
12 | public class PostService {
13 |
14 | private static List posts = new ArrayList<>();
15 |
16 | static {
17 | posts.add(
18 | new Post(1, "Katniss Everdeen", new Date(), 2, "Ugh. I'm so hungry. Does anyone want to play a game?"));
19 | posts.add(new Post(2, "Tyrion Lannister", new Date(), 0,
20 | "Is it okay to hate your family? Like are you serious nephew? Seriously serious?"));
21 | posts.add(new Post(3, "Hank Schrader", new Date(), 0,
22 | "Hey does anyone on here know a W.W? I'm working on a case."));
23 | posts.add(new Post(4, "Steve Holt", null, 45, "STEVE HOLT"));
24 | posts.add(new Post(5, "Rick O'Connell", new Date(), 1,
25 | "IT LOOKS TO ME LIKE YOU'RE ON THE WRONG SIDE OF THE RIVER"));
26 | posts.add(new Post(6, "Samwise Gamgee", null, 7, "Welp. I don't think I'm going to be home for awhile."));
27 | posts.add(new Post(7, "Elaine Benes", new Date(), 3,
28 | "You're through, Soup Nazi. Pack it up. No more soup for you. Next!"));
29 | posts.add(
30 | new Post(8, "Kenny Powers", new Date(), -1, "Anyone want a kid? I'm done with this. F*** this noise."));
31 | }
32 |
33 | public List getPosts() {
34 | return posts;
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/spring-boot/src/main/java/com/example/data/User.java:
--------------------------------------------------------------------------------
1 | package com.example.data;
2 |
3 | import java.util.Date;
4 |
5 | public class User {
6 |
7 | private long id;
8 |
9 | private String firstName;
10 |
11 | private String lastName;
12 |
13 | private Date birthday;
14 |
15 | private String gender;
16 |
17 | private String email;
18 |
19 | public User(long id, String firstName, String lastName, Date birthday, String gender,
20 | String email) {
21 | super();
22 | this.id = id;
23 | this.firstName = firstName;
24 | this.lastName = lastName;
25 | this.birthday = birthday;
26 | this.gender = gender;
27 | this.email = email;
28 | }
29 |
30 | public String getFirstName() {
31 | return this.firstName;
32 | }
33 |
34 | public void setFirstName(String firstName) {
35 | this.firstName = firstName;
36 | }
37 |
38 | public String getLastName() {
39 | return this.lastName;
40 | }
41 |
42 | public void setLastName(String lastName) {
43 | this.lastName = lastName;
44 | }
45 |
46 | public Date getBirthday() {
47 | return this.birthday;
48 | }
49 |
50 | public void setBirthday(Date birthday) {
51 | this.birthday = birthday;
52 | }
53 |
54 | public long getId() {
55 | return this.id;
56 | }
57 |
58 | public void setId(long id) {
59 | this.id = id;
60 | }
61 |
62 | public String getEmail() {
63 | return this.email;
64 | }
65 |
66 | public void setEmail(String email) {
67 | this.email = email;
68 | }
69 |
70 | public String getGender() {
71 | return this.gender;
72 | }
73 |
74 | public void setGender(String gender) {
75 | this.gender = gender;
76 | }
77 |
78 | }
79 |
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/java/com/example/data/User.java:
--------------------------------------------------------------------------------
1 | package com.example.data;
2 |
3 | import java.util.Date;
4 |
5 | public class User {
6 |
7 | private long id;
8 |
9 | private String firstName;
10 |
11 | private String lastName;
12 |
13 | private Date birthday;
14 |
15 | private String gender;
16 |
17 | private String email;
18 |
19 | public User(long id, String firstName, String lastName, Date birthday, String gender,
20 | String email) {
21 | super();
22 | this.id = id;
23 | this.firstName = firstName;
24 | this.lastName = lastName;
25 | this.birthday = birthday;
26 | this.gender = gender;
27 | this.email = email;
28 | }
29 |
30 | public String getFirstName() {
31 | return this.firstName;
32 | }
33 |
34 | public void setFirstName(String firstName) {
35 | this.firstName = firstName;
36 | }
37 |
38 | public String getLastName() {
39 | return this.lastName;
40 | }
41 |
42 | public void setLastName(String lastName) {
43 | this.lastName = lastName;
44 | }
45 |
46 | public Date getBirthday() {
47 | return this.birthday;
48 | }
49 |
50 | public void setBirthday(Date birthday) {
51 | this.birthday = birthday;
52 | }
53 |
54 | public long getId() {
55 | return this.id;
56 | }
57 |
58 | public void setId(long id) {
59 | this.id = id;
60 | }
61 |
62 | public String getEmail() {
63 | return this.email;
64 | }
65 |
66 | public void setEmail(String email) {
67 | this.email = email;
68 | }
69 |
70 | public String getGender() {
71 | return this.gender;
72 | }
73 |
74 | public void setGender(String gender) {
75 | this.gender = gender;
76 | }
77 |
78 | }
79 |
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/WEB-INF/applicationContext.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/spring-boot/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 |
7 |
8 | org.springframework.boot
9 | spring-boot-starter-parent
10 | 2.7.4
11 |
12 |
13 |
14 | pebble-example-spring-boot
15 |
16 |
17 | 3.1.6
18 |
19 |
20 |
21 |
22 | org.springframework.boot
23 | spring-boot-starter-web
24 |
25 |
26 |
27 | io.pebbletemplates
28 | pebble-spring-boot-starter
29 | ${pebble.version}
30 |
31 |
32 |
33 | org.springframework.boot
34 | spring-boot-starter-test
35 | test
36 |
37 |
38 | org.junit.vintage
39 | junit-vintage-engine
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | org.springframework.boot
49 | spring-boot-maven-plugin
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/spring-boot-with-email/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 |
7 |
8 | org.springframework.boot
9 | spring-boot-starter-parent
10 | 2.7.4
11 |
12 |
13 |
14 | pebble-example-spring-boot-with-email
15 |
16 |
17 | 3.1.6
18 |
19 |
20 |
21 |
22 | org.springframework.boot
23 | spring-boot-starter-web
24 |
25 |
26 |
27 | io.pebbletemplates
28 | pebble-spring-boot-starter
29 | ${pebble.version}
30 |
31 |
32 |
33 | org.springframework.boot
34 | spring-boot-starter-test
35 | test
36 |
37 |
38 | org.junit.vintage
39 | junit-vintage-engine
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | org.springframework.boot
49 | spring-boot-maven-plugin
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/java-config/src/main/java/com/example/data/User.java:
--------------------------------------------------------------------------------
1 | package com.example.data;
2 |
3 | import java.util.Date;
4 |
5 | public class User {
6 |
7 | private long id;
8 |
9 | private String firstName;
10 |
11 | private String lastName;
12 |
13 | private Date birthday;
14 |
15 | private String gender;
16 |
17 | private String email;
18 |
19 | public User(long id, String firstName, String lastName, Date birthday, String gender, String email) {
20 | super();
21 | this.id = id;
22 | this.firstName = firstName;
23 | this.lastName = lastName;
24 | this.birthday = birthday;
25 | this.gender = gender;
26 | this.email = email;
27 | }
28 |
29 | public String getFirstName() {
30 | return firstName;
31 | }
32 |
33 | public void setFirstName(String firstName) {
34 | this.firstName = firstName;
35 | }
36 |
37 | public String getLastName() {
38 | return lastName;
39 | }
40 |
41 | public void setLastName(String lastName) {
42 | this.lastName = lastName;
43 | }
44 |
45 | public Date getBirthday() {
46 | return birthday;
47 | }
48 |
49 | public void setBirthday(Date birthday) {
50 | this.birthday = birthday;
51 | }
52 |
53 | public long getId() {
54 | return id;
55 | }
56 |
57 | public void setId(long id) {
58 | this.id = id;
59 | }
60 |
61 | public String getEmail() {
62 | return email;
63 | }
64 |
65 | public void setEmail(String email) {
66 | this.email = email;
67 | }
68 |
69 | public String getGender() {
70 | return gender;
71 | }
72 |
73 | public void setGender(String gender) {
74 | this.gender = gender;
75 | }
76 |
77 | }
78 |
--------------------------------------------------------------------------------
/xml-config/src/main/java/com/example/data/User.java:
--------------------------------------------------------------------------------
1 | package com.example.data;
2 |
3 | import java.util.Date;
4 |
5 | public class User {
6 |
7 | private long id;
8 |
9 | private String firstName;
10 |
11 | private String lastName;
12 |
13 | private Date birthday;
14 |
15 | private String gender;
16 |
17 | private String email;
18 |
19 | public User(long id, String firstName, String lastName, Date birthday, String gender, String email) {
20 | super();
21 | this.id = id;
22 | this.firstName = firstName;
23 | this.lastName = lastName;
24 | this.birthday = birthday;
25 | this.gender = gender;
26 | this.email = email;
27 | }
28 |
29 | public String getFirstName() {
30 | return firstName;
31 | }
32 |
33 | public void setFirstName(String firstName) {
34 | this.firstName = firstName;
35 | }
36 |
37 | public String getLastName() {
38 | return lastName;
39 | }
40 |
41 | public void setLastName(String lastName) {
42 | this.lastName = lastName;
43 | }
44 |
45 | public Date getBirthday() {
46 | return birthday;
47 | }
48 |
49 | public void setBirthday(Date birthday) {
50 | this.birthday = birthday;
51 | }
52 |
53 | public long getId() {
54 | return id;
55 | }
56 |
57 | public void setId(long id) {
58 | this.id = id;
59 | }
60 |
61 | public String getEmail() {
62 | return email;
63 | }
64 |
65 | public void setEmail(String email) {
66 | this.email = email;
67 | }
68 |
69 | public String getGender() {
70 | return gender;
71 | }
72 |
73 | public void setGender(String gender) {
74 | this.gender = gender;
75 | }
76 |
77 | }
78 |
--------------------------------------------------------------------------------
/java-config/src/main/java/com/example/config/WebAppInitializer.java:
--------------------------------------------------------------------------------
1 | package com.example.config;
2 |
3 | import javax.servlet.Filter;
4 |
5 | import org.springframework.web.filter.CharacterEncodingFilter;
6 | import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
7 |
8 | public class WebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
9 |
10 | /**
11 | * {@inheritDoc}
12 | *
13 | * @see org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer
14 | * #getRootConfigClasses()
15 | */
16 | @Override
17 | protected Class>[] getRootConfigClasses() {
18 | return new Class[] { MvcConfig.class };
19 | }
20 |
21 | /**
22 | * {@inheritDoc}
23 | *
24 | * @see org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer
25 | * #getServletConfigClasses()
26 | */
27 | @Override
28 | protected Class>[] getServletConfigClasses() {
29 | return null;
30 | }
31 |
32 | /**
33 | * {@inheritDoc}
34 | *
35 | * @see org.springframework.web.servlet.support.AbstractDispatcherServletInitializer#getServletFilters()
36 | */
37 | @Override
38 | protected Filter[] getServletFilters() {
39 | CharacterEncodingFilter encodingFilter = new CharacterEncodingFilter();
40 | encodingFilter.setEncoding("UTF-8");
41 | encodingFilter.setForceEncoding(true);
42 |
43 | return new Filter[] { encodingFilter };
44 | }
45 |
46 | /**
47 | * {@inheritDoc}
48 | *
49 | * @see org.springframework.web.servlet.support.AbstractDispatcherServletInitializer#getServletMappings()
50 | */
51 | @Override
52 | protected String[] getServletMappings() {
53 | return new String[] { "/" };
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/xml-config/pom.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 | 4.0.0
6 |
7 | com.mitchellbosecke
8 | pebble-example-spring
9 | 0.0.1-SNAPSHOT
10 |
11 | pebble-example-spring-xml-config
12 | war
13 |
14 |
15 |
16 | org.springframework
17 | spring-webmvc
18 |
19 |
20 | commons-logging
21 | commons-logging
22 |
23 |
24 |
25 |
26 |
27 | io.pebbletemplates
28 | pebble-spring5
29 |
30 |
31 |
32 |
33 | org.slf4j
34 | jcl-over-slf4j
35 |
36 |
37 | org.apache.logging.log4j
38 | log4j-slf4j-impl
39 |
40 |
41 | org.apache.logging.log4j
42 | log4j-core
43 |
44 |
45 |
46 | javax.servlet
47 | javax.servlet-api
48 | provided
49 |
50 |
51 |
52 |
53 | ${project.artifactId}
54 |
55 |
56 | maven-compiler-plugin
57 | 2.3.2
58 |
59 | ${java.version}
60 | ${java.version}
61 |
62 |
63 |
64 | org.apache.maven.plugins
65 | maven-war-plugin
66 | 2.6
67 |
68 | false
69 |
70 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/java-config/pom.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 | 4.0.0
6 |
7 | com.mitchellbosecke
8 | pebble-example-spring
9 | 0.0.1-SNAPSHOT
10 |
11 | pebble-example-spring-java-config
12 | war
13 |
14 |
15 |
16 | org.springframework
17 | spring-webmvc
18 |
19 |
20 | commons-logging
21 | commons-logging
22 |
23 |
24 |
25 |
26 |
27 | io.pebbletemplates
28 | pebble-spring5
29 |
30 |
31 |
32 |
33 | org.slf4j
34 | jcl-over-slf4j
35 |
36 |
37 | org.apache.logging.log4j
38 | log4j-slf4j-impl
39 |
40 |
41 | org.apache.logging.log4j
42 | log4j-core
43 |
44 |
45 |
46 | javax.servlet
47 | javax.servlet-api
48 | provided
49 |
50 |
51 |
52 |
53 | ${project.artifactId}
54 |
55 |
56 | maven-compiler-plugin
57 | 2.3.2
58 |
59 | ${java.version}
60 | ${java.version}
61 |
62 |
63 |
64 | org.apache.maven.plugins
65 | maven-war-plugin
66 | 2.6
67 |
68 | false
69 |
70 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/java-config/src/main/java/com/example/config/MvcConfig.java:
--------------------------------------------------------------------------------
1 | package com.example.config;
2 |
3 | import com.mitchellbosecke.pebble.PebbleEngine;
4 | import com.mitchellbosecke.pebble.loader.Loader;
5 | import com.mitchellbosecke.pebble.loader.ServletLoader;
6 | import com.mitchellbosecke.pebble.spring.extension.SpringExtension;
7 | import com.mitchellbosecke.pebble.spring.servlet.PebbleViewResolver;
8 | import org.springframework.beans.factory.annotation.Autowired;
9 | import org.springframework.context.MessageSource;
10 | import org.springframework.context.annotation.Bean;
11 | import org.springframework.context.annotation.ComponentScan;
12 | import org.springframework.context.annotation.Configuration;
13 | import org.springframework.web.servlet.ViewResolver;
14 | import org.springframework.web.servlet.config.annotation.EnableWebMvc;
15 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
16 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
17 |
18 | import javax.servlet.ServletContext;
19 |
20 | @Configuration(proxyBeanMethods = false)
21 | @ComponentScan(basePackages = { "com.example.controller", "com.example.service" })
22 | @EnableWebMvc
23 | public class MvcConfig implements WebMvcConfigurer {
24 |
25 | @Override
26 | public void addResourceHandlers(ResourceHandlerRegistry registry) {
27 | registry.addResourceHandler("/resources/**").addResourceLocations("/resources/").setCachePeriod(31556926);
28 | }
29 |
30 | @Bean
31 | public PebbleEngine pebbleEngine(Loader> templateLoader,
32 | SpringExtension springExtension) {
33 | return new PebbleEngine.Builder()
34 | .loader(templateLoader)
35 | .extension(springExtension)
36 | .build();
37 | }
38 |
39 | @Bean
40 | public SpringExtension springExtension(MessageSource messageSource) {
41 | return new SpringExtension(messageSource);
42 | }
43 |
44 | @Bean
45 | public Loader> templateLoader(ServletContext servletContext) {
46 | return new ServletLoader(servletContext);
47 | }
48 |
49 | @Bean
50 | public ViewResolver viewResolver(PebbleEngine pebbleEngine) {
51 | PebbleViewResolver viewResolver = new PebbleViewResolver(pebbleEngine);
52 | viewResolver.setPrefix("/WEB-INF/templates/");
53 | viewResolver.setSuffix(".html");
54 | return viewResolver;
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 | Pebble Example - Spring
6 | Pebble Example - Spring
7 |
8 | 4.0.0
9 | com.mitchellbosecke
10 | pebble-example-spring
11 | 0.0.1-SNAPSHOT
12 | pom
13 |
14 |
15 | java-config
16 | xml-config
17 | spring-boot
18 | spring-boot-with-email
19 |
20 |
21 |
22 | UTF-8
23 | 1.8
24 |
25 | 3.1.6
26 | 5.3.23
27 | 1.7.36
28 | 2.19.0
29 | 3.0.1
30 |
31 |
32 |
33 |
34 |
35 | org.springframework
36 | spring-framework-bom
37 | ${spring-framework.version}
38 | pom
39 | import
40 |
41 |
42 |
43 | org.apache.logging.log4j
44 | log4j-bom
45 | ${log4j.version}
46 | import
47 | pom
48 |
49 |
50 |
51 | io.pebbletemplates
52 | pebble-spring5
53 | ${pebble.version}
54 |
55 |
56 |
57 | javax.servlet
58 | javax.servlet-api
59 | ${servlet-api.version}
60 |
61 |
62 |
63 | org.slf4j
64 | jcl-over-slf4j
65 | ${slf4j.version}
66 |
67 |
68 | org.slf4j
69 | slf4j-log4j12
70 | ${slf4j.version}
71 |
72 |
73 |
74 |
75 |
76 | scm:git:git://github.com/PebbleTemplates/pebble-example-spring.git
77 | scm:git:git@github.com:PebbleTemplates/pebble-example-spring.git
78 |
79 | https://github.com/PebbleTemplates/pebble-example-spring
80 |
81 |
82 |
--------------------------------------------------------------------------------
/java-config/src/main/webapp/resources/js/bootstrap.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * bootstrap.js v3.0.0 by @fat and @mdo
3 | * Copyright 2013 Twitter Inc.
4 | * http://www.apache.org/licenses/LICENSE-2.0
5 | */
6 | if(!jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(window.jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]');if(a.length){var b=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change");"radio"===b.prop("type")&&a.find(".active").removeClass("active")}this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(window.jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?(this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350),void 0):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(window.jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('').insertAfter(a(this)).on("click",b),f.trigger(d=a.Event("show.bs.dropdown")),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown"),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=a("[role=menu] li:not(.divider):visible a",f);if(h.length){var i=h.index(h.filter(":focus"));38==b.keyCode&&i>0&&i--,40==b.keyCode&&i').appendTo(document.body),this.$element.on("click.dismiss.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(window.jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focus",i="hover"==g?"mouseleave":"blur";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show),void 0):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide),void 0):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this.tip();this.setContent(),this.options.animation&&c.addClass("fade");var d="function"==typeof this.options.placement?this.options.placement.call(this,c[0],this.$element[0]):this.options.placement,e=/\s?auto?\s?/i,f=e.test(d);f&&(d=d.replace(e,"")||"top"),c.detach().css({top:0,left:0,display:"block"}).addClass(d),this.options.container?c.appendTo(this.options.container):c.insertAfter(this.$element);var g=this.getPosition(),h=c[0].offsetWidth,i=c[0].offsetHeight;if(f){var j=this.$element.parent(),k=d,l=document.documentElement.scrollTop||document.body.scrollTop,m="body"==this.options.container?window.innerWidth:j.outerWidth(),n="body"==this.options.container?window.innerHeight:j.outerHeight(),o="body"==this.options.container?0:j.offset().left;d="bottom"==d&&g.top+g.height+i-l>n?"top":"top"==d&&g.top-l-i<0?"bottom":"right"==d&&g.right+h>m?"left":"left"==d&&g.left-h'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top()),"function"==typeof h&&(h=f.bottom());var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()}))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(window.jQuery);
--------------------------------------------------------------------------------
/spring-boot/src/main/resources/static/js/bootstrap.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * bootstrap.js v3.0.0 by @fat and @mdo
3 | * Copyright 2013 Twitter Inc.
4 | * http://www.apache.org/licenses/LICENSE-2.0
5 | */
6 | if(!jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(window.jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]');if(a.length){var b=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change");"radio"===b.prop("type")&&a.find(".active").removeClass("active")}this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(window.jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?(this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350),void 0):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(window.jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('').insertAfter(a(this)).on("click",b),f.trigger(d=a.Event("show.bs.dropdown")),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown"),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=a("[role=menu] li:not(.divider):visible a",f);if(h.length){var i=h.index(h.filter(":focus"));38==b.keyCode&&i>0&&i--,40==b.keyCode&&i').appendTo(document.body),this.$element.on("click.dismiss.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(window.jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focus",i="hover"==g?"mouseleave":"blur";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show),void 0):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide),void 0):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this.tip();this.setContent(),this.options.animation&&c.addClass("fade");var d="function"==typeof this.options.placement?this.options.placement.call(this,c[0],this.$element[0]):this.options.placement,e=/\s?auto?\s?/i,f=e.test(d);f&&(d=d.replace(e,"")||"top"),c.detach().css({top:0,left:0,display:"block"}).addClass(d),this.options.container?c.appendTo(this.options.container):c.insertAfter(this.$element);var g=this.getPosition(),h=c[0].offsetWidth,i=c[0].offsetHeight;if(f){var j=this.$element.parent(),k=d,l=document.documentElement.scrollTop||document.body.scrollTop,m="body"==this.options.container?window.innerWidth:j.outerWidth(),n="body"==this.options.container?window.innerHeight:j.outerHeight(),o="body"==this.options.container?0:j.offset().left;d="bottom"==d&&g.top+g.height+i-l>n?"top":"top"==d&&g.top-l-i<0?"bottom":"right"==d&&g.right+h>m?"left":"left"==d&&g.left-h'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top()),"function"==typeof h&&(h=f.bottom());var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()}))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(window.jQuery);
--------------------------------------------------------------------------------
/xml-config/src/main/webapp/resources/js/bootstrap.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * bootstrap.js v3.0.0 by @fat and @mdo
3 | * Copyright 2013 Twitter Inc.
4 | * http://www.apache.org/licenses/LICENSE-2.0
5 | */
6 | if(!jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(window.jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]');if(a.length){var b=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change");"radio"===b.prop("type")&&a.find(".active").removeClass("active")}this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(window.jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?(this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350),void 0):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(window.jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('').insertAfter(a(this)).on("click",b),f.trigger(d=a.Event("show.bs.dropdown")),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown"),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=a("[role=menu] li:not(.divider):visible a",f);if(h.length){var i=h.index(h.filter(":focus"));38==b.keyCode&&i>0&&i--,40==b.keyCode&&i').appendTo(document.body),this.$element.on("click.dismiss.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(window.jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focus",i="hover"==g?"mouseleave":"blur";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show),void 0):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide),void 0):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this.tip();this.setContent(),this.options.animation&&c.addClass("fade");var d="function"==typeof this.options.placement?this.options.placement.call(this,c[0],this.$element[0]):this.options.placement,e=/\s?auto?\s?/i,f=e.test(d);f&&(d=d.replace(e,"")||"top"),c.detach().css({top:0,left:0,display:"block"}).addClass(d),this.options.container?c.appendTo(this.options.container):c.insertAfter(this.$element);var g=this.getPosition(),h=c[0].offsetWidth,i=c[0].offsetHeight;if(f){var j=this.$element.parent(),k=d,l=document.documentElement.scrollTop||document.body.scrollTop,m="body"==this.options.container?window.innerWidth:j.outerWidth(),n="body"==this.options.container?window.innerHeight:j.outerHeight(),o="body"==this.options.container?0:j.offset().left;d="bottom"==d&&g.top+g.height+i-l>n?"top":"top"==d&&g.top-l-i<0?"bottom":"right"==d&&g.right+h>m?"left":"left"==d&&g.left-h'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top()),"function"==typeof h&&(h=f.bottom());var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()}))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(window.jQuery);
--------------------------------------------------------------------------------
/spring-boot-with-email/src/main/resources/static/js/bootstrap.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * bootstrap.js v3.0.0 by @fat and @mdo
3 | * Copyright 2013 Twitter Inc.
4 | * http://www.apache.org/licenses/LICENSE-2.0
5 | */
6 | if(!jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(window.jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]');if(a.length){var b=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change");"radio"===b.prop("type")&&a.find(".active").removeClass("active")}this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(window.jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?(this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350),void 0):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(window.jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('').insertAfter(a(this)).on("click",b),f.trigger(d=a.Event("show.bs.dropdown")),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown"),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=a("[role=menu] li:not(.divider):visible a",f);if(h.length){var i=h.index(h.filter(":focus"));38==b.keyCode&&i>0&&i--,40==b.keyCode&&i').appendTo(document.body),this.$element.on("click.dismiss.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(window.jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focus",i="hover"==g?"mouseleave":"blur";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show),void 0):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide),void 0):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this.tip();this.setContent(),this.options.animation&&c.addClass("fade");var d="function"==typeof this.options.placement?this.options.placement.call(this,c[0],this.$element[0]):this.options.placement,e=/\s?auto?\s?/i,f=e.test(d);f&&(d=d.replace(e,"")||"top"),c.detach().css({top:0,left:0,display:"block"}).addClass(d),this.options.container?c.appendTo(this.options.container):c.insertAfter(this.$element);var g=this.getPosition(),h=c[0].offsetWidth,i=c[0].offsetHeight;if(f){var j=this.$element.parent(),k=d,l=document.documentElement.scrollTop||document.body.scrollTop,m="body"==this.options.container?window.innerWidth:j.outerWidth(),n="body"==this.options.container?window.innerHeight:j.outerHeight(),o="body"==this.options.container?0:j.offset().left;d="bottom"==d&&g.top+g.height+i-l>n?"top":"top"==d&&g.top-l-i<0?"bottom":"right"==d&&g.right+h>m?"left":"left"==d&&g.left-h'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top()),"function"==typeof h&&(h=f.bottom());var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()}))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(window.jQuery);
--------------------------------------------------------------------------------