├── .gitignore ├── README.md ├── pom.xml ├── src ├── main │ ├── databases │ │ ├── h2 │ │ │ └── META-INF │ │ │ │ └── spring │ │ │ │ └── database.properties │ │ ├── hsql │ │ │ └── META-INF │ │ │ │ └── spring │ │ │ │ └── database.properties │ │ ├── mysql │ │ │ └── META-INF │ │ │ │ └── spring │ │ │ │ └── database.properties │ │ └── postgresql │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── database.properties │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── mvc │ │ │ ├── controller │ │ │ ├── HomeController.java │ │ │ └── PersonController.java │ │ │ ├── entity │ │ │ └── Person.java │ │ │ ├── listener │ │ │ └── ApplicationInitilizeListener.java │ │ │ ├── repository │ │ │ ├── PersonRepository.java │ │ │ └── custom │ │ │ │ └── PersonRepositoryCustom.java │ │ │ └── service │ │ │ ├── PersonService.java │ │ │ └── impl │ │ │ └── PersonServiceImpl.java │ ├── resources │ │ ├── META-INF │ │ │ ├── persistence.xml │ │ │ └── spring │ │ │ │ ├── appServlet │ │ │ │ └── servlet-context.xml │ │ │ │ ├── applicationContext.xml │ │ │ │ ├── database.properties │ │ │ │ └── database.xml │ │ ├── log4j.xml │ │ └── log4jdbc.properties │ └── webapp │ │ ├── WEB-INF │ │ ├── views │ │ │ ├── common │ │ │ │ ├── include.jsp │ │ │ │ └── layout.jsp │ │ │ ├── home.jsp │ │ │ └── person │ │ │ │ ├── form.jsp │ │ │ │ └── list.jsp │ │ └── web.xml │ │ ├── css │ │ └── bootstrap │ │ │ ├── bootstrap.css │ │ │ └── bootstrap.min.css │ │ ├── img │ │ ├── glyphicons-halflings-white.png │ │ └── glyphicons-halflings.png │ │ └── js │ │ ├── bootstrap │ │ ├── bootstrap-alert.js │ │ ├── bootstrap-button.js │ │ ├── bootstrap-carousel.js │ │ ├── bootstrap-collapse.js │ │ ├── bootstrap-dropdown.js │ │ ├── bootstrap-modal.js │ │ ├── bootstrap-popover.js │ │ ├── bootstrap-scrollspy.js │ │ ├── bootstrap-tab.js │ │ ├── bootstrap-tooltip.js │ │ ├── bootstrap-transition.js │ │ └── bootstrap-typeahead.js │ │ └── jquery-1.7.1.min.js └── test │ ├── java │ └── com │ │ └── example │ │ └── mvc │ │ ├── repository │ │ └── PersonRepositoryTest.java │ │ └── service │ │ └── impl │ │ └── PersonServiceImplTest.java │ └── resources │ └── test-context.xml └── test-all.sh /.gitignore: -------------------------------------------------------------------------------- 1 | log 2 | target 3 | .settings 4 | .classpath 5 | .project 6 | .springBeans 7 | .DS_Store 8 | *~ 9 | /.git 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **This project is obsolete!** 2 | 3 | Please refer https://github.com/terasolunaorg/terasoluna-gfw-web-blank 4 | 5 | 6 | ---- 7 | 8 | Web App Example Using Spring MVC & Spring Data JPA 9 | 10 | for MySQL(default) 11 | 12 | $ mvn clean test -P mysql 13 | $ mvn clean eclipse:clean eclipse:eclipse -P mysql 14 | 15 | for PostgreSQL 16 | 17 | $ mvn clean test -P postgresql 18 | $ mvn clean eclipse:clean eclipse:eclipse -P postgresql 19 | 20 | for H2 21 | 22 | $ mvn clean test -P h2 23 | $ mvn clean eclipse:clean eclipse:eclipse -P h2 24 | 25 | for HSQLDB 26 | 27 | $ mvn clean test -P hsqldb 28 | $ mvn clean eclipse:clean eclipse:eclipse -P hsqldb 29 | 30 | tested only on Tomcat7 (not use JTA) 31 | 32 | $ mvn clean tomcat7:run -P h2 33 | access http://localhost:8080/springmvc-jpa-blank 34 | 35 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | com.example 5 | springmvc-jpa-blank 6 | war 7 | 1.0.0 8 | 9 | 10 | 11 | ${resource.directory} 12 | 13 | 14 | ${basedir}/src/main/resources 15 | 16 | 17 | 18 | 19 | maven-eclipse-plugin 20 | 21 | 1.5 22 | true 23 | 24 | 25 | 26 | org.apache.maven.plugins 27 | maven-compiler-plugin 28 | 29 | ${java-version} 30 | ${java-version} 31 | 32 | 33 | 34 | org.apache.maven.plugins 35 | maven-dependency-plugin 36 | 37 | 38 | install 39 | install 40 | 41 | sources 42 | 43 | 44 | 45 | 46 | 47 | org.apache.maven.plugins 48 | maven-resources-plugin 49 | ${org.apache.maven.plugins.version} 50 | 51 | UTF-8 52 | 53 | 54 | 55 | org.apache.maven.plugins 56 | maven-war-plugin 57 | 58 | springmvc-jpa-blank 59 | 60 | 61 | 62 | org.apache.tomcat.maven 63 | tomcat7-maven-plugin 64 | ${org.apache.tomcat.maven.version} 65 | 66 | 67 | 68 | 69 | 70 | mysql 71 | 72 | 73 | mysql 74 | mysql-connector-java 75 | 5.1.17 76 | 77 | 78 | 79 | ${database.dir}/mysql 80 | 81 | 82 | 83 | postgresql 84 | 85 | 86 | postgresql 87 | postgresql 88 | 8.4-702.jdbc3 89 | 90 | 91 | 92 | ${database.dir}/postgresql 93 | 94 | 95 | 96 | h2 97 | 98 | true 99 | 100 | 101 | 102 | com.h2database 103 | h2 104 | 1.3.156 105 | 106 | 107 | 108 | ${database.dir}/h2 109 | 110 | 111 | 112 | hsql 113 | 114 | 115 | org.hsqldb 116 | hsqldb 117 | 1.8.0.10 118 | runtime 119 | 120 | 121 | 122 | ${database.dir}/hsql 123 | 124 | 125 | 126 | postgresql_jta 127 | 128 | ${database.dir}/postgresql_jta 129 | 130 | 131 | 132 | 133 | 134 | amateras 135 | Project Amateras Maven2 Repository 136 | http://amateras.sourceforge.jp/mvn/ 137 | 138 | 139 | spring-milestone 140 | Spring Maven MILESTONE Repository 141 | http://maven.springframework.org/milestone 142 | 143 | 144 | 145 | 146 | 147 | false 148 | 149 | 150 | true 151 | 152 | apache.snapshots 153 | Apache Snapshots 154 | http://repository.apache.org/content/groups/snapshots-group/ 155 | 156 | 157 | 158 | 159 | commons-dbcp 160 | commons-dbcp 161 | ${commons-dbcp.version} 162 | 163 | 164 | javax.inject 165 | javax.inject 166 | ${javax.inject.version} 167 | 168 | 169 | javax.servlet 170 | jstl 171 | ${javax.servlet.jstl.version} 172 | 173 | 174 | javax.transaction 175 | jta 176 | ${javax.transaction.version} 177 | 178 | 179 | javax.validation 180 | validation-api 181 | ${javax.validation.version} 182 | 183 | 184 | jp.sf.amateras.functions 185 | functions 186 | ${jp.sf.amateras.functions.version} 187 | 188 | 189 | jsonic 190 | net.arnx 191 | 192 | 193 | log4j 194 | log4j 195 | 196 | 197 | 198 | 199 | org.aspectj 200 | aspectjrt 201 | ${org.aspectj-version} 202 | 203 | 204 | org.hibernate 205 | hibernate-core 206 | ${org.hibernate.version} 207 | 208 | 209 | org.hibernate 210 | hibernate-entitymanager 211 | ${org.hibernate.version} 212 | 213 | 214 | cglib 215 | cglib 216 | 217 | 218 | dom4j 219 | dom4j 220 | 221 | 222 | 223 | 224 | org.hibernate 225 | hibernate-validator 226 | ${org.hibernate.hibernate-validator.version} 227 | 228 | 229 | org.hibernate.javax.persistence 230 | hibernate-jpa-2.0-api 231 | ${org.hibernate.javax.persistence.version} 232 | 233 | 234 | org.lazyluke 235 | log4jdbc-remix 236 | ${org.lazyluke.version} 237 | 238 | 239 | org.slf4j 240 | slf4j-api 241 | ${org.slf4j-version} 242 | 243 | 244 | org.springframework 245 | spring-aop 246 | ${org.springframework-version} 247 | 248 | 249 | org.springframework 250 | spring-aspects 251 | ${org.springframework-version} 252 | 253 | 254 | org.springframework 255 | spring-context 256 | ${org.springframework-version} 257 | 258 | 259 | commons-logging 260 | commons-logging 261 | 262 | 263 | 264 | 265 | org.springframework 266 | spring-context-support 267 | ${org.springframework-version} 268 | 269 | 270 | org.springframework 271 | spring-orm 272 | ${org.springframework-version} 273 | 274 | 275 | org.springframework 276 | spring-webmvc 277 | ${org.springframework-version} 278 | 279 | 280 | org.springframework.data 281 | spring-data-jpa 282 | ${org.springframework.data.version} 283 | 284 | 285 | javax.servlet 286 | servlet-api 287 | ${javax.servlet.version} 288 | provided 289 | 290 | 291 | javax.servlet.jsp 292 | jsp-api 293 | ${javax.servlet.jsp.version} 294 | provided 295 | 296 | 297 | log4j 298 | log4j 299 | ${log4j.version} 300 | runtime 301 | 302 | 303 | org.slf4j 304 | jcl-over-slf4j 305 | ${org.slf4j-version} 306 | runtime 307 | 308 | 309 | org.slf4j 310 | slf4j-log4j12 311 | ${org.slf4j-version} 312 | runtime 313 | 314 | 315 | cglib 316 | cglib-nodep 317 | ${cglib.version} 318 | test 319 | 320 | 321 | junit 322 | junit 323 | ${junit.version} 324 | test 325 | 326 | 327 | org.springframework 328 | spring-test 329 | ${org.springframework-version} 330 | test 331 | 332 | 333 | 334 | 2.2.2 335 | 1.2.2 336 | ${basedir}/src/main/databases 337 | 1.6 338 | 1 339 | 2.1 340 | 1.2 341 | 2.5 342 | 1.1 343 | 1.0.0.GA 344 | 1.1.2 345 | 4.7 346 | 1.2.16 347 | 2.5 348 | 2.0-SNAPSHOT 349 | 1.6.9 350 | 4.3.0.Final 351 | 1.0.1.Final 352 | 4.1.4.Final 353 | 0.2.7 354 | 1.6.2 355 | 3.1.2.RELEASE 356 | 1.1.0.RELEASE 357 | 358 | 359 | -------------------------------------------------------------------------------- /src/main/databases/h2/META-INF/spring/database.properties: -------------------------------------------------------------------------------- 1 | database=H2 2 | database.password= 3 | database.url=jdbc:log4jdbc:h2:mem:example 4 | database.username=sa 5 | database.driverClassName=net.sf.log4jdbc.DriverSpy -------------------------------------------------------------------------------- /src/main/databases/hsql/META-INF/spring/database.properties: -------------------------------------------------------------------------------- 1 | database=HSQL 2 | database.password= 3 | database.url=jdbc:log4jdbc:hsqldb:mem:example 4 | database.username=sa 5 | database.driverClassName=net.sf.log4jdbc.DriverSpy -------------------------------------------------------------------------------- /src/main/databases/mysql/META-INF/spring/database.properties: -------------------------------------------------------------------------------- 1 | database=MYSQL 2 | database.password= 3 | database.url=jdbc:log4jdbc:mysql://localhost:3306/bookstore?zeroDateTimeBehavior=convertToNull&characterEncoding=UTF-8&characterSetResults=UTF-8 4 | database.username=root 5 | database.driverClassName=net.sf.log4jdbc.DriverSpy -------------------------------------------------------------------------------- /src/main/databases/postgresql/META-INF/spring/database.properties: -------------------------------------------------------------------------------- 1 | database=POSTGRESQL 2 | database.password=P0stgres 3 | database.url=jdbc:log4jdbc:postgresql://192.168.11.119:5432/example 4 | database.username=postgres 5 | database.driverClassName=net.sf.log4jdbc.DriverSpy -------------------------------------------------------------------------------- /src/main/java/com/example/mvc/controller/HomeController.java: -------------------------------------------------------------------------------- 1 | package com.example.mvc.controller; 2 | 3 | import java.text.DateFormat; 4 | import java.util.Date; 5 | import java.util.Locale; 6 | 7 | import org.slf4j.Logger; 8 | import org.slf4j.LoggerFactory; 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.ui.Model; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RequestMethod; 13 | 14 | /** 15 | * Handles requests for the application home page. 16 | */ 17 | @Controller 18 | public class HomeController { 19 | 20 | private static final Logger logger = LoggerFactory 21 | .getLogger(HomeController.class); 22 | 23 | 24 | @RequestMapping(value = "/", method = RequestMethod.GET) 25 | public String home(Locale locale, Model model) { 26 | logger.info("Welcome home! the client locale is " + locale.toString()); 27 | 28 | Date date = new Date(); 29 | DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, 30 | DateFormat.LONG, locale); 31 | 32 | String formattedDate = dateFormat.format(date); 33 | 34 | model.addAttribute("serverTime", formattedDate); 35 | 36 | return "home"; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/example/mvc/controller/PersonController.java: -------------------------------------------------------------------------------- 1 | package com.example.mvc.controller; 2 | 3 | import javax.inject.Inject; 4 | import javax.validation.Valid; 5 | 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | import org.springframework.data.domain.Page; 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.ui.Model; 11 | import org.springframework.validation.BindingResult; 12 | import org.springframework.web.bind.annotation.ModelAttribute; 13 | import org.springframework.web.bind.annotation.PathVariable; 14 | import org.springframework.web.bind.annotation.RequestMapping; 15 | import org.springframework.web.bind.annotation.RequestMethod; 16 | import org.springframework.web.bind.annotation.RequestParam; 17 | 18 | import com.example.mvc.entity.Person; 19 | import com.example.mvc.service.PersonService; 20 | 21 | @Controller 22 | @RequestMapping("/person") 23 | public class PersonController { 24 | protected static final int DEFAULT_PAGE_NUM = 0; 25 | protected static final int DEFAULT_PAGE_SIZE = 5; 26 | 27 | @Inject 28 | protected PersonService personService; 29 | 30 | protected static final Logger LOGGER = LoggerFactory 31 | .getLogger(PersonController.class); 32 | 33 | @RequestMapping(value = "/list") 34 | public String list( 35 | @RequestParam(value = "page", required = false) Integer page, 36 | Model model) { 37 | int pageNum = page != null ? page : DEFAULT_PAGE_NUM; 38 | Page paging = personService.findAll(pageNum, DEFAULT_PAGE_SIZE); 39 | model.addAttribute("page", paging); 40 | return "/person/list"; 41 | } 42 | 43 | @RequestMapping(value = "/form", method = RequestMethod.GET) 44 | public @ModelAttribute 45 | Person create(Model model) { 46 | Person person = new Person(); 47 | return person; 48 | } 49 | 50 | @RequestMapping(value = "/form", method = RequestMethod.POST) 51 | public String createOnSubmit(@Valid Person person, 52 | BindingResult bindingResult, Model model) { 53 | LOGGER.debug("create person={}", person); 54 | if (bindingResult.hasErrors()) { 55 | LOGGER.warn("validation error={}", bindingResult.getModel()); 56 | model.addAllAttributes(bindingResult.getModel()); 57 | return "/person/form"; 58 | } 59 | personService.insert(person); 60 | return "redirect:/person/list"; 61 | } 62 | 63 | @RequestMapping(value = "/edit/{id}", method = RequestMethod.GET) 64 | public String edit(@PathVariable("id") Integer id, Model model) { 65 | Person person = personService.findById(id); 66 | model.addAttribute(person); 67 | return "/person/form"; 68 | } 69 | 70 | @RequestMapping(value = "/edit", method = RequestMethod.POST) 71 | public String editOnSubmit(@Valid Person person, 72 | BindingResult bindingResult, Model model) { 73 | LOGGER.debug("edit person={}", person); 74 | if (bindingResult.hasErrors()) { 75 | LOGGER.warn("validation error={}", bindingResult.getModel()); 76 | model.addAllAttributes(bindingResult.getModel()); 77 | return "/person/form"; 78 | } 79 | personService.update(person); 80 | return "redirect:/person/list"; 81 | } 82 | 83 | @RequestMapping(value = "/delete/{id}") 84 | public String delete( 85 | @RequestParam(value = "page", required = false) Integer page, 86 | @PathVariable("id") Integer id) { 87 | LOGGER.debug("delete id={}", id); 88 | personService.deleteById(id); 89 | 90 | return "redirect:/person/list"; 91 | } 92 | 93 | } 94 | -------------------------------------------------------------------------------- /src/main/java/com/example/mvc/entity/Person.java: -------------------------------------------------------------------------------- 1 | package com.example.mvc.entity; 2 | 3 | import java.io.Serializable; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.Id; 9 | import javax.persistence.Table; 10 | import javax.validation.constraints.Max; 11 | import javax.validation.constraints.Min; 12 | import javax.validation.constraints.NotNull; 13 | import javax.validation.constraints.Size; 14 | 15 | @Entity 16 | @Table(name = "T_PERSON") 17 | public class Person implements Serializable { 18 | private static final long serialVersionUID = 1L; 19 | 20 | @Id 21 | @Column(name = "PERSON_ID") 22 | @GeneratedValue 23 | private Integer id; 24 | 25 | @Column(name = "PERSON_NAME") 26 | @Size(min = 1, max = 30) 27 | @NotNull 28 | private String name; 29 | 30 | @Column(name = "AGE") 31 | @Min(1) 32 | @Max(200) 33 | @NotNull 34 | private Integer age; 35 | 36 | public Integer getId() { 37 | return id; 38 | } 39 | 40 | public void setId(Integer id) { 41 | this.id = id; 42 | } 43 | 44 | public String getName() { 45 | return name; 46 | } 47 | 48 | public void setName(String name) { 49 | this.name = name; 50 | } 51 | 52 | public Integer getAge() { 53 | return age; 54 | } 55 | 56 | public void setAge(Integer age) { 57 | this.age = age; 58 | } 59 | 60 | @Override 61 | public String toString() { 62 | return "Person [id=" + id + ", name=" + name + ", age=" + age + "]"; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/com/example/mvc/listener/ApplicationInitilizeListener.java: -------------------------------------------------------------------------------- 1 | package com.example.mvc.listener; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import javax.servlet.ServletContextEvent; 7 | import javax.servlet.ServletContextListener; 8 | 9 | import org.slf4j.Logger; 10 | import org.slf4j.LoggerFactory; 11 | import org.springframework.web.context.WebApplicationContext; 12 | import org.springframework.web.context.support.WebApplicationContextUtils; 13 | 14 | import com.example.mvc.entity.Person; 15 | import com.example.mvc.repository.PersonRepository; 16 | 17 | public class ApplicationInitilizeListener implements ServletContextListener { 18 | private static final Logger LOGGER = LoggerFactory 19 | .getLogger(ApplicationInitilizeListener.class); 20 | 21 | @Override 22 | public void contextInitialized(ServletContextEvent sce) { 23 | LOGGER.debug("initializing.."); 24 | WebApplicationContext ctx = WebApplicationContextUtils 25 | .getWebApplicationContext(sce.getServletContext()); 26 | PersonRepository personRepository = ctx.getBean(PersonRepository.class); 27 | personRepository.deleteAll(); 28 | List persons = new ArrayList(); 29 | 30 | int itemCount = 100; 31 | int chunkSize = 25; 32 | for (int i = 1; i <= itemCount; i++) { 33 | Person p = new Person(); 34 | p.setAge((i % 100) + 1); 35 | p.setName("name" + i); 36 | persons.add(p); 37 | if ((i % chunkSize) == 0) { 38 | personRepository.save(persons); 39 | persons.clear(); 40 | } 41 | } 42 | personRepository.save(persons); 43 | } 44 | 45 | @Override 46 | public void contextDestroyed(ServletContextEvent sce) { 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/example/mvc/repository/PersonRepository.java: -------------------------------------------------------------------------------- 1 | package com.example.mvc.repository; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | import com.example.mvc.entity.Person; 7 | 8 | public interface PersonRepository extends JpaRepository { 9 | Page findByNameLike(String name, Pageable pageable); 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/example/mvc/repository/custom/PersonRepositoryCustom.java: -------------------------------------------------------------------------------- 1 | package com.example.mvc.repository.custom; 2 | 3 | import org.springframework.data.domain.Page; 4 | import org.springframework.data.domain.Pageable; 5 | 6 | import com.example.mvc.entity.Person; 7 | 8 | public interface PersonRepositoryCustom { 9 | Page findByNameLike(String name, Pageable pageable); 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/example/mvc/service/PersonService.java: -------------------------------------------------------------------------------- 1 | package com.example.mvc.service; 2 | 3 | import org.springframework.data.domain.Page; 4 | 5 | import com.example.mvc.entity.Person; 6 | 7 | public interface PersonService { 8 | Page findAll(int page, int size); 9 | 10 | Page findByNameLike(String name, int page, int size); 11 | 12 | Person findById(Integer id); 13 | 14 | Person insert(Person person); 15 | 16 | Person update(Person person); 17 | 18 | void deleteById(Integer id); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/example/mvc/service/impl/PersonServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.example.mvc.service.impl; 2 | 3 | import javax.inject.Inject; 4 | 5 | import org.springframework.data.domain.Page; 6 | import org.springframework.data.domain.PageRequest; 7 | import org.springframework.data.domain.Pageable; 8 | import org.springframework.data.domain.Sort; 9 | import org.springframework.data.domain.Sort.Direction; 10 | import org.springframework.stereotype.Service; 11 | import org.springframework.transaction.annotation.Transactional; 12 | 13 | import com.example.mvc.entity.Person; 14 | import com.example.mvc.repository.PersonRepository; 15 | import com.example.mvc.service.PersonService; 16 | 17 | @Service 18 | public class PersonServiceImpl implements PersonService { 19 | @Inject 20 | protected PersonRepository personRepository; 21 | 22 | @Override 23 | @Transactional(readOnly = true) 24 | public Page findAll(int page, int size) { 25 | Pageable pageable = new PageRequest(page, size, new Sort( 26 | Direction.DESC, "id")); 27 | Page persons = personRepository.findAll(pageable); 28 | return persons; 29 | } 30 | 31 | @Override 32 | @Transactional(readOnly = true) 33 | public Page findByNameLike(String name, int page, int size) { 34 | Pageable pageable = new PageRequest(page, size, new Sort( 35 | Direction.DESC, "id")); 36 | String q = "%" + name + "%"; 37 | Page persons = personRepository.findByNameLike(q, pageable); 38 | return persons; 39 | } 40 | 41 | @Override 42 | @Transactional(readOnly = true) 43 | public Person findById(Integer id) { 44 | Person person = personRepository.findOne(id); 45 | return person; 46 | } 47 | 48 | @Override 49 | @Transactional 50 | public Person insert(Person person) { 51 | return personRepository.save(person); 52 | } 53 | 54 | @Override 55 | @Transactional 56 | public Person update(Person person) { 57 | return personRepository.save(person); 58 | } 59 | 60 | @Override 61 | @Transactional 62 | public void deleteById(Integer id) { 63 | personRepository.delete(id); 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 7 | 8 | 9 | 10 | 11 | 13 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/spring/appServlet/servlet-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/spring/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 15 | 16 | 17 | 18 | 20 | 21 | 22 | 23 | 25 | 26 | 27 | 28 | 29 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/spring/database.properties: -------------------------------------------------------------------------------- 1 | # dummy file (this file should be created under src/main/ per database) 2 | database= 3 | database.password= 4 | database.url= 5 | database.username= 6 | database.driverClassName= -------------------------------------------------------------------------------- /src/main/resources/META-INF/spring/database.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/main/resources/log4j.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /src/main/resources/log4jdbc.properties: -------------------------------------------------------------------------------- 1 | log4jdbc.dump.sql.maxlinelength=0 -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/common/include.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8"%> 2 | <%@ page pageEncoding="UTF-8"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> 5 | <%@ taglib uri="http://amateras.sf.jp/functions" prefix="f"%> 6 | <%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%> 7 | <%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%> 8 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/common/layout.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 9 | ${param.title} 10 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | Spring MVC JPA 55 | Blank App 56 | 57 | 58 | ${param.body} 59 | 60 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/home.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello! 5 | 6 | ${f:h(serverTime)} 7 | 8 | 9 | PERSON 10 | LIST 11 | PERSON 12 | CREATE 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/person/form.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 13 | 14 | Person 15 | 16 | name 17 | 18 | 20 | 23 | 24 | 25 | 26 | age 27 | 28 | 30 | 33 | 34 | 35 | 36 | 37 | 39 | Cancel 40 | 41 | 42 | 43 | 44 | list 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/person/list.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CREATE 6 | 7 | 9 | 10 | ID 11 | NAME 12 | AGE 13 | 14 | 15 | 16 | 17 | ${f:h(person.id)} 18 | ${f:h(person.name)} 19 | ${f:h(person.age)} 20 | 編集 削除 25 | 26 | 27 | 28 | 29 | ${f:h(page.number + 1)}/${f:h(page.totalPages)} 30 | 31 | 32 | 33 | « 34 | first 35 | 36 | 37 | < 39 | prev 40 | 41 | 42 | next 44 | > 45 | 46 | 47 | last 49 | » 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 9 | contextConfigLocation 10 | classpath*:META-INF/spring/applicationContext*.xml 11 | 12 | 13 | 14 | CharacterEncodingFilter 15 | org.springframework.web.filter.CharacterEncodingFilter 16 | 17 | encoding 18 | UTF-8 19 | 20 | 21 | forceEncoding 22 | true 23 | 24 | 25 | 26 | 27 | 28 | 29 | HttpMethodFilter 30 | org.springframework.web.filter.HiddenHttpMethodFilter 31 | 32 | 33 | 34 | Spring OpenEntityManagerInViewFilter 35 | org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter 36 | 37 | 38 | CharacterEncodingFilter 39 | /* 40 | 41 | 42 | 43 | HttpMethodFilter 44 | /* 45 | 46 | 47 | 48 | Spring OpenEntityManagerInViewFilter 49 | /* 50 | 51 | 52 | 53 | 54 | org.springframework.web.context.ContextLoaderListener 55 | 56 | 57 | 58 | com.example.mvc.listener.ApplicationInitilizeListener 59 | 60 | 61 | 62 | 63 | appServlet 64 | org.springframework.web.servlet.DispatcherServlet 65 | 66 | contextConfigLocation 67 | classpath:META-INF/spring/appServlet/servlet-context.xml 68 | 69 | 1 70 | 71 | 72 | 73 | appServlet 74 | / 75 | 76 | 77 | 78 | 79 | *.jsp 80 | false 81 | UTF-8 82 | false 83 | /WEB-INF/views/common/include.jsp 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /src/main/webapp/css/bootstrap/bootstrap.min.css: -------------------------------------------------------------------------------- 1 | article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;} 2 | audio,canvas,video{display:inline-block;*display:inline;*zoom:1;} 3 | audio:not([controls]){display:none;} 4 | html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;} 5 | a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} 6 | a:hover,a:active{outline:0;} 7 | sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;} 8 | sup{top:-0.5em;} 9 | sub{bottom:-0.25em;} 10 | img{max-width:100%;height:auto;border:0;-ms-interpolation-mode:bicubic;} 11 | button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;} 12 | button,input{*overflow:visible;line-height:normal;} 13 | button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;} 14 | button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;} 15 | input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;} 16 | input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;} 17 | textarea{overflow:auto;vertical-align:top;} 18 | body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;color:#333333;background-color:#ffffff;} 19 | a{color:#0088cc;text-decoration:none;} 20 | a:hover{color:#005580;text-decoration:underline;} 21 | .row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";} 22 | .row:after{clear:both;} 23 | [class*="span"]{float:left;margin-left:20px;} 24 | .span1{width:60px;} 25 | .span2{width:140px;} 26 | .span3{width:220px;} 27 | .span4{width:300px;} 28 | .span5{width:380px;} 29 | .span6{width:460px;} 30 | .span7{width:540px;} 31 | .span8{width:620px;} 32 | .span9{width:700px;} 33 | .span10{width:780px;} 34 | .span11{width:860px;} 35 | .span12,.container{width:940px;} 36 | .offset1{margin-left:100px;} 37 | .offset2{margin-left:180px;} 38 | .offset3{margin-left:260px;} 39 | .offset4{margin-left:340px;} 40 | .offset5{margin-left:420px;} 41 | .offset6{margin-left:500px;} 42 | .offset7{margin-left:580px;} 43 | .offset8{margin-left:660px;} 44 | .offset9{margin-left:740px;} 45 | .offset10{margin-left:820px;} 46 | .offset11{margin-left:900px;} 47 | .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";} 48 | .row-fluid:after{clear:both;} 49 | .row-fluid>[class*="span"]{float:left;margin-left:2.127659574%;} 50 | .row-fluid>[class*="span"]:first-child{margin-left:0;} 51 | .row-fluid .span1{width:6.382978723%;} 52 | .row-fluid .span2{width:14.89361702%;} 53 | .row-fluid .span3{width:23.404255317%;} 54 | .row-fluid .span4{width:31.914893614%;} 55 | .row-fluid .span5{width:40.425531911%;} 56 | .row-fluid .span6{width:48.93617020799999%;} 57 | .row-fluid .span7{width:57.446808505%;} 58 | .row-fluid .span8{width:65.95744680199999%;} 59 | .row-fluid .span9{width:74.468085099%;} 60 | .row-fluid .span10{width:82.97872339599999%;} 61 | .row-fluid .span11{width:91.489361693%;} 62 | .row-fluid .span12{width:99.99999998999999%;} 63 | .container{width:940px;margin-left:auto;margin-right:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";} 64 | .container:after{clear:both;} 65 | .container-fluid{padding-left:20px;padding-right:20px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";} 66 | .container-fluid:after{clear:both;} 67 | p{margin:0 0 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;}p small{font-size:11px;color:#999999;} 68 | .lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px;} 69 | h1,h2,h3,h4,h5,h6{margin:0;font-weight:bold;color:#333333;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;color:#999999;} 70 | h1{font-size:30px;line-height:36px;}h1 small{font-size:18px;} 71 | h2{font-size:24px;line-height:36px;}h2 small{font-size:18px;} 72 | h3{line-height:27px;font-size:18px;}h3 small{font-size:14px;} 73 | h4,h5,h6{line-height:18px;} 74 | h4{font-size:14px;}h4 small{font-size:12px;} 75 | h5{font-size:12px;} 76 | h6{font-size:11px;color:#999999;text-transform:uppercase;} 77 | .page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eeeeee;} 78 | .page-header h1{line-height:1;} 79 | ul,ol{padding:0;margin:0 0 9px 25px;} 80 | ul ul,ul ol,ol ol,ol ul{margin-bottom:0;} 81 | ul{list-style:disc;} 82 | ol{list-style:decimal;} 83 | li{line-height:18px;} 84 | ul.unstyled{margin-left:0;list-style:none;} 85 | dl{margin-bottom:18px;} 86 | dt,dd{line-height:18px;} 87 | dt{font-weight:bold;} 88 | dd{margin-left:9px;} 89 | hr{margin:18px 0;border:0;border-top:1px solid #e5e5e5;border-bottom:1px solid #ffffff;} 90 | strong{font-weight:bold;} 91 | em{font-style:italic;} 92 | .muted{color:#999999;} 93 | abbr{font-size:90%;text-transform:uppercase;border-bottom:1px dotted #ddd;cursor:help;} 94 | blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px;} 95 | blockquote small{display:block;line-height:18px;color:#999999;}blockquote small:before{content:'\2014 \00A0';} 96 | blockquote.pull-right{float:right;padding-left:0;padding-right:15px;border-left:0;border-right:5px solid #eeeeee;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;} 97 | q:before,q:after,blockquote:before,blockquote:after{content:"";} 98 | address{display:block;margin-bottom:18px;line-height:18px;font-style:normal;} 99 | small{font-size:100%;} 100 | cite{font-style:normal;} 101 | code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} 102 | code{padding:3px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;} 103 | pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12px;line-height:18px;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;white-space:pre;white-space:pre-wrap;word-break:break-all;}pre.prettyprint{margin-bottom:18px;} 104 | pre code{padding:0;background-color:transparent;} 105 | form{margin:0 0 18px;} 106 | fieldset{padding:0;margin:0;border:0;} 107 | legend{display:block;width:100%;padding:0;margin-bottom:27px;font-size:19.5px;line-height:36px;color:#333333;border:0;border-bottom:1px solid #eee;} 108 | label,input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:18px;} 109 | label{display:block;margin-bottom:5px;color:#333333;} 110 | input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;margin-bottom:9px;font-size:13px;line-height:18px;color:#555555;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} 111 | .uneditable-textarea{width:auto;height:auto;} 112 | label input,label textarea,label select{display:block;} 113 | input[type="image"],input[type="checkbox"],input[type="radio"]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;border:0;cursor:pointer;border-radius:0 \0/;} 114 | input[type="file"]{padding:initial;line-height:initial;border:initial;background-color:#ffffff;background-color:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} 115 | input[type="button"],input[type="reset"],input[type="submit"]{width:auto;height:auto;} 116 | select,input[type="file"]{height:28px;*margin-top:4px;line-height:28px;} 117 | select{width:220px;background-color:#ffffff;} 118 | select[multiple],select[size]{height:auto;} 119 | input[type="image"]{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} 120 | textarea{height:auto;} 121 | input[type="hidden"]{display:none;} 122 | .radio,.checkbox{padding-left:18px;} 123 | .radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px;} 124 | .controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px;} 125 | .radio.inline,.checkbox.inline{display:inline-block;margin-bottom:0;vertical-align:middle;} 126 | .radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px;} 127 | .controls>.radio.inline:first-child,.controls>.checkbox.inline:first-child{padding-top:0;} 128 | input,textarea{-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;} 129 | input:focus,textarea:focus{border-color:rgba(82, 168, 236, 0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);outline:0;outline:thin dotted \9;} 130 | input[type="file"]:focus,input[type="checkbox"]:focus,select:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} 131 | .input-mini{width:60px;} 132 | .input-small{width:90px;} 133 | .input-medium{width:150px;} 134 | .input-large{width:210px;} 135 | .input-xlarge{width:270px;} 136 | .input-xxlarge{width:530px;} 137 | input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{float:none;margin-left:0;} 138 | input.span1,textarea.span1,.uneditable-input.span1{width:50px;} 139 | input.span2,textarea.span2,.uneditable-input.span2{width:130px;} 140 | input.span3,textarea.span3,.uneditable-input.span3{width:210px;} 141 | input.span4,textarea.span4,.uneditable-input.span4{width:290px;} 142 | input.span5,textarea.span5,.uneditable-input.span5{width:370px;} 143 | input.span6,textarea.span6,.uneditable-input.span6{width:450px;} 144 | input.span7,textarea.span7,.uneditable-input.span7{width:530px;} 145 | input.span8,textarea.span8,.uneditable-input.span8{width:610px;} 146 | input.span9,textarea.span9,.uneditable-input.span9{width:690px;} 147 | input.span10,textarea.span10,.uneditable-input.span10{width:770px;} 148 | input.span11,textarea.span11,.uneditable-input.span11{width:850px;} 149 | input.span12,textarea.span12,.uneditable-input.span12{width:930px;} 150 | input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{background-color:#f5f5f5;border-color:#ddd;cursor:not-allowed;} 151 | .control-group.warning>label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853;} 152 | .control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;border-color:#c09853;}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:0 0 6px #dbc59e;-moz-box-shadow:0 0 6px #dbc59e;box-shadow:0 0 6px #dbc59e;} 153 | .control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853;} 154 | .control-group.error>label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48;} 155 | .control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;border-color:#b94a48;}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:0 0 6px #d59392;-moz-box-shadow:0 0 6px #d59392;box-shadow:0 0 6px #d59392;} 156 | .control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48;} 157 | .control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847;} 158 | .control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;border-color:#468847;}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:0 0 6px #7aba7b;-moz-box-shadow:0 0 6px #7aba7b;box-shadow:0 0 6px #7aba7b;} 159 | .control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847;} 160 | input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b;}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;} 161 | .form-actions{padding:17px 20px 18px;margin-top:18px;margin-bottom:18px;background-color:#f5f5f5;border-top:1px solid #ddd;} 162 | .uneditable-input{display:block;background-color:#ffffff;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;} 163 | :-moz-placeholder{color:#999999;} 164 | ::-webkit-input-placeholder{color:#999999;} 165 | .help-block{margin-top:5px;margin-bottom:0;color:#999999;} 166 | .help-inline{display:inline-block;*display:inline;*zoom:1;margin-bottom:9px;vertical-align:middle;padding-left:5px;} 167 | .input-prepend,.input-append{margin-bottom:5px;*zoom:1;}.input-prepend:before,.input-append:before,.input-prepend:after,.input-append:after{display:table;content:"";} 168 | .input-prepend:after,.input-append:after{clear:both;} 169 | .input-prepend input,.input-append input,.input-prepend .uneditable-input,.input-append .uneditable-input{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}.input-prepend input:focus,.input-append input:focus,.input-prepend .uneditable-input:focus,.input-append .uneditable-input:focus{position:relative;z-index:2;} 170 | .input-prepend .uneditable-input,.input-append .uneditable-input{border-left-color:#ccc;} 171 | .input-prepend .add-on,.input-append .add-on{float:left;display:block;width:auto;min-width:16px;height:18px;margin-right:-1px;padding:4px 5px;font-weight:normal;line-height:18px;color:#999999;text-align:center;text-shadow:0 1px 0 #ffffff;background-color:#f5f5f5;border:1px solid #ccc;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} 172 | .input-prepend .active,.input-append .active{background-color:#a9dba9;border-color:#46a546;} 173 | .input-prepend .add-on{*margin-top:1px;} 174 | .input-append input,.input-append .uneditable-input{float:left;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} 175 | .input-append .uneditable-input{border-right-color:#ccc;} 176 | .input-append .add-on{margin-right:0;margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;} 177 | .input-append input:first-child{*margin-left:-160px;}.input-append input:first-child+.add-on{*margin-left:-21px;} 178 | .search-query{padding-left:14px;padding-right:14px;margin-bottom:0;-webkit-border-radius:14px;-moz-border-radius:14px;border-radius:14px;} 179 | .form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input{display:inline-block;margin-bottom:0;} 180 | .form-search label,.form-inline label,.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{display:inline-block;} 181 | .form-search .input-append .add-on,.form-inline .input-prepend .add-on,.form-search .input-append .add-on,.form-inline .input-prepend .add-on{vertical-align:middle;} 182 | .control-group{margin-bottom:9px;} 183 | .form-horizontal legend+.control-group{margin-top:18px;-webkit-margin-top-collapse:separate;} 184 | .form-horizontal .control-group{margin-bottom:18px;*zoom:1;}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";} 185 | .form-horizontal .control-group:after{clear:both;} 186 | .form-horizontal .control-group>label{float:left;width:140px;padding-top:5px;text-align:right;} 187 | .form-horizontal .controls{margin-left:160px;} 188 | .form-horizontal .form-actions{padding-left:160px;} 189 | table{max-width:100%;border-collapse:collapse;border-spacing:0;} 190 | .table{width:100%;margin-bottom:18px;}.table th,.table td{padding:8px;line-height:18px;text-align:left;border-top:1px solid #ddd;} 191 | .table th{font-weight:bold;vertical-align:bottom;} 192 | .table td{vertical-align:top;} 193 | .table thead:first-child tr th,.table thead:first-child tr td{border-top:0;} 194 | .table tbody+tbody{border-top:2px solid #ddd;} 195 | .table-condensed th,.table-condensed td{padding:4px 5px;} 196 | .table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapsed;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th+th,.table-bordered td+td,.table-bordered th+td,.table-bordered td+th{border-left:1px solid #ddd;} 197 | .table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;} 198 | .table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0;} 199 | .table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;} 200 | .table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;} 201 | .table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0;} 202 | .table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;} 203 | table .span1{float:none;width:44px;margin-left:0;} 204 | table .span2{float:none;width:124px;margin-left:0;} 205 | table .span3{float:none;width:204px;margin-left:0;} 206 | table .span4{float:none;width:284px;margin-left:0;} 207 | table .span5{float:none;width:364px;margin-left:0;} 208 | table .span6{float:none;width:444px;margin-left:0;} 209 | table .span7{float:none;width:524px;margin-left:0;} 210 | table .span8{float:none;width:604px;margin-left:0;} 211 | table .span9{float:none;width:684px;margin-left:0;} 212 | table .span10{float:none;width:764px;margin-left:0;} 213 | table .span11{float:none;width:844px;margin-left:0;} 214 | table .span12{float:none;width:924px;margin-left:0;} 215 | [class^="icon-"]{display:inline-block;width:14px;height:14px;vertical-align:text-top;background-image:url(../img/glyphicons-halflings.png);background-position:14px 14px;background-repeat:no-repeat;*margin-right:.3em;}[class^="icon-"]:last-child{*margin-left:0;} 216 | .icon-white{background-image:url(../img/glyphicons-halflings-white.png);} 217 | .icon-glass{background-position:0 0;} 218 | .icon-music{background-position:-24px 0;} 219 | .icon-search{background-position:-48px 0;} 220 | .icon-envelope{background-position:-72px 0;} 221 | .icon-heart{background-position:-96px 0;} 222 | .icon-star{background-position:-120px 0;} 223 | .icon-star-empty{background-position:-144px 0;} 224 | .icon-user{background-position:-168px 0;} 225 | .icon-film{background-position:-192px 0;} 226 | .icon-th-large{background-position:-216px 0;} 227 | .icon-th{background-position:-240px 0;} 228 | .icon-th-list{background-position:-264px 0;} 229 | .icon-ok{background-position:-288px 0;} 230 | .icon-remove{background-position:-312px 0;} 231 | .icon-zoom-in{background-position:-336px 0;} 232 | .icon-zoom-out{background-position:-360px 0;} 233 | .icon-off{background-position:-384px 0;} 234 | .icon-signal{background-position:-408px 0;} 235 | .icon-cog{background-position:-432px 0;} 236 | .icon-trash{background-position:-456px 0;} 237 | .icon-home{background-position:0 -24px;} 238 | .icon-file{background-position:-24px -24px;} 239 | .icon-time{background-position:-48px -24px;} 240 | .icon-road{background-position:-72px -24px;} 241 | .icon-download-alt{background-position:-96px -24px;} 242 | .icon-download{background-position:-120px -24px;} 243 | .icon-upload{background-position:-144px -24px;} 244 | .icon-inbox{background-position:-168px -24px;} 245 | .icon-play-circle{background-position:-192px -24px;} 246 | .icon-repeat{background-position:-216px -24px;} 247 | .icon-refresh{background-position:-240px -24px;} 248 | .icon-list-alt{background-position:-264px -24px;} 249 | .icon-lock{background-position:-287px -24px;} 250 | .icon-flag{background-position:-312px -24px;} 251 | .icon-headphones{background-position:-336px -24px;} 252 | .icon-volume-off{background-position:-360px -24px;} 253 | .icon-volume-down{background-position:-384px -24px;} 254 | .icon-volume-up{background-position:-408px -24px;} 255 | .icon-qrcode{background-position:-432px -24px;} 256 | .icon-barcode{background-position:-456px -24px;} 257 | .icon-tag{background-position:0 -48px;} 258 | .icon-tags{background-position:-25px -48px;} 259 | .icon-book{background-position:-48px -48px;} 260 | .icon-bookmark{background-position:-72px -48px;} 261 | .icon-print{background-position:-96px -48px;} 262 | .icon-camera{background-position:-120px -48px;} 263 | .icon-font{background-position:-144px -48px;} 264 | .icon-bold{background-position:-167px -48px;} 265 | .icon-italic{background-position:-192px -48px;} 266 | .icon-text-height{background-position:-216px -48px;} 267 | .icon-text-width{background-position:-240px -48px;} 268 | .icon-align-left{background-position:-264px -48px;} 269 | .icon-align-center{background-position:-288px -48px;} 270 | .icon-align-right{background-position:-312px -48px;} 271 | .icon-align-justify{background-position:-336px -48px;} 272 | .icon-list{background-position:-360px -48px;} 273 | .icon-indent-left{background-position:-384px -48px;} 274 | .icon-indent-right{background-position:-408px -48px;} 275 | .icon-facetime-video{background-position:-432px -48px;} 276 | .icon-picture{background-position:-456px -48px;} 277 | .icon-pencil{background-position:0 -72px;} 278 | .icon-map-marker{background-position:-24px -72px;} 279 | .icon-adjust{background-position:-48px -72px;} 280 | .icon-tint{background-position:-72px -72px;} 281 | .icon-edit{background-position:-96px -72px;} 282 | .icon-share{background-position:-120px -72px;} 283 | .icon-check{background-position:-144px -72px;} 284 | .icon-move{background-position:-168px -72px;} 285 | .icon-step-backward{background-position:-192px -72px;} 286 | .icon-fast-backward{background-position:-216px -72px;} 287 | .icon-backward{background-position:-240px -72px;} 288 | .icon-play{background-position:-264px -72px;} 289 | .icon-pause{background-position:-288px -72px;} 290 | .icon-stop{background-position:-312px -72px;} 291 | .icon-forward{background-position:-336px -72px;} 292 | .icon-fast-forward{background-position:-360px -72px;} 293 | .icon-step-forward{background-position:-384px -72px;} 294 | .icon-eject{background-position:-408px -72px;} 295 | .icon-chevron-left{background-position:-432px -72px;} 296 | .icon-chevron-right{background-position:-456px -72px;} 297 | .icon-plus-sign{background-position:0 -96px;} 298 | .icon-minus-sign{background-position:-24px -96px;} 299 | .icon-remove-sign{background-position:-48px -96px;} 300 | .icon-ok-sign{background-position:-72px -96px;} 301 | .icon-question-sign{background-position:-96px -96px;} 302 | .icon-info-sign{background-position:-120px -96px;} 303 | .icon-screenshot{background-position:-144px -96px;} 304 | .icon-remove-circle{background-position:-168px -96px;} 305 | .icon-ok-circle{background-position:-192px -96px;} 306 | .icon-ban-circle{background-position:-216px -96px;} 307 | .icon-arrow-left{background-position:-240px -96px;} 308 | .icon-arrow-right{background-position:-264px -96px;} 309 | .icon-arrow-up{background-position:-289px -96px;} 310 | .icon-arrow-down{background-position:-312px -96px;} 311 | .icon-share-alt{background-position:-336px -96px;} 312 | .icon-resize-full{background-position:-360px -96px;} 313 | .icon-resize-small{background-position:-384px -96px;} 314 | .icon-plus{background-position:-408px -96px;} 315 | .icon-minus{background-position:-433px -96px;} 316 | .icon-asterisk{background-position:-456px -96px;} 317 | .icon-exclamation-sign{background-position:0 -120px;} 318 | .icon-gift{background-position:-24px -120px;} 319 | .icon-leaf{background-position:-48px -120px;} 320 | .icon-fire{background-position:-72px -120px;} 321 | .icon-eye-open{background-position:-96px -120px;} 322 | .icon-eye-close{background-position:-120px -120px;} 323 | .icon-warning-sign{background-position:-144px -120px;} 324 | .icon-plane{background-position:-168px -120px;} 325 | .icon-calendar{background-position:-192px -120px;} 326 | .icon-random{background-position:-216px -120px;} 327 | .icon-comment{background-position:-240px -120px;} 328 | .icon-magnet{background-position:-264px -120px;} 329 | .icon-chevron-up{background-position:-288px -120px;} 330 | .icon-chevron-down{background-position:-313px -119px;} 331 | .icon-retweet{background-position:-336px -120px;} 332 | .icon-shopping-cart{background-position:-360px -120px;} 333 | .icon-folder-close{background-position:-384px -120px;} 334 | .icon-folder-open{background-position:-408px -120px;} 335 | .icon-resize-vertical{background-position:-432px -119px;} 336 | .icon-resize-horizontal{background-position:-456px -118px;} 337 | .dropdown{position:relative;} 338 | .dropdown-toggle{*margin-bottom:-3px;} 339 | .dropdown-toggle:active,.open .dropdown-toggle{outline:0;} 340 | .caret{display:inline-block;width:0;height:0;text-indent:-99999px;*text-indent:0;vertical-align:top;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000000;opacity:0.3;filter:alpha(opacity=30);content:"\2193";} 341 | .dropdown .caret{margin-top:8px;margin-left:2px;} 342 | .dropdown:hover .caret,.open.dropdown .caret{opacity:1;filter:alpha(opacity=100);} 343 | .dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;float:left;display:none;min-width:160px;max-width:220px;_width:160px;padding:4px 0;margin:0;list-style:none;background-color:#ffffff;border-color:#ccc;border-color:rgba(0, 0, 0, 0.2);border-style:solid;border-width:1px;-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;*border-right-width:2px;*border-bottom-width:2px;}.dropdown-menu.bottom-up{top:auto;bottom:100%;margin-bottom:2px;} 344 | .dropdown-menu .divider{height:1px;margin:5px 1px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;*width:100%;*margin:-5px 0 5px;} 345 | .dropdown-menu a{display:block;padding:3px 15px;clear:both;font-weight:normal;line-height:18px;color:#555555;white-space:nowrap;} 346 | .dropdown-menu li>a:hover,.dropdown-menu .active>a,.dropdown-menu .active>a:hover{color:#ffffff;text-decoration:none;background-color:#0088cc;} 347 | .dropdown.open{*z-index:1000;}.dropdown.open .dropdown-toggle{color:#ffffff;background:#ccc;background:rgba(0, 0, 0, 0.3);} 348 | .dropdown.open .dropdown-menu{display:block;} 349 | .typeahead{margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} 350 | .well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #eee;border:1px solid rgba(0, 0, 0, 0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);} 351 | .fade{-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-ms-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;opacity:0;}.fade.in{opacity:1;} 352 | .collapse{-webkit-transition:height 0.35s ease;-moz-transition:height 0.35s ease;-ms-transition:height 0.35s ease;-o-transition:height 0.35s ease;transition:height 0.35s ease;position:relative;overflow:hidden;height:0;}.collapse.in{height:auto;} 353 | .close{float:right;font-size:20px;font-weight:bold;line-height:18px;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20);}.close:hover{color:#000000;text-decoration:none;opacity:0.4;filter:alpha(opacity=40);cursor:pointer;} 354 | .btn{display:inline-block;padding:4px 10px 4px;font-size:13px;line-height:18px;color:#333333;text-align:center;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);background-color:#fafafa;background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);background-image:-ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);border:1px solid #ccc;border-bottom-color:#bbb;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);cursor:pointer;*margin-left:.3em;}.btn:first-child{*margin-left:0;} 355 | .btn:hover{color:#333333;text-decoration:none;background-color:#e6e6e6;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-ms-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear;} 356 | .btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} 357 | .btn.active,.btn:active{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);background-color:#e6e6e6;background-color:#d9d9d9 \9;color:rgba(0, 0, 0, 0.5);outline:0;} 358 | .btn.disabled,.btn[disabled]{cursor:default;background-image:none;background-color:#e6e6e6;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} 359 | .btn-large{padding:9px 14px;font-size:15px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;} 360 | .btn-large .icon{margin-top:1px;} 361 | .btn-small{padding:5px 9px;font-size:11px;line-height:16px;} 362 | .btn-small .icon{margin-top:-1px;} 363 | .btn-primary,.btn-primary:hover,.btn-warning,.btn-warning:hover,.btn-danger,.btn-danger:hover,.btn-success,.btn-success:hover,.btn-info,.btn-info:hover{text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);color:#ffffff;} 364 | .btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active{color:rgba(255, 255, 255, 0.75);} 365 | .btn-primary{background-color:#006dcc;background-image:-moz-linear-gradient(top, #0088cc, #0044cc);background-image:-ms-linear-gradient(top, #0088cc, #0044cc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));background-image:-webkit-linear-gradient(top, #0088cc, #0044cc);background-image:-o-linear-gradient(top, #0088cc, #0044cc);background-image:linear-gradient(top, #0088cc, #0044cc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);border-color:#0044cc #0044cc #002a80;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{background-color:#0044cc;} 366 | .btn-primary:active,.btn-primary.active{background-color:#003399 \9;} 367 | .btn-warning{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-ms-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(top, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{background-color:#f89406;} 368 | .btn-warning:active,.btn-warning.active{background-color:#c67605 \9;} 369 | .btn-danger{background-color:#da4f49;background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:-ms-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(top, #ee5f5b, #bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{background-color:#bd362f;} 370 | .btn-danger:active,.btn-danger.active{background-color:#942a25 \9;} 371 | .btn-success{background-color:#5bb75b;background-image:-moz-linear-gradient(top, #62c462, #51a351);background-image:-ms-linear-gradient(top, #62c462, #51a351);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image:-webkit-linear-gradient(top, #62c462, #51a351);background-image:-o-linear-gradient(top, #62c462, #51a351);background-image:linear-gradient(top, #62c462, #51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{background-color:#51a351;} 372 | .btn-success:active,.btn-success.active{background-color:#408140 \9;} 373 | .btn-info{background-color:#49afcd;background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:-ms-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(top, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{background-color:#2f96b4;} 374 | .btn-info:active,.btn-info.active{background-color:#24748c \9;} 375 | button.btn,input[type="submit"].btn{*padding-top:2px;*padding-bottom:2px;}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;} 376 | button.btn.large,input[type="submit"].btn.large{*padding-top:7px;*padding-bottom:7px;} 377 | button.btn.small,input[type="submit"].btn.small{*padding-top:3px;*padding-bottom:3px;} 378 | .btn-group{position:relative;*zoom:1;*margin-left:.3em;}.btn-group:before,.btn-group:after{display:table;content:"";} 379 | .btn-group:after{clear:both;} 380 | .btn-group:first-child{*margin-left:0;} 381 | .btn-group+.btn-group{margin-left:5px;} 382 | .btn-toolbar{margin-top:9px;margin-bottom:9px;}.btn-toolbar .btn-group{display:inline-block;*display:inline;*zoom:1;} 383 | .btn-group .btn{position:relative;float:left;margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} 384 | .btn-group .btn:first-child{margin-left:0;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;} 385 | .btn-group .btn:last-child,.btn-group .dropdown-toggle{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;} 386 | .btn-group .btn.large:first-child{margin-left:0;-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;} 387 | .btn-group .btn.large:last-child,.btn-group .large.dropdown-toggle{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px;} 388 | .btn-group .btn:hover,.btn-group .btn:focus,.btn-group .btn:active,.btn-group .btn.active{z-index:2;} 389 | .btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0;} 390 | .btn-group .dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);*padding-top:5px;*padding-bottom:5px;} 391 | .btn-group.open{*z-index:1000;}.btn-group.open .dropdown-menu{display:block;margin-top:1px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;} 392 | .btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 1px 6px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 6px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 6px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);} 393 | .btn .caret{margin-top:7px;margin-left:0;} 394 | .btn:hover .caret,.open.btn-group .caret{opacity:1;filter:alpha(opacity=100);} 395 | .btn-primary .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret{border-top-color:#ffffff;opacity:0.75;filter:alpha(opacity=75);} 396 | .btn-small .caret{margin-top:4px;} 397 | .alert{padding:8px 35px 8px 14px;margin-bottom:18px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} 398 | .alert,.alert-heading{color:#c09853;} 399 | .alert .close{position:relative;top:-2px;right:-21px;line-height:18px;} 400 | .alert-success{background-color:#dff0d8;border-color:#d6e9c6;} 401 | .alert-success,.alert-success .alert-heading{color:#468847;} 402 | .alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;} 403 | .alert-danger,.alert-error,.alert-danger .alert-heading,.alert-error .alert-heading{color:#b94a48;} 404 | .alert-info{background-color:#d9edf7;border-color:#bce8f1;} 405 | .alert-info,.alert-info .alert-heading{color:#3a87ad;} 406 | .alert-block{padding-top:14px;padding-bottom:14px;} 407 | .alert-block>p,.alert-block>ul{margin-bottom:0;} 408 | .alert-block p+p{margin-top:5px;} 409 | .nav{margin-left:0;margin-bottom:18px;list-style:none;} 410 | .nav>li>a{display:block;} 411 | .nav>li>a:hover{text-decoration:none;background-color:#eeeeee;} 412 | .nav-list{padding-left:14px;padding-right:14px;margin-bottom:0;} 413 | .nav-list>li>a,.nav-list .nav-header{display:block;padding:3px 15px;margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);} 414 | .nav-list .nav-header{font-size:11px;font-weight:bold;line-height:18px;color:#999999;text-transform:uppercase;} 415 | .nav-list>li+.nav-header{margin-top:9px;} 416 | .nav-list .active>a{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.2);background-color:#0088cc;} 417 | .nav-list .icon{margin-right:2px;} 418 | .nav-tabs,.nav-pills{*zoom:1;}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";} 419 | .nav-tabs:after,.nav-pills:after{clear:both;} 420 | .nav-tabs>li,.nav-pills>li{float:left;} 421 | .nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px;} 422 | .nav-tabs{border-bottom:1px solid #ddd;} 423 | .nav-tabs>li{margin-bottom:-1px;} 424 | .nav-tabs>li>a{padding-top:9px;padding-bottom:9px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #dddddd;} 425 | .nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555555;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;} 426 | .nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;} 427 | .nav-pills .active>a,.nav-pills .active>a:hover{color:#ffffff;background-color:#0088cc;} 428 | .nav-stacked>li{float:none;} 429 | .nav-stacked>li>a{margin-right:0;} 430 | .nav-tabs.nav-stacked{border-bottom:0;} 431 | .nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} 432 | .nav-tabs.nav-stacked>li:first-child>a{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;} 433 | .nav-tabs.nav-stacked>li:last-child>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;} 434 | .nav-tabs.nav-stacked>li>a:hover{border-color:#ddd;z-index:2;} 435 | .nav-pills.nav-stacked>li>a{margin-bottom:3px;} 436 | .nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px;} 437 | .nav-tabs .dropdown-menu,.nav-pills .dropdown-menu{margin-top:1px;border-width:1px;} 438 | .nav-pills .dropdown-menu{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} 439 | .nav-tabs .dropdown-toggle .caret,.nav-pills .dropdown-toggle .caret{border-top-color:#0088cc;margin-top:6px;} 440 | .nav-tabs .dropdown-toggle:hover .caret,.nav-pills .dropdown-toggle:hover .caret{border-top-color:#005580;} 441 | .nav-tabs .active .dropdown-toggle .caret,.nav-pills .active .dropdown-toggle .caret{border-top-color:#333333;} 442 | .nav>.dropdown.active>a:hover{color:#000000;cursor:pointer;} 443 | .nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>.open.active>a:hover{color:#ffffff;background-color:#999999;border-color:#999999;} 444 | .nav .open .caret,.nav .open.active .caret,.nav .open a:hover .caret{border-top-color:#ffffff;opacity:1;filter:alpha(opacity=100);} 445 | .tabs-stacked .open>a:hover{border-color:#999999;} 446 | .tabbable{*zoom:1;}.tabbable:before,.tabbable:after{display:table;content:"";} 447 | .tabbable:after{clear:both;} 448 | .tabs-below .nav-tabs,.tabs-right .nav-tabs,.tabs-left .nav-tabs{border-bottom:0;} 449 | .tab-content>.tab-pane,.pill-content>.pill-pane{display:none;} 450 | .tab-content>.active,.pill-content>.active{display:block;} 451 | .tabs-below .nav-tabs{border-top:1px solid #ddd;} 452 | .tabs-below .nav-tabs>li{margin-top:-1px;margin-bottom:0;} 453 | .tabs-below .nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.tabs-below .nav-tabs>li>a:hover{border-bottom-color:transparent;border-top-color:#ddd;} 454 | .tabs-below .nav-tabs .active>a,.tabs-below .nav-tabs .active>a:hover{border-color:transparent #ddd #ddd #ddd;} 455 | .tabs-left .nav-tabs>li,.tabs-right .nav-tabs>li{float:none;} 456 | .tabs-left .nav-tabs>li>a,.tabs-right .nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px;} 457 | .tabs-left .nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd;} 458 | .tabs-left .nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;} 459 | .tabs-left .nav-tabs>li>a:hover{border-color:#eeeeee #dddddd #eeeeee #eeeeee;} 460 | .tabs-left .nav-tabs .active>a,.tabs-left .nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#ffffff;} 461 | .tabs-right .nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd;} 462 | .tabs-right .nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;} 463 | .tabs-right .nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #eeeeee #dddddd;} 464 | .tabs-right .nav-tabs .active>a,.tabs-right .nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#ffffff;} 465 | .navbar{overflow:visible;margin-bottom:18px;} 466 | .navbar-inner{padding-left:20px;padding-right:20px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);} 467 | .btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);}.btn-navbar:hover,.btn-navbar:active,.btn-navbar.active,.btn-navbar.disabled,.btn-navbar[disabled]{background-color:#222222;} 468 | .btn-navbar:active,.btn-navbar.active{background-color:#080808 \9;} 469 | .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);-moz-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);} 470 | .btn-navbar .icon-bar+.icon-bar{margin-top:3px;} 471 | .nav-collapse.collapse{height:auto;} 472 | .navbar .brand:hover{text-decoration:none;} 473 | .navbar .brand{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;font-size:20px;font-weight:200;line-height:1;color:#ffffff;} 474 | .navbar .navbar-text{margin-bottom:0;line-height:40px;color:#999999;}.navbar .navbar-text a:hover{color:#ffffff;background-color:transparent;} 475 | .navbar .btn,.navbar .btn-group{margin-top:5px;} 476 | .navbar .btn-group .btn{margin-top:0;} 477 | .navbar-form{margin-bottom:0;*zoom:1;}.navbar-form:before,.navbar-form:after{display:table;content:"";} 478 | .navbar-form:after{clear:both;} 479 | .navbar-form input,.navbar-form select{display:inline-block;margin-top:5px;margin-bottom:0;} 480 | .navbar-form .radio,.navbar-form .checkbox{margin-top:5px;} 481 | .navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px;} 482 | .navbar-search{position:relative;float:left;margin-top:6px;margin-bottom:0;}.navbar-search .search-query{padding:4px 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;color:#ffffff;color:rgba(255, 255, 255, 0.75);background:#666;background:rgba(255, 255, 255, 0.3);border:1px solid #111;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;}.navbar-search .search-query :-moz-placeholder{color:#eeeeee;} 483 | .navbar-search .search-query::-webkit-input-placeholder{color:#eeeeee;} 484 | .navbar-search .search-query:hover{color:#ffffff;background-color:#999999;background-color:rgba(255, 255, 255, 0.5);} 485 | .navbar-search .search-query:focus,.navbar-search .search-query.focused{padding:5px 10px;color:#333333;text-shadow:0 1px 0 #ffffff;background-color:#ffffff;border:0;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);outline:0;} 486 | .navbar-fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030;} 487 | .navbar-fixed-top .navbar-inner{padding-left:0;padding-right:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} 488 | .navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0;} 489 | .navbar .nav.pull-right{float:right;} 490 | .navbar .nav>li{display:block;float:left;} 491 | .navbar .nav>li>a{float:none;padding:10px 10px 11px;line-height:19px;color:#999999;text-decoration:none;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);} 492 | .navbar .nav>li>a:hover{background-color:transparent;color:#ffffff;text-decoration:none;} 493 | .navbar .nav .active>a,.navbar .nav .active>a:hover{color:#ffffff;text-decoration:none;background-color:#222222;background-color:rgba(0, 0, 0, 0.5);} 494 | .navbar .divider-vertical{height:40px;width:1px;margin:0 9px;overflow:hidden;background-color:#222222;border-right:1px solid #333333;} 495 | .navbar .nav.pull-right{margin-left:10px;margin-right:0;} 496 | .navbar .dropdown-menu{margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.navbar .dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0, 0, 0, 0.2);position:absolute;top:-7px;left:9px;} 497 | .navbar .dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #ffffff;position:absolute;top:-6px;left:10px;} 498 | .navbar .nav .dropdown-toggle .caret,.navbar .nav .open.dropdown .caret{border-top-color:#ffffff;} 499 | .navbar .nav .active .caret{opacity:1;filter:alpha(opacity=100);} 500 | .navbar .nav .open>.dropdown-toggle,.navbar .nav .active>.dropdown-toggle,.navbar .nav .open.active>.dropdown-toggle{background-color:transparent;} 501 | .navbar .nav .active>.dropdown-toggle:hover{color:#ffffff;} 502 | .navbar .nav.pull-right .dropdown-menu{left:auto;right:0;}.navbar .nav.pull-right .dropdown-menu:before{left:auto;right:12px;} 503 | .navbar .nav.pull-right .dropdown-menu:after{left:auto;right:13px;} 504 | .breadcrumb{padding:7px 14px;margin:0 0 18px;background-color:#fbfbfb;background-image:-moz-linear-gradient(top, #ffffff, #f5f5f5);background-image:-ms-linear-gradient(top, #ffffff, #f5f5f5);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f5f5f5));background-image:-webkit-linear-gradient(top, #ffffff, #f5f5f5);background-image:-o-linear-gradient(top, #ffffff, #f5f5f5);background-image:linear-gradient(top, #ffffff, #f5f5f5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;}.breadcrumb li{display:inline;text-shadow:0 1px 0 #ffffff;} 505 | .breadcrumb .divider{padding:0 5px;color:#999999;} 506 | .breadcrumb .active a{color:#333333;} 507 | .pagination{height:36px;margin:18px 0;} 508 | .pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);} 509 | .pagination li{display:inline;} 510 | .pagination a{float:left;padding:0 14px;line-height:34px;text-decoration:none;border:1px solid #ddd;border-left-width:0;} 511 | .pagination a:hover,.pagination .active a{background-color:#f5f5f5;} 512 | .pagination .active a{color:#999999;cursor:default;} 513 | .pagination .disabled a,.pagination .disabled a:hover{color:#999999;background-color:transparent;cursor:default;} 514 | .pagination li:first-child a{border-left-width:1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} 515 | .pagination li:last-child a{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;} 516 | .pagination-centered{text-align:center;} 517 | .pagination-right{text-align:right;} 518 | .pager{margin-left:0;margin-bottom:18px;list-style:none;text-align:center;*zoom:1;}.pager:before,.pager:after{display:table;content:"";} 519 | .pager:after{clear:both;} 520 | .pager li{display:inline;} 521 | .pager a{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;} 522 | .pager a:hover{text-decoration:none;background-color:#f5f5f5;} 523 | .pager .next a{float:right;} 524 | .pager .previous a{float:left;} 525 | .modal-open .dropdown-menu{z-index:2050;} 526 | .modal-open .dropdown.open{*z-index:2050;} 527 | .modal-open .popover{z-index:2060;} 528 | .modal-open .tooltip{z-index:2070;} 529 | .modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000000;}.modal-backdrop.fade{opacity:0;} 530 | .modal-backdrop,.modal-backdrop.fade.in{opacity:0.8;filter:alpha(opacity=80);} 531 | .modal{position:fixed;top:50%;left:50%;z-index:1050;max-height:500px;overflow:auto;width:560px;margin:-250px 0 0 -280px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.modal.fade{-webkit-transition:opacity .3s linear, top .3s ease-out;-moz-transition:opacity .3s linear, top .3s ease-out;-ms-transition:opacity .3s linear, top .3s ease-out;-o-transition:opacity .3s linear, top .3s ease-out;transition:opacity .3s linear, top .3s ease-out;top:-25%;} 532 | .modal.fade.in{top:50%;} 533 | .modal-header{padding:9px 15px;border-bottom:1px solid #eee;}.modal-header .close{margin-top:2px;} 534 | .modal-body{padding:15px;} 535 | .modal-footer{padding:14px 15px 15px;margin-bottom:0;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;*zoom:1;}.modal-footer:before,.modal-footer:after{display:table;content:"";} 536 | .modal-footer:after{clear:both;} 537 | .modal-footer .btn{float:right;margin-left:5px;margin-bottom:0;} 538 | .tooltip{position:absolute;z-index:1020;display:block;visibility:visible;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0);}.tooltip.in{opacity:0.8;filter:alpha(opacity=80);} 539 | .tooltip.top{margin-top:-2px;} 540 | .tooltip.right{margin-left:2px;} 541 | .tooltip.bottom{margin-top:2px;} 542 | .tooltip.left{margin-left:-2px;} 543 | .tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;} 544 | .tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;} 545 | .tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;} 546 | .tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;} 547 | .tooltip-inner{max-width:200px;padding:3px 8px;color:#ffffff;text-align:center;text-decoration:none;background-color:#000000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} 548 | .tooltip-arrow{position:absolute;width:0;height:0;} 549 | .popover{position:absolute;top:0;left:0;z-index:1010;display:none;padding:5px;}.popover.top{margin-top:-5px;} 550 | .popover.right{margin-left:5px;} 551 | .popover.bottom{margin-top:5px;} 552 | .popover.left{margin-left:-5px;} 553 | .popover.top .arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;} 554 | .popover.right .arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;} 555 | .popover.bottom .arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;} 556 | .popover.left .arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;} 557 | .popover .arrow{position:absolute;width:0;height:0;} 558 | .popover-inner{padding:3px;width:280px;overflow:hidden;background:#000000;background:rgba(0, 0, 0, 0.8);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);} 559 | .popover-title{padding:9px 15px;line-height:1;background-color:#f5f5f5;border-bottom:1px solid #eee;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;} 560 | .popover-content{padding:14px;background-color:#ffffff;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.popover-content p,.popover-content ul,.popover-content ol{margin-bottom:0;} 561 | .thumbnails{margin-left:-20px;list-style:none;*zoom:1;}.thumbnails:before,.thumbnails:after{display:table;content:"";} 562 | .thumbnails:after{clear:both;} 563 | .thumbnails>li{float:left;margin:0 0 18px 20px;} 564 | .thumbnail{display:block;padding:4px;line-height:1;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);} 565 | a.thumbnail:hover{border-color:#0088cc;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);} 566 | .thumbnail>img{display:block;max-width:100%;margin-left:auto;margin-right:auto;} 567 | .thumbnail .caption{padding:9px;} 568 | .label{padding:1px 3px 2px;font-size:9.75px;font-weight:bold;color:#ffffff;text-transform:uppercase;background-color:#999999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} 569 | .label-important{background-color:#b94a48;} 570 | .label-warning{background-color:#f89406;} 571 | .label-success{background-color:#468847;} 572 | .label-info{background-color:#3a87ad;} 573 | @-webkit-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@-moz-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}.progress{overflow:hidden;height:18px;margin-bottom:18px;background-color:#f7f7f7;background-image:-moz-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-ms-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));background-image:-webkit-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-o-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:linear-gradient(top, #f5f5f5, #f9f9f9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} 574 | .progress .bar{width:0%;height:18px;color:#ffffff;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top, #149bdf, #0480be);background-image:-ms-linear-gradient(top, #149bdf, #0480be);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));background-image:-webkit-linear-gradient(top, #149bdf, #0480be);background-image:-o-linear-gradient(top, #149bdf, #0480be);background-image:linear-gradient(top, #149bdf, #0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#149bdf', endColorstr='#0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width 0.6s ease;-moz-transition:width 0.6s ease;-ms-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease;} 575 | .progress-striped .bar{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px;} 576 | .progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite;} 577 | .progress-danger .bar{background-color:#dd514c;background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-ms-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(top, #ee5f5b, #c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);} 578 | .progress-danger.progress-striped .bar{background-color:#ee5f5b;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} 579 | .progress-success .bar{background-color:#5eb95e;background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-ms-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(top, #62c462, #57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);} 580 | .progress-success.progress-striped .bar{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} 581 | .progress-info .bar{background-color:#4bb1cf;background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-ms-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(top, #5bc0de, #339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);} 582 | .progress-info.progress-striped .bar{background-color:#5bc0de;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} 583 | .accordion{margin-bottom:18px;} 584 | .accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} 585 | .accordion-heading{border-bottom:0;} 586 | .accordion-heading .accordion-toggle{display:block;padding:8px 15px;} 587 | .accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5;} 588 | .carousel{position:relative;margin-bottom:18px;line-height:1;} 589 | .carousel-inner{overflow:hidden;width:100%;position:relative;} 590 | .carousel .item{display:none;position:relative;-webkit-transition:0.6s ease-in-out left;-moz-transition:0.6s ease-in-out left;-ms-transition:0.6s ease-in-out left;-o-transition:0.6s ease-in-out left;transition:0.6s ease-in-out left;} 591 | .carousel .item>img{display:block;line-height:1;} 592 | .carousel .active,.carousel .next,.carousel .prev{display:block;} 593 | .carousel .active{left:0;} 594 | .carousel .next,.carousel .prev{position:absolute;top:0;width:100%;} 595 | .carousel .next{left:100%;} 596 | .carousel .prev{left:-100%;} 597 | .carousel .next.left,.carousel .prev.right{left:0;} 598 | .carousel .active.left{left:-100%;} 599 | .carousel .active.right{left:100%;} 600 | .carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#ffffff;text-align:center;background:#222222;border:3px solid #ffffff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:0.5;filter:alpha(opacity=50);}.carousel-control.right{left:auto;right:15px;} 601 | .carousel-control:hover{color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90);} 602 | .carousel-caption{position:absolute;left:0;right:0;bottom:0;padding:10px 15px 5px;background:#333333;background:rgba(0, 0, 0, 0.75);} 603 | .carousel-caption h4,.carousel-caption p{color:#ffffff;} 604 | .hero-unit{padding:60px;margin-bottom:30px;background-color:#f5f5f5;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;} 605 | .hero-unit p{font-size:18px;font-weight:200;line-height:27px;} 606 | .pull-right{float:right;} 607 | .pull-left{float:left;} 608 | .hide{display:none;} 609 | .show{display:block;} 610 | .invisible{visibility:hidden;} 611 | -------------------------------------------------------------------------------- /src/main/webapp/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/making/springmvc-jpa-blank/db22fe7e7c9b6abb6452abf9ca2eeb7c39cf42ed/src/main/webapp/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /src/main/webapp/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/making/springmvc-jpa-blank/db22fe7e7c9b6abb6452abf9ca2eeb7c39cf42ed/src/main/webapp/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /src/main/webapp/js/bootstrap/bootstrap-alert.js: -------------------------------------------------------------------------------- 1 | /* ========================================================== 2 | * bootstrap-alert.js v2.0.0 3 | * http://twitter.github.com/bootstrap/javascript.html#alerts 4 | * ========================================================== 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ========================================================== */ 19 | 20 | 21 | !function( $ ){ 22 | 23 | "use strict" 24 | 25 | /* ALERT CLASS DEFINITION 26 | * ====================== */ 27 | 28 | var dismiss = '[data-dismiss="alert"]' 29 | , Alert = function ( el ) { 30 | $(el).on('click', dismiss, this.close) 31 | } 32 | 33 | Alert.prototype = { 34 | 35 | constructor: Alert 36 | 37 | , close: function ( e ) { 38 | var $this = $(this) 39 | , selector = $this.attr('data-target') 40 | , $parent 41 | 42 | if (!selector) { 43 | selector = $this.attr('href') 44 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 45 | } 46 | 47 | $parent = $(selector) 48 | $parent.trigger('close') 49 | 50 | e && e.preventDefault() 51 | 52 | $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) 53 | 54 | $parent.removeClass('in') 55 | 56 | function removeElement() { 57 | $parent.remove() 58 | $parent.trigger('closed') 59 | } 60 | 61 | $.support.transition && $parent.hasClass('fade') ? 62 | $parent.on($.support.transition.end, removeElement) : 63 | removeElement() 64 | } 65 | 66 | } 67 | 68 | 69 | /* ALERT PLUGIN DEFINITION 70 | * ======================= */ 71 | 72 | $.fn.alert = function ( option ) { 73 | return this.each(function () { 74 | var $this = $(this) 75 | , data = $this.data('alert') 76 | if (!data) $this.data('alert', (data = new Alert(this))) 77 | if (typeof option == 'string') data[option].call($this) 78 | }) 79 | } 80 | 81 | $.fn.alert.Constructor = Alert 82 | 83 | 84 | /* ALERT DATA-API 85 | * ============== */ 86 | 87 | $(function () { 88 | $('body').on('click.alert.data-api', dismiss, Alert.prototype.close) 89 | }) 90 | 91 | }( window.jQuery ) 92 | -------------------------------------------------------------------------------- /src/main/webapp/js/bootstrap/bootstrap-button.js: -------------------------------------------------------------------------------- 1 | /* ============================================================ 2 | * bootstrap-button.js v2.0.0 3 | * http://twitter.github.com/bootstrap/javascript.html#buttons 4 | * ============================================================ 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ============================================================ */ 19 | 20 | !function( $ ){ 21 | 22 | "use strict" 23 | 24 | /* BUTTON PUBLIC CLASS DEFINITION 25 | * ============================== */ 26 | 27 | var Button = function ( element, options ) { 28 | this.$element = $(element) 29 | this.options = $.extend({}, $.fn.button.defaults, options) 30 | } 31 | 32 | Button.prototype = { 33 | 34 | constructor: Button 35 | 36 | , setState: function ( state ) { 37 | var d = 'disabled' 38 | , $el = this.$element 39 | , data = $el.data() 40 | , val = $el.is('input') ? 'val' : 'html' 41 | 42 | state = state + 'Text' 43 | data.resetText || $el.data('resetText', $el[val]()) 44 | 45 | $el[val](data[state] || this.options[state]) 46 | 47 | // push to event loop to allow forms to submit 48 | setTimeout(function () { 49 | state == 'loadingText' ? 50 | $el.addClass(d).attr(d, d) : 51 | $el.removeClass(d).removeAttr(d) 52 | }, 0) 53 | } 54 | 55 | , toggle: function () { 56 | var $parent = this.$element.parent('[data-toggle="buttons-radio"]') 57 | 58 | $parent && $parent 59 | .find('.active') 60 | .removeClass('active') 61 | 62 | this.$element.toggleClass('active') 63 | } 64 | 65 | } 66 | 67 | 68 | /* BUTTON PLUGIN DEFINITION 69 | * ======================== */ 70 | 71 | $.fn.button = function ( option ) { 72 | return this.each(function () { 73 | var $this = $(this) 74 | , data = $this.data('button') 75 | , options = typeof option == 'object' && option 76 | if (!data) $this.data('button', (data = new Button(this, options))) 77 | if (option == 'toggle') data.toggle() 78 | else if (option) data.setState(option) 79 | }) 80 | } 81 | 82 | $.fn.button.defaults = { 83 | loadingText: 'loading...' 84 | } 85 | 86 | $.fn.button.Constructor = Button 87 | 88 | 89 | /* BUTTON DATA-API 90 | * =============== */ 91 | 92 | $(function () { 93 | $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) { 94 | $(e.target).button('toggle') 95 | }) 96 | }) 97 | 98 | }( window.jQuery ) 99 | -------------------------------------------------------------------------------- /src/main/webapp/js/bootstrap/bootstrap-carousel.js: -------------------------------------------------------------------------------- 1 | /* ========================================================== 2 | * bootstrap-carousel.js v2.0.0 3 | * http://twitter.github.com/bootstrap/javascript.html#carousel 4 | * ========================================================== 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ========================================================== */ 19 | 20 | 21 | !function( $ ){ 22 | 23 | "use strict" 24 | 25 | /* CAROUSEL CLASS DEFINITION 26 | * ========================= */ 27 | 28 | var Carousel = function (element, options) { 29 | this.$element = $(element) 30 | this.options = $.extend({}, $.fn.carousel.defaults, options) 31 | this.options.slide && this.slide(this.options.slide) 32 | } 33 | 34 | Carousel.prototype = { 35 | 36 | cycle: function () { 37 | this.interval = setInterval($.proxy(this.next, this), this.options.interval) 38 | return this 39 | } 40 | 41 | , to: function (pos) { 42 | var $active = this.$element.find('.active') 43 | , children = $active.parent().children() 44 | , activePos = children.index($active) 45 | , that = this 46 | 47 | if (pos > (children.length - 1) || pos < 0) return 48 | 49 | if (this.sliding) { 50 | return this.$element.one('slid', function () { 51 | that.to(pos) 52 | }) 53 | } 54 | 55 | if (activePos == pos) { 56 | return this.pause().cycle() 57 | } 58 | 59 | return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos])) 60 | } 61 | 62 | , pause: function () { 63 | clearInterval(this.interval) 64 | return this 65 | } 66 | 67 | , next: function () { 68 | if (this.sliding) return 69 | return this.slide('next') 70 | } 71 | 72 | , prev: function () { 73 | if (this.sliding) return 74 | return this.slide('prev') 75 | } 76 | 77 | , slide: function (type, next) { 78 | var $active = this.$element.find('.active') 79 | , $next = next || $active[type]() 80 | , isCycling = this.interval 81 | , direction = type == 'next' ? 'left' : 'right' 82 | , fallback = type == 'next' ? 'first' : 'last' 83 | , that = this 84 | 85 | this.sliding = true 86 | 87 | isCycling && this.pause() 88 | 89 | $next = $next.length ? $next : this.$element.find('.item')[fallback]() 90 | 91 | if (!$.support.transition && this.$element.hasClass('slide')) { 92 | this.$element.trigger('slide') 93 | $active.removeClass('active') 94 | $next.addClass('active') 95 | this.sliding = false 96 | this.$element.trigger('slid') 97 | } else { 98 | $next.addClass(type) 99 | $next[0].offsetWidth // force reflow 100 | $active.addClass(direction) 101 | $next.addClass(direction) 102 | this.$element.trigger('slide') 103 | this.$element.one($.support.transition.end, function () { 104 | $next.removeClass([type, direction].join(' ')).addClass('active') 105 | $active.removeClass(['active', direction].join(' ')) 106 | that.sliding = false 107 | setTimeout(function () { that.$element.trigger('slid') }, 0) 108 | }) 109 | } 110 | 111 | isCycling && this.cycle() 112 | 113 | return this 114 | } 115 | 116 | } 117 | 118 | 119 | /* CAROUSEL PLUGIN DEFINITION 120 | * ========================== */ 121 | 122 | $.fn.carousel = function ( option ) { 123 | return this.each(function () { 124 | var $this = $(this) 125 | , data = $this.data('carousel') 126 | , options = typeof option == 'object' && option 127 | if (!data) $this.data('carousel', (data = new Carousel(this, options))) 128 | if (typeof option == 'number') data.to(option) 129 | else if (typeof option == 'string' || (option = options.slide)) data[option]() 130 | else data.cycle() 131 | }) 132 | } 133 | 134 | $.fn.carousel.defaults = { 135 | interval: 5000 136 | } 137 | 138 | $.fn.carousel.Constructor = Carousel 139 | 140 | 141 | /* CAROUSEL DATA-API 142 | * ================= */ 143 | 144 | $(function () { 145 | $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) { 146 | var $this = $(this), href 147 | , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 148 | , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data()) 149 | $target.carousel(options) 150 | e.preventDefault() 151 | }) 152 | }) 153 | 154 | }( window.jQuery ) 155 | -------------------------------------------------------------------------------- /src/main/webapp/js/bootstrap/bootstrap-collapse.js: -------------------------------------------------------------------------------- 1 | /* ============================================================= 2 | * bootstrap-collapse.js v2.0.0 3 | * http://twitter.github.com/bootstrap/javascript.html#collapse 4 | * ============================================================= 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ============================================================ */ 19 | 20 | !function( $ ){ 21 | 22 | "use strict" 23 | 24 | var Collapse = function ( element, options ) { 25 | this.$element = $(element) 26 | this.options = $.extend({}, $.fn.collapse.defaults, options) 27 | 28 | if (this.options["parent"]) { 29 | this.$parent = $(this.options["parent"]) 30 | } 31 | 32 | this.options.toggle && this.toggle() 33 | } 34 | 35 | Collapse.prototype = { 36 | 37 | constructor: Collapse 38 | 39 | , dimension: function () { 40 | var hasWidth = this.$element.hasClass('width') 41 | return hasWidth ? 'width' : 'height' 42 | } 43 | 44 | , show: function () { 45 | var dimension = this.dimension() 46 | , scroll = $.camelCase(['scroll', dimension].join('-')) 47 | , actives = this.$parent && this.$parent.find('.in') 48 | , hasData 49 | 50 | if (actives && actives.length) { 51 | hasData = actives.data('collapse') 52 | actives.collapse('hide') 53 | hasData || actives.data('collapse', null) 54 | } 55 | 56 | this.$element[dimension](0) 57 | this.transition('addClass', 'show', 'shown') 58 | this.$element[dimension](this.$element[0][scroll]) 59 | 60 | } 61 | 62 | , hide: function () { 63 | var dimension = this.dimension() 64 | this.reset(this.$element[dimension]()) 65 | this.transition('removeClass', 'hide', 'hidden') 66 | this.$element[dimension](0) 67 | } 68 | 69 | , reset: function ( size ) { 70 | var dimension = this.dimension() 71 | 72 | this.$element 73 | .removeClass('collapse') 74 | [dimension](size || 'auto') 75 | [0].offsetWidth 76 | 77 | this.$element.addClass('collapse') 78 | } 79 | 80 | , transition: function ( method, startEvent, completeEvent ) { 81 | var that = this 82 | , complete = function () { 83 | if (startEvent == 'show') that.reset() 84 | that.$element.trigger(completeEvent) 85 | } 86 | 87 | this.$element 88 | .trigger(startEvent) 89 | [method]('in') 90 | 91 | $.support.transition && this.$element.hasClass('collapse') ? 92 | this.$element.one($.support.transition.end, complete) : 93 | complete() 94 | } 95 | 96 | , toggle: function () { 97 | this[this.$element.hasClass('in') ? 'hide' : 'show']() 98 | } 99 | 100 | } 101 | 102 | /* COLLAPSIBLE PLUGIN DEFINITION 103 | * ============================== */ 104 | 105 | $.fn.collapse = function ( option ) { 106 | return this.each(function () { 107 | var $this = $(this) 108 | , data = $this.data('collapse') 109 | , options = typeof option == 'object' && option 110 | if (!data) $this.data('collapse', (data = new Collapse(this, options))) 111 | if (typeof option == 'string') data[option]() 112 | }) 113 | } 114 | 115 | $.fn.collapse.defaults = { 116 | toggle: true 117 | } 118 | 119 | $.fn.collapse.Constructor = Collapse 120 | 121 | 122 | /* COLLAPSIBLE DATA-API 123 | * ==================== */ 124 | 125 | $(function () { 126 | $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) { 127 | var $this = $(this), href 128 | , target = $this.attr('data-target') 129 | || e.preventDefault() 130 | || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 131 | , option = $(target).data('collapse') ? 'toggle' : $this.data() 132 | $(target).collapse(option) 133 | }) 134 | }) 135 | 136 | }( window.jQuery ) 137 | -------------------------------------------------------------------------------- /src/main/webapp/js/bootstrap/bootstrap-dropdown.js: -------------------------------------------------------------------------------- 1 | /* ============================================================ 2 | * bootstrap-dropdown.js v2.0.0 3 | * http://twitter.github.com/bootstrap/javascript.html#dropdowns 4 | * ============================================================ 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ============================================================ */ 19 | 20 | 21 | !function( $ ){ 22 | 23 | "use strict" 24 | 25 | /* DROPDOWN CLASS DEFINITION 26 | * ========================= */ 27 | 28 | var toggle = '[data-toggle="dropdown"]' 29 | , Dropdown = function ( element ) { 30 | var $el = $(element).on('click.dropdown.data-api', this.toggle) 31 | $('html').on('click.dropdown.data-api', function () { 32 | $el.parent().removeClass('open') 33 | }) 34 | } 35 | 36 | Dropdown.prototype = { 37 | 38 | constructor: Dropdown 39 | 40 | , toggle: function ( e ) { 41 | var $this = $(this) 42 | , selector = $this.attr('data-target') 43 | , $parent 44 | , isActive 45 | 46 | if (!selector) { 47 | selector = $this.attr('href') 48 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 49 | } 50 | 51 | $parent = $(selector) 52 | $parent.length || ($parent = $this.parent()) 53 | 54 | isActive = $parent.hasClass('open') 55 | 56 | clearMenus() 57 | !isActive && $parent.toggleClass('open') 58 | 59 | return false 60 | } 61 | 62 | } 63 | 64 | function clearMenus() { 65 | $(toggle).parent().removeClass('open') 66 | } 67 | 68 | 69 | /* DROPDOWN PLUGIN DEFINITION 70 | * ========================== */ 71 | 72 | $.fn.dropdown = function ( option ) { 73 | return this.each(function () { 74 | var $this = $(this) 75 | , data = $this.data('dropdown') 76 | if (!data) $this.data('dropdown', (data = new Dropdown(this))) 77 | if (typeof option == 'string') data[option].call($this) 78 | }) 79 | } 80 | 81 | $.fn.dropdown.Constructor = Dropdown 82 | 83 | 84 | /* APPLY TO STANDARD DROPDOWN ELEMENTS 85 | * =================================== */ 86 | 87 | $(function () { 88 | $('html').on('click.dropdown.data-api', clearMenus) 89 | $('body').on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle) 90 | }) 91 | 92 | }( window.jQuery ) 93 | -------------------------------------------------------------------------------- /src/main/webapp/js/bootstrap/bootstrap-modal.js: -------------------------------------------------------------------------------- 1 | /* ========================================================= 2 | * bootstrap-modal.js v2.0.0 3 | * http://twitter.github.com/bootstrap/javascript.html#modals 4 | * ========================================================= 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ========================================================= */ 19 | 20 | 21 | !function( $ ){ 22 | 23 | "use strict" 24 | 25 | /* MODAL CLASS DEFINITION 26 | * ====================== */ 27 | 28 | var Modal = function ( content, options ) { 29 | this.options = $.extend({}, $.fn.modal.defaults, options) 30 | this.$element = $(content) 31 | .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) 32 | } 33 | 34 | Modal.prototype = { 35 | 36 | constructor: Modal 37 | 38 | , toggle: function () { 39 | return this[!this.isShown ? 'show' : 'hide']() 40 | } 41 | 42 | , show: function () { 43 | var that = this 44 | 45 | if (this.isShown) return 46 | 47 | $('body').addClass('modal-open') 48 | 49 | this.isShown = true 50 | this.$element.trigger('show') 51 | 52 | escape.call(this) 53 | backdrop.call(this, function () { 54 | var transition = $.support.transition && that.$element.hasClass('fade') 55 | 56 | !that.$element.parent().length && that.$element.appendTo(document.body) //don't move modals dom position 57 | 58 | that.$element 59 | .show() 60 | 61 | if (transition) { 62 | that.$element[0].offsetWidth // force reflow 63 | } 64 | 65 | that.$element.addClass('in') 66 | 67 | transition ? 68 | that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : 69 | that.$element.trigger('shown') 70 | 71 | }) 72 | } 73 | 74 | , hide: function ( e ) { 75 | e && e.preventDefault() 76 | 77 | if (!this.isShown) return 78 | 79 | var that = this 80 | this.isShown = false 81 | 82 | $('body').removeClass('modal-open') 83 | 84 | escape.call(this) 85 | 86 | this.$element 87 | .trigger('hide') 88 | .removeClass('in') 89 | 90 | $.support.transition && this.$element.hasClass('fade') ? 91 | hideWithTransition.call(this) : 92 | hideModal.call(this) 93 | } 94 | 95 | } 96 | 97 | 98 | /* MODAL PRIVATE METHODS 99 | * ===================== */ 100 | 101 | function hideWithTransition() { 102 | var that = this 103 | , timeout = setTimeout(function () { 104 | that.$element.off($.support.transition.end) 105 | hideModal.call(that) 106 | }, 500) 107 | 108 | this.$element.one($.support.transition.end, function () { 109 | clearTimeout(timeout) 110 | hideModal.call(that) 111 | }) 112 | } 113 | 114 | function hideModal( that ) { 115 | this.$element 116 | .hide() 117 | .trigger('hidden') 118 | 119 | backdrop.call(this) 120 | } 121 | 122 | function backdrop( callback ) { 123 | var that = this 124 | , animate = this.$element.hasClass('fade') ? 'fade' : '' 125 | 126 | if (this.isShown && this.options.backdrop) { 127 | var doAnimate = $.support.transition && animate 128 | 129 | this.$backdrop = $('') 130 | .appendTo(document.body) 131 | 132 | if (this.options.backdrop != 'static') { 133 | this.$backdrop.click($.proxy(this.hide, this)) 134 | } 135 | 136 | if (doAnimate) this.$backdrop[0].offsetWidth // force reflow 137 | 138 | this.$backdrop.addClass('in') 139 | 140 | doAnimate ? 141 | this.$backdrop.one($.support.transition.end, callback) : 142 | callback() 143 | 144 | } else if (!this.isShown && this.$backdrop) { 145 | this.$backdrop.removeClass('in') 146 | 147 | $.support.transition && this.$element.hasClass('fade')? 148 | this.$backdrop.one($.support.transition.end, $.proxy(removeBackdrop, this)) : 149 | removeBackdrop.call(this) 150 | 151 | } else if (callback) { 152 | callback() 153 | } 154 | } 155 | 156 | function removeBackdrop() { 157 | this.$backdrop.remove() 158 | this.$backdrop = null 159 | } 160 | 161 | function escape() { 162 | var that = this 163 | if (this.isShown && this.options.keyboard) { 164 | $(document).on('keyup.dismiss.modal', function ( e ) { 165 | e.which == 27 && that.hide() 166 | }) 167 | } else if (!this.isShown) { 168 | $(document).off('keyup.dismiss.modal') 169 | } 170 | } 171 | 172 | 173 | /* MODAL PLUGIN DEFINITION 174 | * ======================= */ 175 | 176 | $.fn.modal = function ( option ) { 177 | return this.each(function () { 178 | var $this = $(this) 179 | , data = $this.data('modal') 180 | , options = typeof option == 'object' && option 181 | if (!data) $this.data('modal', (data = new Modal(this, options))) 182 | if (typeof option == 'string') data[option]() 183 | else data.show() 184 | }) 185 | } 186 | 187 | $.fn.modal.defaults = { 188 | backdrop: true 189 | , keyboard: true 190 | } 191 | 192 | $.fn.modal.Constructor = Modal 193 | 194 | 195 | /* MODAL DATA-API 196 | * ============== */ 197 | 198 | $(function () { 199 | $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) { 200 | var $this = $(this), href 201 | , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 202 | , option = $target.data('modal') ? 'toggle' : $.extend({}, $target.data(), $this.data()) 203 | 204 | e.preventDefault() 205 | $target.modal(option) 206 | }) 207 | }) 208 | 209 | }( window.jQuery ) 210 | -------------------------------------------------------------------------------- /src/main/webapp/js/bootstrap/bootstrap-popover.js: -------------------------------------------------------------------------------- 1 | /* =========================================================== 2 | * bootstrap-popover.js v2.0.0 3 | * http://twitter.github.com/bootstrap/javascript.html#popovers 4 | * =========================================================== 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================================================== */ 19 | 20 | 21 | !function( $ ) { 22 | 23 | "use strict" 24 | 25 | var Popover = function ( element, options ) { 26 | this.init('popover', element, options) 27 | } 28 | 29 | /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js 30 | ========================================== */ 31 | 32 | Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, { 33 | 34 | constructor: Popover 35 | 36 | , setContent: function () { 37 | var $tip = this.tip() 38 | , title = this.getTitle() 39 | , content = this.getContent() 40 | 41 | $tip.find('.popover-title')[ $.type(title) == 'object' ? 'append' : 'html' ](title) 42 | $tip.find('.popover-content > *')[ $.type(content) == 'object' ? 'append' : 'html' ](content) 43 | 44 | $tip.removeClass('fade top bottom left right in') 45 | } 46 | 47 | , hasContent: function () { 48 | return this.getTitle() || this.getContent() 49 | } 50 | 51 | , getContent: function () { 52 | var content 53 | , $e = this.$element 54 | , o = this.options 55 | 56 | content = $e.attr('data-content') 57 | || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content) 58 | 59 | content = content.toString().replace(/(^\s*|\s*$)/, "") 60 | 61 | return content 62 | } 63 | 64 | , tip: function() { 65 | if (!this.$tip) { 66 | this.$tip = $(this.options.template) 67 | } 68 | return this.$tip 69 | } 70 | 71 | }) 72 | 73 | 74 | /* POPOVER PLUGIN DEFINITION 75 | * ======================= */ 76 | 77 | $.fn.popover = function ( option ) { 78 | return this.each(function () { 79 | var $this = $(this) 80 | , data = $this.data('popover') 81 | , options = typeof option == 'object' && option 82 | if (!data) $this.data('popover', (data = new Popover(this, options))) 83 | if (typeof option == 'string') data[option]() 84 | }) 85 | } 86 | 87 | $.fn.popover.Constructor = Popover 88 | 89 | $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, { 90 | placement: 'right' 91 | , content: '' 92 | , template: '' 93 | }) 94 | 95 | }( window.jQuery ) 96 | -------------------------------------------------------------------------------- /src/main/webapp/js/bootstrap/bootstrap-scrollspy.js: -------------------------------------------------------------------------------- 1 | /* ============================================================= 2 | * bootstrap-scrollspy.js v2.0.0 3 | * http://twitter.github.com/bootstrap/javascript.html#scrollspy 4 | * ============================================================= 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ============================================================== */ 19 | 20 | !function ( $ ) { 21 | 22 | "use strict" 23 | 24 | /* SCROLLSPY CLASS DEFINITION 25 | * ========================== */ 26 | 27 | function ScrollSpy( element, options) { 28 | var process = $.proxy(this.process, this) 29 | , $element = $(element).is('body') ? $(window) : $(element) 30 | , href 31 | this.options = $.extend({}, $.fn.scrollspy.defaults, options) 32 | this.$scrollElement = $element.on('scroll.scroll.data-api', process) 33 | this.selector = (this.options.target 34 | || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 35 | || '') + ' .nav li > a' 36 | this.$body = $('body').on('click.scroll.data-api', this.selector, process) 37 | this.refresh() 38 | this.process() 39 | } 40 | 41 | ScrollSpy.prototype = { 42 | 43 | constructor: ScrollSpy 44 | 45 | , refresh: function () { 46 | this.targets = this.$body 47 | .find(this.selector) 48 | .map(function () { 49 | var href = $(this).attr('href') 50 | return /^#\w/.test(href) && $(href).length ? href : null 51 | }) 52 | 53 | this.offsets = $.map(this.targets, function (id) { 54 | return $(id).position().top 55 | }) 56 | } 57 | 58 | , process: function () { 59 | var scrollTop = this.$scrollElement.scrollTop() + this.options.offset 60 | , offsets = this.offsets 61 | , targets = this.targets 62 | , activeTarget = this.activeTarget 63 | , i 64 | 65 | for (i = offsets.length; i--;) { 66 | activeTarget != targets[i] 67 | && scrollTop >= offsets[i] 68 | && (!offsets[i + 1] || scrollTop <= offsets[i + 1]) 69 | && this.activate( targets[i] ) 70 | } 71 | } 72 | 73 | , activate: function (target) { 74 | var active 75 | 76 | this.activeTarget = target 77 | 78 | this.$body 79 | .find(this.selector).parent('.active') 80 | .removeClass('active') 81 | 82 | active = this.$body 83 | .find(this.selector + '[href="' + target + '"]') 84 | .parent('li') 85 | .addClass('active') 86 | 87 | if ( active.parent('.dropdown-menu') ) { 88 | active.closest('li.dropdown').addClass('active') 89 | } 90 | } 91 | 92 | } 93 | 94 | 95 | /* SCROLLSPY PLUGIN DEFINITION 96 | * =========================== */ 97 | 98 | $.fn.scrollspy = function ( option ) { 99 | return this.each(function () { 100 | var $this = $(this) 101 | , data = $this.data('scrollspy') 102 | , options = typeof option == 'object' && option 103 | if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options))) 104 | if (typeof option == 'string') data[option]() 105 | }) 106 | } 107 | 108 | $.fn.scrollspy.Constructor = ScrollSpy 109 | 110 | $.fn.scrollspy.defaults = { 111 | offset: 10 112 | } 113 | 114 | 115 | /* SCROLLSPY DATA-API 116 | * ================== */ 117 | 118 | $(function () { 119 | $('[data-spy="scroll"]').each(function () { 120 | var $spy = $(this) 121 | $spy.scrollspy($spy.data()) 122 | }) 123 | }) 124 | 125 | }( window.jQuery ) 126 | -------------------------------------------------------------------------------- /src/main/webapp/js/bootstrap/bootstrap-tab.js: -------------------------------------------------------------------------------- 1 | /* ======================================================== 2 | * bootstrap-tab.js v2.0.0 3 | * http://twitter.github.com/bootstrap/javascript.html#tabs 4 | * ======================================================== 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ======================================================== */ 19 | 20 | 21 | !function( $ ){ 22 | 23 | "use strict" 24 | 25 | /* TAB CLASS DEFINITION 26 | * ==================== */ 27 | 28 | var Tab = function ( element ) { 29 | this.element = $(element) 30 | } 31 | 32 | Tab.prototype = { 33 | 34 | constructor: Tab 35 | 36 | , show: function () { 37 | var $this = this.element 38 | , $ul = $this.closest('ul:not(.dropdown-menu)') 39 | , selector = $this.attr('data-target') 40 | , previous 41 | , $target 42 | 43 | if (!selector) { 44 | selector = $this.attr('href') 45 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 46 | } 47 | 48 | if ( $this.parent('li').hasClass('active') ) return 49 | 50 | previous = $ul.find('.active a').last()[0] 51 | 52 | $this.trigger({ 53 | type: 'show' 54 | , relatedTarget: previous 55 | }) 56 | 57 | $target = $(selector) 58 | 59 | this.activate($this.parent('li'), $ul) 60 | this.activate($target, $target.parent(), function () { 61 | $this.trigger({ 62 | type: 'shown' 63 | , relatedTarget: previous 64 | }) 65 | }) 66 | } 67 | 68 | , activate: function ( element, container, callback) { 69 | var $active = container.find('> .active') 70 | , transition = callback 71 | && $.support.transition 72 | && $active.hasClass('fade') 73 | 74 | function next() { 75 | $active 76 | .removeClass('active') 77 | .find('> .dropdown-menu > .active') 78 | .removeClass('active') 79 | 80 | element.addClass('active') 81 | 82 | if (transition) { 83 | element[0].offsetWidth // reflow for transition 84 | element.addClass('in') 85 | } else { 86 | element.removeClass('fade') 87 | } 88 | 89 | if ( element.parent('.dropdown-menu') ) { 90 | element.closest('li.dropdown').addClass('active') 91 | } 92 | 93 | callback && callback() 94 | } 95 | 96 | transition ? 97 | $active.one($.support.transition.end, next) : 98 | next() 99 | 100 | $active.removeClass('in') 101 | } 102 | } 103 | 104 | 105 | /* TAB PLUGIN DEFINITION 106 | * ===================== */ 107 | 108 | $.fn.tab = function ( option ) { 109 | return this.each(function () { 110 | var $this = $(this) 111 | , data = $this.data('tab') 112 | if (!data) $this.data('tab', (data = new Tab(this))) 113 | if (typeof option == 'string') data[option]() 114 | }) 115 | } 116 | 117 | $.fn.tab.Constructor = Tab 118 | 119 | 120 | /* TAB DATA-API 121 | * ============ */ 122 | 123 | $(function () { 124 | $('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) { 125 | e.preventDefault() 126 | $(this).tab('show') 127 | }) 128 | }) 129 | 130 | }( window.jQuery ) 131 | -------------------------------------------------------------------------------- /src/main/webapp/js/bootstrap/bootstrap-tooltip.js: -------------------------------------------------------------------------------- 1 | /* =========================================================== 2 | * bootstrap-tooltip.js v2.0.0 3 | * http://twitter.github.com/bootstrap/javascript.html#tooltips 4 | * Inspired by the original jQuery.tipsy by Jason Frame 5 | * =========================================================== 6 | * Copyright 2012 Twitter, Inc. 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | * ========================================================== */ 20 | 21 | !function( $ ) { 22 | 23 | "use strict" 24 | 25 | /* TOOLTIP PUBLIC CLASS DEFINITION 26 | * =============================== */ 27 | 28 | var Tooltip = function ( element, options ) { 29 | this.init('tooltip', element, options) 30 | } 31 | 32 | Tooltip.prototype = { 33 | 34 | constructor: Tooltip 35 | 36 | , init: function ( type, element, options ) { 37 | var eventIn 38 | , eventOut 39 | 40 | this.type = type 41 | this.$element = $(element) 42 | this.options = this.getOptions(options) 43 | this.enabled = true 44 | 45 | if (this.options.trigger != 'manual') { 46 | eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus' 47 | eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur' 48 | this.$element.on(eventIn, this.options.selector, $.proxy(this.enter, this)) 49 | this.$element.on(eventOut, this.options.selector, $.proxy(this.leave, this)) 50 | } 51 | 52 | this.options.selector ? 53 | (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : 54 | this.fixTitle() 55 | } 56 | 57 | , getOptions: function ( options ) { 58 | options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data()) 59 | 60 | if (options.delay && typeof options.delay == 'number') { 61 | options.delay = { 62 | show: options.delay 63 | , hide: options.delay 64 | } 65 | } 66 | 67 | return options 68 | } 69 | 70 | , enter: function ( e ) { 71 | var self = $(e.currentTarget)[this.type](this._options).data(this.type) 72 | 73 | if (!self.options.delay || !self.options.delay.show) { 74 | self.show() 75 | } else { 76 | self.hoverState = 'in' 77 | setTimeout(function() { 78 | if (self.hoverState == 'in') { 79 | self.show() 80 | } 81 | }, self.options.delay.show) 82 | } 83 | } 84 | 85 | , leave: function ( e ) { 86 | var self = $(e.currentTarget)[this.type](this._options).data(this.type) 87 | 88 | if (!self.options.delay || !self.options.delay.hide) { 89 | self.hide() 90 | } else { 91 | self.hoverState = 'out' 92 | setTimeout(function() { 93 | if (self.hoverState == 'out') { 94 | self.hide() 95 | } 96 | }, self.options.delay.hide) 97 | } 98 | } 99 | 100 | , show: function () { 101 | var $tip 102 | , inside 103 | , pos 104 | , actualWidth 105 | , actualHeight 106 | , placement 107 | , tp 108 | 109 | if (this.hasContent() && this.enabled) { 110 | $tip = this.tip() 111 | this.setContent() 112 | 113 | if (this.options.animation) { 114 | $tip.addClass('fade') 115 | } 116 | 117 | placement = typeof this.options.placement == 'function' ? 118 | this.options.placement.call(this, $tip[0], this.$element[0]) : 119 | this.options.placement 120 | 121 | inside = /in/.test(placement) 122 | 123 | $tip 124 | .remove() 125 | .css({ top: 0, left: 0, display: 'block' }) 126 | .appendTo(inside ? this.$element : document.body) 127 | 128 | pos = this.getPosition(inside) 129 | 130 | actualWidth = $tip[0].offsetWidth 131 | actualHeight = $tip[0].offsetHeight 132 | 133 | switch (inside ? placement.split(' ')[1] : placement) { 134 | case 'bottom': 135 | tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2} 136 | break 137 | case 'top': 138 | tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2} 139 | break 140 | case 'left': 141 | tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth} 142 | break 143 | case 'right': 144 | tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width} 145 | break 146 | } 147 | 148 | $tip 149 | .css(tp) 150 | .addClass(placement) 151 | .addClass('in') 152 | } 153 | } 154 | 155 | , setContent: function () { 156 | var $tip = this.tip() 157 | $tip.find('.tooltip-inner').html(this.getTitle()) 158 | $tip.removeClass('fade in top bottom left right') 159 | } 160 | 161 | , hide: function () { 162 | var that = this 163 | , $tip = this.tip() 164 | 165 | $tip.removeClass('in') 166 | 167 | function removeWithAnimation() { 168 | var timeout = setTimeout(function () { 169 | $tip.off($.support.transition.end).remove() 170 | }, 500) 171 | 172 | $tip.one($.support.transition.end, function () { 173 | clearTimeout(timeout) 174 | $tip.remove() 175 | }) 176 | } 177 | 178 | $.support.transition && this.$tip.hasClass('fade') ? 179 | removeWithAnimation() : 180 | $tip.remove() 181 | } 182 | 183 | , fixTitle: function () { 184 | var $e = this.$element 185 | if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') { 186 | $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title') 187 | } 188 | } 189 | 190 | , hasContent: function () { 191 | return this.getTitle() 192 | } 193 | 194 | , getPosition: function (inside) { 195 | return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), { 196 | width: this.$element[0].offsetWidth 197 | , height: this.$element[0].offsetHeight 198 | }) 199 | } 200 | 201 | , getTitle: function () { 202 | var title 203 | , $e = this.$element 204 | , o = this.options 205 | 206 | title = $e.attr('data-original-title') 207 | || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) 208 | 209 | title = title.toString().replace(/(^\s*|\s*$)/, "") 210 | 211 | return title 212 | } 213 | 214 | , tip: function () { 215 | return this.$tip = this.$tip || $(this.options.template) 216 | } 217 | 218 | , validate: function () { 219 | if (!this.$element[0].parentNode) { 220 | this.hide() 221 | this.$element = null 222 | this.options = null 223 | } 224 | } 225 | 226 | , enable: function () { 227 | this.enabled = true 228 | } 229 | 230 | , disable: function () { 231 | this.enabled = false 232 | } 233 | 234 | , toggleEnabled: function () { 235 | this.enabled = !this.enabled 236 | } 237 | 238 | , toggle: function () { 239 | this[this.tip().hasClass('in') ? 'hide' : 'show']() 240 | } 241 | 242 | } 243 | 244 | 245 | /* TOOLTIP PLUGIN DEFINITION 246 | * ========================= */ 247 | 248 | $.fn.tooltip = function ( option ) { 249 | return this.each(function () { 250 | var $this = $(this) 251 | , data = $this.data('tooltip') 252 | , options = typeof option == 'object' && option 253 | if (!data) $this.data('tooltip', (data = new Tooltip(this, options))) 254 | if (typeof option == 'string') data[option]() 255 | }) 256 | } 257 | 258 | $.fn.tooltip.Constructor = Tooltip 259 | 260 | $.fn.tooltip.defaults = { 261 | animation: true 262 | , delay: 0 263 | , selector: false 264 | , placement: 'top' 265 | , trigger: 'hover' 266 | , title: '' 267 | , template: '' 268 | } 269 | 270 | }( window.jQuery ) 271 | -------------------------------------------------------------------------------- /src/main/webapp/js/bootstrap/bootstrap-transition.js: -------------------------------------------------------------------------------- 1 | /* =================================================== 2 | * bootstrap-transition.js v2.0.0 3 | * http://twitter.github.com/bootstrap/javascript.html#transitions 4 | * =================================================== 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ========================================================== */ 19 | 20 | !function( $ ) { 21 | 22 | $(function () { 23 | 24 | "use strict" 25 | 26 | /* CSS TRANSITION SUPPORT (https://gist.github.com/373874) 27 | * ======================================================= */ 28 | 29 | $.support.transition = (function () { 30 | var thisBody = document.body || document.documentElement 31 | , thisStyle = thisBody.style 32 | , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined 33 | 34 | return support && { 35 | end: (function () { 36 | var transitionEnd = "TransitionEnd" 37 | if ( $.browser.webkit ) { 38 | transitionEnd = "webkitTransitionEnd" 39 | } else if ( $.browser.mozilla ) { 40 | transitionEnd = "transitionend" 41 | } else if ( $.browser.opera ) { 42 | transitionEnd = "oTransitionEnd" 43 | } 44 | return transitionEnd 45 | }()) 46 | } 47 | })() 48 | 49 | }) 50 | 51 | }( window.jQuery ) 52 | -------------------------------------------------------------------------------- /src/main/webapp/js/bootstrap/bootstrap-typeahead.js: -------------------------------------------------------------------------------- 1 | /* ============================================================= 2 | * bootstrap-typeahead.js v2.0.0 3 | * http://twitter.github.com/bootstrap/javascript.html#typeahead 4 | * ============================================================= 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ============================================================ */ 19 | 20 | !function( $ ){ 21 | 22 | "use strict" 23 | 24 | var Typeahead = function ( element, options ) { 25 | this.$element = $(element) 26 | this.options = $.extend({}, $.fn.typeahead.defaults, options) 27 | this.matcher = this.options.matcher || this.matcher 28 | this.sorter = this.options.sorter || this.sorter 29 | this.highlighter = this.options.highlighter || this.highlighter 30 | this.$menu = $(this.options.menu).appendTo('body') 31 | this.source = this.options.source 32 | this.shown = false 33 | this.listen() 34 | } 35 | 36 | Typeahead.prototype = { 37 | 38 | constructor: Typeahead 39 | 40 | , select: function () { 41 | var val = this.$menu.find('.active').attr('data-value') 42 | this.$element.val(val) 43 | return this.hide() 44 | } 45 | 46 | , show: function () { 47 | var pos = $.extend({}, this.$element.offset(), { 48 | height: this.$element[0].offsetHeight 49 | }) 50 | 51 | this.$menu.css({ 52 | top: pos.top + pos.height 53 | , left: pos.left 54 | }) 55 | 56 | this.$menu.show() 57 | this.shown = true 58 | return this 59 | } 60 | 61 | , hide: function () { 62 | this.$menu.hide() 63 | this.shown = false 64 | return this 65 | } 66 | 67 | , lookup: function (event) { 68 | var that = this 69 | , items 70 | , q 71 | 72 | this.query = this.$element.val() 73 | 74 | if (!this.query) { 75 | return this.shown ? this.hide() : this 76 | } 77 | 78 | items = $.grep(this.source, function (item) { 79 | if (that.matcher(item)) return item 80 | }) 81 | 82 | items = this.sorter(items) 83 | 84 | if (!items.length) { 85 | return this.shown ? this.hide() : this 86 | } 87 | 88 | return this.render(items.slice(0, this.options.items)).show() 89 | } 90 | 91 | , matcher: function (item) { 92 | return ~item.toLowerCase().indexOf(this.query.toLowerCase()) 93 | } 94 | 95 | , sorter: function (items) { 96 | var beginswith = [] 97 | , caseSensitive = [] 98 | , caseInsensitive = [] 99 | , item 100 | 101 | while (item = items.shift()) { 102 | if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item) 103 | else if (~item.indexOf(this.query)) caseSensitive.push(item) 104 | else caseInsensitive.push(item) 105 | } 106 | 107 | return beginswith.concat(caseSensitive, caseInsensitive) 108 | } 109 | 110 | , highlighter: function (item) { 111 | return item.replace(new RegExp('(' + this.query + ')', 'ig'), function ($1, match) { 112 | return '' + match + '' 113 | }) 114 | } 115 | 116 | , render: function (items) { 117 | var that = this 118 | 119 | items = $(items).map(function (i, item) { 120 | i = $(that.options.item).attr('data-value', item) 121 | i.find('a').html(that.highlighter(item)) 122 | return i[0] 123 | }) 124 | 125 | items.first().addClass('active') 126 | this.$menu.html(items) 127 | return this 128 | } 129 | 130 | , next: function (event) { 131 | var active = this.$menu.find('.active').removeClass('active') 132 | , next = active.next() 133 | 134 | if (!next.length) { 135 | next = $(this.$menu.find('li')[0]) 136 | } 137 | 138 | next.addClass('active') 139 | } 140 | 141 | , prev: function (event) { 142 | var active = this.$menu.find('.active').removeClass('active') 143 | , prev = active.prev() 144 | 145 | if (!prev.length) { 146 | prev = this.$menu.find('li').last() 147 | } 148 | 149 | prev.addClass('active') 150 | } 151 | 152 | , listen: function () { 153 | this.$element 154 | .on('blur', $.proxy(this.blur, this)) 155 | .on('keypress', $.proxy(this.keypress, this)) 156 | .on('keyup', $.proxy(this.keyup, this)) 157 | 158 | if ($.browser.webkit || $.browser.msie) { 159 | this.$element.on('keydown', $.proxy(this.keypress, this)) 160 | } 161 | 162 | this.$menu 163 | .on('click', $.proxy(this.click, this)) 164 | .on('mouseenter', 'li', $.proxy(this.mouseenter, this)) 165 | } 166 | 167 | , keyup: function (e) { 168 | e.stopPropagation() 169 | e.preventDefault() 170 | 171 | switch(e.keyCode) { 172 | case 40: // down arrow 173 | case 38: // up arrow 174 | break 175 | 176 | case 9: // tab 177 | case 13: // enter 178 | if (!this.shown) return 179 | this.select() 180 | break 181 | 182 | case 27: // escape 183 | this.hide() 184 | break 185 | 186 | default: 187 | this.lookup() 188 | } 189 | 190 | } 191 | 192 | , keypress: function (e) { 193 | e.stopPropagation() 194 | if (!this.shown) return 195 | 196 | switch(e.keyCode) { 197 | case 9: // tab 198 | case 13: // enter 199 | case 27: // escape 200 | e.preventDefault() 201 | break 202 | 203 | case 38: // up arrow 204 | e.preventDefault() 205 | this.prev() 206 | break 207 | 208 | case 40: // down arrow 209 | e.preventDefault() 210 | this.next() 211 | break 212 | } 213 | } 214 | 215 | , blur: function (e) { 216 | var that = this 217 | e.stopPropagation() 218 | e.preventDefault() 219 | setTimeout(function () { that.hide() }, 150) 220 | } 221 | 222 | , click: function (e) { 223 | e.stopPropagation() 224 | e.preventDefault() 225 | this.select() 226 | } 227 | 228 | , mouseenter: function (e) { 229 | this.$menu.find('.active').removeClass('active') 230 | $(e.currentTarget).addClass('active') 231 | } 232 | 233 | } 234 | 235 | 236 | /* TYPEAHEAD PLUGIN DEFINITION 237 | * =========================== */ 238 | 239 | $.fn.typeahead = function ( option ) { 240 | return this.each(function () { 241 | var $this = $(this) 242 | , data = $this.data('typeahead') 243 | , options = typeof option == 'object' && option 244 | if (!data) $this.data('typeahead', (data = new Typeahead(this, options))) 245 | if (typeof option == 'string') data[option]() 246 | }) 247 | } 248 | 249 | $.fn.typeahead.defaults = { 250 | source: [] 251 | , items: 8 252 | , menu: '' 253 | , item: '' 254 | } 255 | 256 | $.fn.typeahead.Constructor = Typeahead 257 | 258 | 259 | /* TYPEAHEAD DATA-API 260 | * ================== */ 261 | 262 | $(function () { 263 | $('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) { 264 | var $this = $(this) 265 | if ($this.data('typeahead')) return 266 | e.preventDefault() 267 | $this.typeahead($this.data()) 268 | }) 269 | }) 270 | 271 | }( window.jQuery ) 272 | -------------------------------------------------------------------------------- /src/test/java/com/example/mvc/repository/PersonRepositoryTest.java: -------------------------------------------------------------------------------- 1 | package com.example.mvc.repository; 2 | 3 | import static org.junit.Assert.*; 4 | 5 | import javax.inject.Inject; 6 | 7 | import org.junit.Before; 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | import org.springframework.data.domain.Page; 11 | import org.springframework.data.domain.PageRequest; 12 | import org.springframework.test.context.ContextConfiguration; 13 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 14 | import org.springframework.transaction.annotation.Transactional; 15 | 16 | import com.example.mvc.entity.Person; 17 | 18 | @ContextConfiguration(locations = "classpath:test-context.xml") 19 | @RunWith(SpringJUnit4ClassRunner.class) 20 | @Transactional 21 | public class PersonRepositoryTest { 22 | @Inject 23 | PersonRepository personRepository; 24 | 25 | @Before 26 | public void setUp() { 27 | personRepository.deleteAll(); 28 | for (int i = 1; i <= 20; i++) { 29 | Person p = new Person(); 30 | p.setAge(i % 100); 31 | p.setName("name" + i); 32 | personRepository.save(p); 33 | } 34 | personRepository.flush(); 35 | } 36 | 37 | @Test 38 | public void testCount() { 39 | assertEquals(20, personRepository.count()); 40 | } 41 | 42 | @Test 43 | public void testFindByName() { 44 | Page p = personRepository.findByNameLike("%name1%", new PageRequest( 45 | 0, 5)); 46 | System.out.println(p.getContent()); 47 | assertNotNull(p); 48 | assertEquals(5, p.getNumberOfElements()); 49 | assertEquals(0, p.getNumber()); 50 | assertEquals(5, p.getSize()); 51 | assertEquals(3, p.getTotalPages()); 52 | assertEquals(11, p.getTotalElements()); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/test/java/com/example/mvc/service/impl/PersonServiceImplTest.java: -------------------------------------------------------------------------------- 1 | package com.example.mvc.service.impl; 2 | 3 | import static org.junit.Assert.*; 4 | 5 | import java.text.SimpleDateFormat; 6 | import java.util.List; 7 | 8 | import javax.inject.Inject; 9 | 10 | import org.junit.After; 11 | import org.junit.Before; 12 | import org.junit.Test; 13 | import org.junit.runner.RunWith; 14 | import org.springframework.data.domain.Page; 15 | import org.springframework.data.domain.PageRequest; 16 | import org.springframework.test.context.ContextConfiguration; 17 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 18 | import org.springframework.test.context.transaction.AfterTransaction; 19 | import org.springframework.test.context.transaction.BeforeTransaction; 20 | import org.springframework.transaction.annotation.Transactional; 21 | 22 | import com.example.mvc.entity.Person; 23 | import com.example.mvc.repository.PersonRepository; 24 | import com.example.mvc.service.PersonService; 25 | 26 | @ContextConfiguration(locations = "classpath:test-context.xml") 27 | @RunWith(SpringJUnit4ClassRunner.class) 28 | @Transactional 29 | public class PersonServiceImplTest { 30 | @Inject 31 | PersonRepository personRepository; 32 | @Inject 33 | PersonService personService; 34 | 35 | @Before 36 | public void setUp() throws Exception { 37 | personRepository.deleteAll(); 38 | for (int i = 1; i <= 20; i++) { 39 | Person p = new Person(); 40 | p.setAge(i % 100); 41 | p.setName("name" + i); 42 | personRepository.save(p); 43 | } 44 | personRepository.flush(); 45 | } 46 | 47 | @After 48 | public void tearDown() throws Exception { 49 | } 50 | 51 | @Test 52 | public void testFindAll00() { 53 | Page p = personService.findAll(0, 5); 54 | assertNotNull(p); 55 | List persons = p.getContent(); 56 | assertNotNull(persons); 57 | assertEquals(5, persons.size()); 58 | assertEquals(5, p.getNumberOfElements()); 59 | assertEquals(0, p.getNumber()); 60 | assertEquals(5, p.getSize()); 61 | assertEquals(4, p.getTotalPages()); 62 | assertEquals(20, p.getTotalElements()); 63 | } 64 | 65 | @Test 66 | public void testFindAll01() { 67 | Page p = personService.findAll(1, 5); 68 | assertNotNull(p); 69 | List persons = p.getContent(); 70 | assertNotNull(persons); 71 | assertEquals(5, persons.size()); 72 | assertEquals(5, p.getNumberOfElements()); 73 | assertEquals(1, p.getNumber()); 74 | assertEquals(5, p.getSize()); 75 | assertEquals(4, p.getTotalPages()); 76 | assertEquals(20, p.getTotalElements()); 77 | } 78 | 79 | @Test 80 | public void testFindByNameLike() throws Exception { 81 | Page p = personService.findByNameLike("name1", 0, 5); 82 | System.out.println(p.getContent()); 83 | assertNotNull(p); 84 | assertEquals(5, p.getNumberOfElements()); 85 | assertEquals(0, p.getNumber()); 86 | assertEquals(5, p.getSize()); 87 | assertEquals(3, p.getTotalPages()); 88 | assertEquals(11, p.getTotalElements()); 89 | } 90 | 91 | @Test 92 | public void testFindById() { 93 | Person lastOne = personService.findAll(0, 1).getContent().get(0); 94 | Integer id = lastOne.getId(); 95 | Person p = personService.findById(id); 96 | assertEquals(id, p.getId()); 97 | assertEquals(lastOne.getName(), p.getName()); 98 | assertEquals(lastOne.getAge(), p.getAge()); 99 | } 100 | 101 | @Test 102 | public void testInsert() { 103 | Person lastOne = personService.findAll(0, 1).getContent().get(0); 104 | 105 | Person p = new Person(); 106 | p.setAge(20); 107 | p.setName("noname"); 108 | 109 | Person result = personService.insert(p); 110 | personRepository.flush(); 111 | assertEquals(Integer.valueOf(lastOne.getId() + 1), result.getId()); 112 | } 113 | 114 | @Test 115 | public void testUpdate() { 116 | Person lastOne = personService.findAll(0, 1).getContent().get(0); 117 | { 118 | Person p = personService.findById(lastOne.getId()); 119 | p.setAge(30); 120 | p.setName("hoge"); 121 | personService.update(p); 122 | } 123 | personRepository.flush(); 124 | { 125 | Person p = personService.findById(lastOne.getId()); 126 | assertEquals(Integer.valueOf(30), p.getAge()); 127 | assertEquals("hoge", p.getName()); 128 | } 129 | } 130 | 131 | @Test 132 | public void testDeleteById() { 133 | Person lastOne = personService.findAll(0, 1).getContent().get(0); 134 | personService.deleteById(lastOne.getId()); 135 | personRepository.flush(); 136 | Person p = personService.findById(lastOne.getId()); 137 | assertNull(p); 138 | } 139 | 140 | } 141 | -------------------------------------------------------------------------------- /src/test/resources/test-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test-all.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | DATABASES="mysql postgresql h2 hsql" 3 | for d in $DATABASES; do 4 | mvn clean test -P $d 5 | done --------------------------------------------------------------------------------
6 | ${f:h(serverTime)} 7 |
5 | CREATE 6 |
${f:h(page.number + 1)}/${f:h(page.totalPages)}