├── .gitignore ├── pom.xml └── src ├── main ├── java │ └── sample │ │ └── ui │ │ ├── InMemoryMessageRepository.java │ │ ├── Message.java │ │ ├── MessageRepository.java │ │ ├── SampleWebUiApplication.java │ │ └── mvc │ │ └── MessageController.java └── resources │ ├── application.properties │ ├── logback.xml │ ├── static │ ├── css │ │ └── bootstrap.min.css │ ├── favicon.ico │ └── js │ │ ├── jquery-1.7.2.js │ │ └── jquery.validate.js │ └── templates │ ├── layout.html │ └── messages │ ├── form.html │ ├── list.html │ └── view.html └── test └── java └── sample └── ui ├── MessageControllerWebTests.java └── SampleWebUiApplicationTests.java /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | /*.iml 3 | /target 4 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 1.2.5.RELEASE 9 | 10 | spring-boot-sample-web-ui 11 | Spring Boot Web UI Sample 12 | Spring Boot Web UI Sample 13 | http://projects.spring.io/spring-boot/ 14 | 15 | Pivotal Software, Inc. 16 | http://www.spring.io 17 | 18 | 19 | ${basedir}/../.. 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-thymeleaf 25 | 26 | 27 | org.springframework.boot 28 | spring-boot-starter-tomcat 29 | 30 | 31 | 32 | 33 | org.springframework.boot 34 | spring-boot-starter-undertow 35 | 36 | 37 | org.springframework.boot 38 | spring-boot-starter-test 39 | test 40 | 41 | 42 | 43 | 44 | 45 | org.springframework.boot 46 | spring-boot-maven-plugin 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/main/java/sample/ui/InMemoryMessageRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.ui; 18 | 19 | import java.util.concurrent.ConcurrentHashMap; 20 | import java.util.concurrent.ConcurrentMap; 21 | import java.util.concurrent.atomic.AtomicLong; 22 | 23 | /** 24 | * @author Dave Syer 25 | */ 26 | public class InMemoryMessageRepository implements MessageRepository { 27 | 28 | private static AtomicLong counter = new AtomicLong(); 29 | 30 | private final ConcurrentMap messages = new ConcurrentHashMap(); 31 | 32 | @Override 33 | public Iterable findAll() { 34 | return this.messages.values(); 35 | } 36 | 37 | @Override 38 | public Message save(Message message) { 39 | Long id = message.getId(); 40 | if (id == null) { 41 | id = counter.incrementAndGet(); 42 | message.setId(id); 43 | } 44 | this.messages.put(id, message); 45 | return message; 46 | } 47 | 48 | @Override 49 | public Message findMessage(Long id) { 50 | return this.messages.get(id); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/sample/ui/Message.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package sample.ui; 15 | 16 | import java.util.Calendar; 17 | 18 | import org.hibernate.validator.constraints.NotEmpty; 19 | 20 | /** 21 | * @author Rob Winch 22 | */ 23 | public class Message { 24 | 25 | private Long id; 26 | 27 | @NotEmpty(message = "Message is required.") 28 | private String text; 29 | 30 | @NotEmpty(message = "Summary is required.") 31 | private String summary; 32 | 33 | private Calendar created = Calendar.getInstance(); 34 | 35 | public Long getId() { 36 | return this.id; 37 | } 38 | 39 | public void setId(Long id) { 40 | this.id = id; 41 | } 42 | 43 | public Calendar getCreated() { 44 | return this.created; 45 | } 46 | 47 | public void setCreated(Calendar created) { 48 | this.created = created; 49 | } 50 | 51 | public String getText() { 52 | return this.text; 53 | } 54 | 55 | public void setText(String text) { 56 | this.text = text; 57 | } 58 | 59 | public String getSummary() { 60 | return this.summary; 61 | } 62 | 63 | public void setSummary(String summary) { 64 | this.summary = summary; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/sample/ui/MessageRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package sample.ui; 15 | 16 | /** 17 | * @author Rob Winch 18 | */ 19 | public interface MessageRepository { 20 | 21 | Iterable findAll(); 22 | 23 | Message save(Message message); 24 | 25 | Message findMessage(Long id); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/sample/ui/SampleWebUiApplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.ui; 18 | 19 | import org.springframework.boot.SpringApplication; 20 | import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration; 21 | import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration; 22 | import org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration; 23 | import org.springframework.boot.autoconfigure.web.EmbeddedServletContainerAutoConfiguration; 24 | import org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration; 25 | import org.springframework.boot.autoconfigure.web.HttpEncodingAutoConfiguration; 26 | import org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration; 27 | import org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration; 28 | import org.springframework.boot.autoconfigure.web.ServerPropertiesAutoConfiguration; 29 | import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration; 30 | import org.springframework.context.annotation.Bean; 31 | import org.springframework.context.annotation.Configuration; 32 | import org.springframework.context.annotation.Import; 33 | import org.springframework.core.convert.converter.Converter; 34 | import sample.ui.mvc.MessageController; 35 | 36 | @Configuration 37 | @Import({ 38 | DispatcherServletAutoConfiguration.class, 39 | EmbeddedServletContainerAutoConfiguration.class, 40 | ErrorMvcAutoConfiguration.class, 41 | HttpEncodingAutoConfiguration.class, 42 | HttpMessageConvertersAutoConfiguration.class, 43 | MultipartAutoConfiguration.class, 44 | ServerPropertiesAutoConfiguration.class, 45 | PropertyPlaceholderAutoConfiguration.class, 46 | ThymeleafAutoConfiguration.class, 47 | WebMvcAutoConfiguration.class, 48 | }) 49 | public class SampleWebUiApplication { 50 | 51 | @Bean 52 | public MessageRepository messageRepository() { 53 | return new InMemoryMessageRepository(); 54 | } 55 | 56 | @Bean 57 | public Converter messageConverter() { 58 | return new Converter() { 59 | @Override 60 | public Message convert(String id) { 61 | return messageRepository().findMessage(Long.valueOf(id)); 62 | } 63 | }; 64 | } 65 | 66 | @Bean 67 | public MessageController messageController(MessageRepository messageRepository) { 68 | return new MessageController(messageRepository); 69 | } 70 | 71 | public static void main(String[] args) throws Exception { 72 | SpringApplication.run(SampleWebUiApplication.class, args); 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /src/main/java/sample/ui/mvc/MessageController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package sample.ui.mvc; 15 | 16 | import javax.validation.Valid; 17 | 18 | import org.springframework.beans.factory.annotation.Autowired; 19 | import org.springframework.stereotype.Controller; 20 | import org.springframework.validation.BindingResult; 21 | import org.springframework.web.bind.annotation.ModelAttribute; 22 | import org.springframework.web.bind.annotation.PathVariable; 23 | import org.springframework.web.bind.annotation.RequestMapping; 24 | import org.springframework.web.bind.annotation.RequestMethod; 25 | import org.springframework.web.servlet.ModelAndView; 26 | import org.springframework.web.servlet.mvc.support.RedirectAttributes; 27 | 28 | import sample.ui.Message; 29 | import sample.ui.MessageRepository; 30 | 31 | /** 32 | * @author Rob Winch 33 | */ 34 | @Controller 35 | @RequestMapping("/") 36 | public class MessageController { 37 | private final MessageRepository messageRepository; 38 | 39 | @Autowired 40 | public MessageController(MessageRepository messageRepository) { 41 | this.messageRepository = messageRepository; 42 | } 43 | 44 | @RequestMapping 45 | public ModelAndView list() { 46 | Iterable messages = this.messageRepository.findAll(); 47 | return new ModelAndView("messages/list", "messages", messages); 48 | } 49 | 50 | @RequestMapping("{id}") 51 | public ModelAndView view(@PathVariable("id") Message message) { 52 | return new ModelAndView("messages/view", "message", message); 53 | } 54 | 55 | @RequestMapping(params = "form", method = RequestMethod.GET) 56 | public String createForm(@ModelAttribute Message message) { 57 | return "messages/form"; 58 | } 59 | 60 | @RequestMapping(method = RequestMethod.POST) 61 | public ModelAndView create(@Valid Message message, BindingResult result, 62 | RedirectAttributes redirect) { 63 | if (result.hasErrors()) { 64 | return new ModelAndView("messages/form", "formErrors", result.getAllErrors()); 65 | } 66 | message = this.messageRepository.save(message); 67 | redirect.addFlashAttribute("globalMessage", "Successfully created a new message"); 68 | return new ModelAndView("redirect:/{message.id}", "message.id", message.getId()); 69 | } 70 | 71 | @RequestMapping("foo") 72 | public String foo() { 73 | throw new RuntimeException("Expected exception in controller"); 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # Allow Thymeleaf templates to be reloaded at dev time 2 | spring.thymeleaf.cache: false 3 | server.tomcat.access_log_enabled: true 4 | server.tomcat.basedir: target/tomcat -------------------------------------------------------------------------------- /src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/main/resources/static/css/bootstrap.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v2.0.4 3 | * 4 | * Copyright 2012 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world @twitter by @mdo and @fat. 9 | */article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover{color:#005580;text-decoration:underline}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;content:""}.row:after{clear:both}[class*="span"]{float:left;margin-left:20px}.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:28px;margin-left:2.127659574%;*margin-left:2.0744680846382977%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:99.99999998999999%;*width:99.94680850063828%}.row-fluid .span11{width:91.489361693%;*width:91.4361702036383%}.row-fluid .span10{width:82.97872339599999%;*width:82.92553190663828%}.row-fluid .span9{width:74.468085099%;*width:74.4148936096383%}.row-fluid .span8{width:65.95744680199999%;*width:65.90425531263828%}.row-fluid .span7{width:57.446808505%;*width:57.3936170156383%}.row-fluid .span6{width:48.93617020799999%;*width:48.88297871863829%}.row-fluid .span5{width:40.425531911%;*width:40.3723404216383%}.row-fluid .span4{width:31.914893614%;*width:31.8617021246383%}.row-fluid .span3{width:23.404255317%;*width:23.3510638276383%}.row-fluid .span2{width:14.89361702%;*width:14.8404255306383%}.row-fluid .span1{width:6.382978723%;*width:6.329787233638298%}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;content:""}.container-fluid:after{clear:both}p{margin:0 0 9px}p small{font-size:11px;color:#999}.lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px}h1,h2,h3,h4,h5,h6{margin:0;font-family:inherit;font-weight:bold;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;color:#999}h1{font-size:30px;line-height:36px}h1 small{font-size:18px}h2{font-size:24px;line-height:36px}h2 small{font-size:18px}h3{font-size:18px;line-height:27px}h3 small{font-size:14px}h4,h5,h6{line-height:18px}h4{font-size:14px}h4 small{font-size:12px}h5{font-size:12px}h6{font-size:11px;color:#999;text-transform:uppercase}.page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eee}.page-header h1{line-height:1}ul,ol{padding:0;margin:0 0 9px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}ul{list-style:disc}ol{list-style:decimal}li{line-height:18px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}dl{margin-bottom:18px}dt,dd{line-height:18px}dt{font-weight:bold;line-height:17px}dd{margin-left:9px}.dl-horizontal dt{float:left;width:120px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:130px}hr{margin:18px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}strong{font-weight:bold}em{font-style:italic}.muted{color:#999}abbr[title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px}blockquote small{display:block;line-height:18px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:18px;font-style:normal;line-height:18px}small{font-size:100%}cite{font-style:normal}code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12.025px;line-height:18px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;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}pre.prettyprint{margin-bottom:18px}pre code{padding:0;color:inherit;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 18px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:27px;font-size:19.5px;line-height:36px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:13.5px;color:#999}label,input,button,select,textarea{font-size:13px;font-weight:normal;line-height:18px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:18px;padding:4px;margin-bottom:9px;font-size:13px;line-height:18px;color:#555}input,textarea{width:210px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-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 .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-ms-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-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)}input[type="radio"],input[type="checkbox"]{margin:3px 0;*margin-top:0;line-height:normal;cursor:pointer}input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}.uneditable-textarea{width:auto;height:auto}select,input[type="file"]{height:28px;*margin-top:4px;line-height:28px}select{width:220px;border:1px solid #bbb}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.radio,.checkbox{min-height:18px;padding-left:18px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}input.span12,textarea.span12,.uneditable-input.span12{width:930px}input.span11,textarea.span11,.uneditable-input.span11{width:850px}input.span10,textarea.span10,.uneditable-input.span10{width:770px}input.span9,textarea.span9,.uneditable-input.span9{width:690px}input.span8,textarea.span8,.uneditable-input.span8{width:610px}input.span7,textarea.span7,.uneditable-input.span7{width:530px}input.span6,textarea.span6,.uneditable-input.span6{width:450px}input.span5,textarea.span5,.uneditable-input.span5{width:370px}input.span4,textarea.span4,.uneditable-input.span4{width:290px}input.span3,textarea.span3,.uneditable-input.span3{width:210px}input.span2,textarea.span2,.uneditable-input.span2{width:130px}input.span1,textarea.span1,.uneditable-input.span1{width:50px}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee;border-color:#ddd}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning>label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;border-color:#c09853}.control-group.warning .checkbox:focus,.control-group.warning .radio:focus,.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}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error>label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;border-color:#b94a48}.control-group.error .checkbox:focus,.control-group.error .radio:focus,.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}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;border-color:#468847}.control-group.success .checkbox:focus,.control-group.success .radio:focus,.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}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}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}.form-actions{padding:17px 20px 18px;margin-top:18px;margin-bottom:18px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;content:""}.form-actions:after{clear:both}.uneditable-input{overflow:hidden;white-space:nowrap;cursor:not-allowed;background-color:#fff;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)}:-moz-placeholder{color:#999}:-ms-input-placeholder{color:#999}::-webkit-input-placeholder{color:#999}.help-block,.help-inline{color:#555}.help-block{display:block;margin-bottom:9px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-prepend,.input-append{margin-bottom:5px}.input-prepend input,.input-append input,.input-prepend select,.input-append select,.input-prepend .uneditable-input,.input-append .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:middle;-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 select:focus,.input-append select:focus,.input-prepend .uneditable-input:focus,.input-append .uneditable-input:focus{z-index:2}.input-prepend .uneditable-input,.input-append .uneditable-input{border-left-color:#ccc}.input-prepend .add-on,.input-append .add-on{display:inline-block;width:auto;height:18px;min-width:16px;padding:4px 5px;font-weight:normal;line-height:18px;text-align:center;text-shadow:0 1px 0 #fff;vertical-align:middle;background-color:#eee;border:1px solid #ccc}.input-prepend .add-on,.input-append .add-on,.input-prepend .btn,.input-append .btn{margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend .active,.input-append .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-append .uneditable-input{border-right-color:#ccc;border-left-color:#eee}.input-append .add-on:last-child,.input-append .btn:last-child{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:14px;-moz-border-radius:14px;border-radius:14px}.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,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:9px}legend+.control-group{margin-top:18px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:18px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:140px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:160px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:160px}.form-horizontal .help-block{margin-top:9px;margin-bottom:0}.form-horizontal .form-actions{padding-left:160px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:18px}.table th,.table td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapsed;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.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}.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.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;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9}.table tbody tr:hover td,.table tbody tr:hover th{background-color:#f5f5f5}table .span1{float:none;width:44px;margin-left:0}table .span2{float:none;width:124px;margin-left:0}table .span3{float:none;width:204px;margin-left:0}table .span4{float:none;width:284px;margin-left:0}table .span5{float:none;width:364px;margin-left:0}table .span6{float:none;width:444px;margin-left:0}table .span7{float:none;width:524px;margin-left:0}table .span8{float:none;width:604px;margin-left:0}table .span9{float:none;width:684px;margin-left:0}table .span10{float:none;width:764px;margin-left:0}table .span11{float:none;width:844px;margin-left:0}table .span12{float:none;width:924px;margin-left:0}table .span13{float:none;width:1004px;margin-left:0}table .span14{float:none;width:1084px;margin-left:0}table .span15{float:none;width:1164px;margin-left:0}table .span16{float:none;width:1244px;margin-left:0}table .span17{float:none;width:1324px;margin-left:0}table .span18{float:none;width:1404px;margin-left:0}table .span19{float:none;width:1484px;margin-left:0}table .span20{float:none;width:1564px;margin-left:0}table .span21{float:none;width:1644px;margin-left:0}table .span22{float:none;width:1724px;margin-left:0}table .span23{float:none;width:1804px;margin-left:0}table .span24{float:none;width:1884px;margin-left:0}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}[class^="icon-"]:last-child,[class*=" icon-"]:last-child{*margin-left:0}.icon-white{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{background-position:-384px -120px}.icon-folder-open{background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:"";opacity:.3;filter:alpha(opacity=30)}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown:hover .caret,.open .caret{opacity:1;filter:alpha(opacity=100)}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:4px 0;margin:1px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius: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}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:8px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu a{display:block;padding:3px 15px;clear:both;font-weight:normal;line-height:18px;color:#333;white-space:nowrap}.dropdown-menu li>a:hover,.dropdown-menu .active>a,.dropdown-menu .active>a:hover{color:#fff;text-decoration:none;background-color:#08c}.open{*z-index:1000}.open>.dropdown-menu{display:block}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:"\2191"}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.typeahead{margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.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)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-ms-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-ms-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:18px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 10px 4px;margin-bottom:0;*margin-left:.3em;font-size:13px;line-height:18px;*line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-ms-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(top,#fff,#e6e6e6);background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;*border:0;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffffff',endColorstr='#e6e6e6',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);*zoom:1;-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)}.btn:hover,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover{color:#333;text-decoration:none;background-color:#e6e6e6;*background-color:#d9d9d9;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-ms-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-color:#e6e6e6;background-color:#d9d9d9 \9;background-image:none;outline:0;-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)}.btn.disabled,.btn[disabled]{cursor:default;background-color:#e6e6e6;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:9px 14px;font-size:15px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.btn-large [class^="icon-"]{margin-top:1px}.btn-small{padding:5px 9px;font-size:11px;line-height:16px}.btn-small [class^="icon-"]{margin-top:-1px}.btn-mini{padding:2px 6px;font-size:11px;line-height:14px}.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,.btn-inverse,.btn-inverse:hover{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn{border-color:#ccc;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25)}.btn-primary{background-color:#0074cc;*background-color:#05c;background-image:-ms-linear-gradient(top,#08c,#05c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#05c));background-image:-webkit-linear-gradient(top,#08c,#05c);background-image:-o-linear-gradient(top,#08c,#05c);background-image:-moz-linear-gradient(top,#08c,#05c);background-image:linear-gradient(top,#08c,#05c);background-repeat:repeat-x;border-color:#05c #05c #003580;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(startColorstr='#0088cc',endColorstr='#0055cc',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{background-color:#05c;*background-color:#004ab3}.btn-primary:active,.btn-primary.active{background-color:#004099 \9}.btn-warning{background-color:#faa732;*background-color:#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:-moz-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(top,#fbb450,#f89406);background-repeat:repeat-x;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(startColorstr='#fbb450',endColorstr='#f89406',GradientType=0);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;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{background-color:#da4f49;*background-color:#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:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(top,#ee5f5b,#bd362f);background-repeat:repeat-x;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(startColorstr='#ee5f5b',endColorstr='#bd362f',GradientType=0);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;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{background-color:#5bb75b;*background-color:#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:-moz-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(top,#62c462,#51a351);background-repeat:repeat-x;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(startColorstr='#62c462',endColorstr='#51a351',GradientType=0);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;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{background-color:#49afcd;*background-color:#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:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(top,#5bc0de,#2f96b4);background-repeat:repeat-x;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(startColorstr='#5bc0de',endColorstr='#2f96b4',GradientType=0);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;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{background-color:#414141;*background-color:#222;background-image:-ms-linear-gradient(top,#555,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#555),to(#222));background-image:-webkit-linear-gradient(top,#555,#222);background-image:-o-linear-gradient(top,#555,#222);background-image:-moz-linear-gradient(top,#555,#222);background-image:linear-gradient(top,#555,#222);background-repeat:repeat-x;border-color:#222 #222 #000;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(startColorstr='#555555',endColorstr='#222222',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}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}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-group{position:relative;*margin-left:.3em;*zoom:1}.btn-group:before,.btn-group:after{display:table;content:""}.btn-group:after{clear:both}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:9px;margin-bottom:9px}.btn-toolbar .btn-group{display:inline-block;*display:inline;*zoom:1}.btn-group>.btn{position:relative;float:left;margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.dropdown-toggle{*padding-top:4px;padding-right:8px;*padding-bottom:4px;padding-left: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)}.btn-group>.btn-mini.dropdown-toggle{padding-right:5px;padding-left:5px}.btn-group>.btn-small.dropdown-toggle{*padding-top:4px;*padding-bottom:4px}.btn-group>.btn-large.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{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)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#05c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:7px;margin-left:0}.btn:hover .caret,.open.btn-group .caret{opacity:1;filter:alpha(opacity=100)}.btn-mini .caret{margin-top:5px}.btn-small .caret{margin-top:6px}.btn-large .caret{margin-top:6px;border-top-width:5px;border-right-width:5px;border-left-width:5px}.dropup .btn-large .caret{border-top:0;border-bottom:5px solid #000}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:.75;filter:alpha(opacity=75)}.alert{padding:8px 35px 8px 14px;margin-bottom:18px;color:#c09853;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}.alert-heading{color:inherit}.alert .close{position:relative;top:-2px;right:-21px;line-height:18px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:18px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>.pull-right{float:right}.nav .nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:18px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:8px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:18px;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:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.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}.nav-pills>.active>a,.nav-pills>.active>a:hover{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.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}.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}.nav-tabs.nav-stacked>li>a:hover{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px}.nav-pills .dropdown-menu{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-tabs .dropdown-toggle .caret,.nav-pills .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav-tabs .dropdown-toggle:hover .caret,.nav-pills .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .active .dropdown-toggle .caret,.nav-pills .active .dropdown-toggle .caret{border-top-color:#333;border-bottom-color:#333}.nav>.dropdown.active>a:hover{color:#000;cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.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-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.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}.tabs-left>.nav-tabs>li>a:hover{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.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}.tabs-right>.nav-tabs>li>a:hover{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.navbar{*position:relative;*z-index:2;margin-bottom:18px;overflow:visible}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top,#333,#222);background-image:-ms-linear-gradient(top,#333,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#333),to(#222));background-image:-webkit-linear-gradient(top,#333,#222);background-image:-o-linear-gradient(top,#333,#222);background-image:linear-gradient(top,#333,#222);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#333333',endColorstr='#222222',GradientType=0);-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)}.navbar .container{width:auto}.nav-collapse.collapse{height:auto}.navbar{color:#999}.navbar .brand:hover{text-decoration:none}.navbar .brand{display:block;float:left;padding:8px 20px 12px;margin-left:-20px;font-size:20px;font-weight:200;line-height:1;color:#999}.navbar .navbar-text{margin-bottom:0;line-height:40px}.navbar .navbar-link{color:#999}.navbar .navbar-link:hover{color:#fff}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn{margin:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:6px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.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:#fff;background-color:#626262;border:1px solid #151515;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 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:#ccc}.navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-search .search-query:focus,.navbar-search .search-query.focused{padding:5px 10px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline: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)}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-bottom{bottom:0}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right}.navbar .nav>li{display:block;float:left}.navbar .nav>li>a{float:none;padding:9px 10px 11px;line-height:19px;color:#999;text-decoration:none;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar .btn{display:inline-block;padding:4px 10px 4px;margin:5px 5px 6px;line-height:18px}.navbar .btn-group{padding:5px 5px 6px;margin:0}.navbar .nav>li>a:hover{color:#fff;text-decoration:none;background-color:transparent}.navbar .nav .active>a,.navbar .nav .active>a:hover{color:#fff;text-decoration:none;background-color:#222}.navbar .divider-vertical{width:1px;height:40px;margin:0 9px;overflow:hidden;background-color:#222;border-right:1px solid #333}.navbar .nav.pull-right{margin-right:0;margin-left:10px}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;background-color:#2c2c2c;*background-color:#222;background-image:-ms-linear-gradient(top,#333,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#333),to(#222));background-image:-webkit-linear-gradient(top,#333,#222);background-image:-o-linear-gradient(top,#333,#222);background-image:linear-gradient(top,#333,#222);background-image:-moz-linear-gradient(top,#333,#222);background-repeat:repeat-x;border-color:#222 #222 #000;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(startColorstr='#333333',endColorstr='#222222',GradientType=0);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)}.navbar .btn-navbar:hover,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{background-color:#222;*background-color:#151515}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#080808 \9}.navbar .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)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown .dropdown-toggle .caret,.navbar .nav li.dropdown.open .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar .nav li.dropdown.active .caret{opacity:1;filter:alpha(opacity=100)}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{background-color:transparent}.navbar .nav li.dropdown.active>.dropdown-toggle:hover{color:#fff}.navbar .pull-right .dropdown-menu,.navbar .dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right .dropdown-menu:before,.navbar .dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right .dropdown-menu:after,.navbar .dropdown-menu.pull-right:after{right:13px;left:auto}.breadcrumb{padding:7px 14px;margin:0 0 18px;list-style:none;background-color:#fbfbfb;background-image:-moz-linear-gradient(top,#fff,#f5f5f5);background-image:-ms-linear-gradient(top,#fff,#f5f5f5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f5f5f5));background-image:-webkit-linear-gradient(top,#fff,#f5f5f5);background-image:-o-linear-gradient(top,#fff,#f5f5f5);background-image:linear-gradient(top,#fff,#f5f5f5);background-repeat:repeat-x;border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffffff',endColorstr='#f5f5f5',GradientType=0);-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.breadcrumb li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb .divider{padding:0 5px;color:#999}.breadcrumb .active a{color:#333}.pagination{height:36px;margin:18px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;*zoom:1;-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)}.pagination li{display:inline}.pagination a{float:left;padding:0 14px;line-height:34px;text-decoration:none;border:1px solid #ddd;border-left-width:0}.pagination a:hover,.pagination .active a{background-color:#f5f5f5}.pagination .active a{color:#999;cursor:default}.pagination .disabled span,.pagination .disabled a,.pagination .disabled a:hover{color:#999;cursor:default;background-color:transparent}.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}.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}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pager{margin-bottom:18px;margin-left:0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;content:""}.pager:after{clear:both}.pager li{display:inline}.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}.pager a:hover{text-decoration:none;background-color:#f5f5f5}.pager .next a{float:right}.pager .previous a{float:left}.pager .disabled a,.pager .disabled a:hover{color:#999;cursor:default;background-color:#fff}.modal-open .dropdown-menu{z-index:2050}.modal-open .dropdown.open{*z-index:2050}.modal-open .popover{z-index:2060}.modal-open .tooltip{z-index:2070}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:50%;left:50%;z-index:1050;width:560px;margin:-250px 0 0 -280px;overflow:auto;background-color:#fff;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{top:-25%;-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}.modal.fade.in{top:50%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-body{max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;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;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:before,.modal-footer:after{display:table;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.tooltip{position:absolute;z-index:1020;display:block;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{margin-top:-2px}.tooltip.right{margin-left:2px}.tooltip.bottom{margin-top:2px}.tooltip.left{margin-left:-2px}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top:5px solid #000;border-right:5px solid transparent;border-left:5px solid transparent}.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 #000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-right:5px solid transparent;border-bottom:5px solid #000;border-left:5px solid transparent}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-right:5px solid #000;border-bottom:5px solid transparent}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;padding:5px}.popover.top{margin-top:-5px}.popover.right{margin-left:5px}.popover.bottom{margin-top:5px}.popover.left{margin-left:-5px}.popover.top .arrow{bottom:0;left:50%;margin-left:-5px;border-top:5px solid #000;border-right:5px solid transparent;border-left:5px solid transparent}.popover.right .arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-right:5px solid #000;border-bottom:5px solid transparent}.popover.bottom .arrow{top:0;left:50%;margin-left:-5px;border-right:5px solid transparent;border-bottom:5px solid #000;border-left:5px solid transparent}.popover.left .arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000}.popover .arrow{position:absolute;width:0;height:0}.popover-inner{width:280px;padding:3px;overflow:hidden;background:#000;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)}.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}.popover-content{padding:14px;background-color:#fff;-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}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;content:""}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:18px;margin-left:20px}.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)}a.thumbnail:hover{border-color:#08c;-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)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px}.label,.badge{font-size:10.998px;font-weight:bold;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.label{padding:1px 4px 2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding:1px 9px 2px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}a.label:hover,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f89406}.label-warning[href],.badge-warning[href]{background-color:#c67605}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:18px;margin-bottom:18px;overflow:hidden;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;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;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)}.progress .bar{width:0;height:18px;font-size:12px;color:#fff;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:-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-image:-ms-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;-ms-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-ms-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-striped .bar{background-color:#149bdf;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:-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:-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: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}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.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)}.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)}.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)}.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)}.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)}.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)}.progress-warning .bar{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)}.progress-warning.progress-striped .bar{background-color:#fbb450;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)}.accordion{margin-bottom:18px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:18px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel .item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-ms-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel .item>img{display:block;line-height:1}.carousel .active,.carousel .next,.carousel .prev{display:block}.carousel .active{left:0}.carousel .next,.carousel .prev{position:absolute;top:0;width:100%}.carousel .next{left:100%}.carousel .prev{left:-100%}.carousel .next.left,.carousel .prev.right{left:0}.carousel .active.left{left:-100%}.carousel .active.right{left:100%}.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:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:hover{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:10px 15px 5px;background:#333;background:rgba(0,0,0,0.75)}.carousel-caption h4,.carousel-caption p{color:#fff}.hero-unit{padding:60px;margin-bottom:30px;background-color:#eee;-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;color:inherit}.hero-unit p{font-size:18px;font-weight:200;line-height:27px;color:inherit}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden} 10 | 11 | input.field-error, textarea.field-error { border: 1px solid #B94A48; } -------------------------------------------------------------------------------- /src/main/resources/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexec/spring-boot-performance/a7647292d7372f47369715332a8c67ff5d520e01/src/main/resources/static/favicon.ico -------------------------------------------------------------------------------- /src/main/resources/static/js/jquery.validate.js: -------------------------------------------------------------------------------- 1 | /** 2 | * jQuery Validation Plugin @VERSION 3 | * 4 | * http://bassistance.de/jquery-plugins/jquery-plugin-validation/ 5 | * http://docs.jquery.com/Plugins/Validation 6 | * 7 | * Copyright (c) 2012 Jörn Zaefferer 8 | * 9 | * Dual licensed under the MIT and GPL licenses: 10 | * http://www.opensource.org/licenses/mit-license.php 11 | * http://www.gnu.org/licenses/gpl.html 12 | */ 13 | 14 | (function($) { 15 | 16 | $.extend($.fn, { 17 | // http://docs.jquery.com/Plugins/Validation/validate 18 | validate: function( options ) { 19 | 20 | // if nothing is selected, return nothing; can't chain anyway 21 | if (!this.length) { 22 | if (options && options.debug && window.console) { 23 | console.warn( "nothing selected, can't validate, returning nothing" ); 24 | } 25 | return; 26 | } 27 | 28 | // check if a validator for this form was already created 29 | var validator = $.data(this[0], 'validator'); 30 | if ( validator ) { 31 | return validator; 32 | } 33 | 34 | // Add novalidate tag if HTML5. 35 | this.attr('novalidate', 'novalidate'); 36 | 37 | validator = new $.validator( options, this[0] ); 38 | $.data(this[0], 'validator', validator); 39 | 40 | if ( validator.settings.onsubmit ) { 41 | 42 | this.validateDelegate( ":submit", "click", function(ev) { 43 | if ( validator.settings.submitHandler ) { 44 | validator.submitButton = ev.target; 45 | } 46 | // allow suppressing validation by adding a cancel class to the submit button 47 | if ( $(ev.target).hasClass('cancel') ) { 48 | validator.cancelSubmit = true; 49 | } 50 | }); 51 | 52 | // validate the form on submit 53 | this.submit( function( event ) { 54 | if ( validator.settings.debug ) { 55 | // prevent form submit to be able to see console output 56 | event.preventDefault(); 57 | } 58 | function handle() { 59 | var hidden; 60 | if ( validator.settings.submitHandler ) { 61 | if (validator.submitButton) { 62 | // insert a hidden input as a replacement for the missing submit button 63 | hidden = $("").attr("name", validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm); 64 | } 65 | validator.settings.submitHandler.call( validator, validator.currentForm, event ); 66 | if (validator.submitButton) { 67 | // and clean up afterwards; thanks to no-block-scope, hidden can be referenced 68 | hidden.remove(); 69 | } 70 | return false; 71 | } 72 | return true; 73 | } 74 | 75 | // prevent submit for invalid forms or custom submit handlers 76 | if ( validator.cancelSubmit ) { 77 | validator.cancelSubmit = false; 78 | return handle(); 79 | } 80 | if ( validator.form() ) { 81 | if ( validator.pendingRequest ) { 82 | validator.formSubmitted = true; 83 | return false; 84 | } 85 | return handle(); 86 | } else { 87 | validator.focusInvalid(); 88 | return false; 89 | } 90 | }); 91 | } 92 | 93 | return validator; 94 | }, 95 | // http://docs.jquery.com/Plugins/Validation/valid 96 | valid: function() { 97 | if ( $(this[0]).is('form')) { 98 | return this.validate().form(); 99 | } else { 100 | var valid = true; 101 | var validator = $(this[0].form).validate(); 102 | this.each(function() { 103 | valid &= validator.element(this); 104 | }); 105 | return valid; 106 | } 107 | }, 108 | // attributes: space seperated list of attributes to retrieve and remove 109 | removeAttrs: function(attributes) { 110 | var result = {}, 111 | $element = this; 112 | $.each(attributes.split(/\s/), function(index, value) { 113 | result[value] = $element.attr(value); 114 | $element.removeAttr(value); 115 | }); 116 | return result; 117 | }, 118 | // http://docs.jquery.com/Plugins/Validation/rules 119 | rules: function(command, argument) { 120 | var element = this[0]; 121 | 122 | if (command) { 123 | var settings = $.data(element.form, 'validator').settings; 124 | var staticRules = settings.rules; 125 | var existingRules = $.validator.staticRules(element); 126 | switch(command) { 127 | case "add": 128 | $.extend(existingRules, $.validator.normalizeRule(argument)); 129 | staticRules[element.name] = existingRules; 130 | if (argument.messages) { 131 | settings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages ); 132 | } 133 | break; 134 | case "remove": 135 | if (!argument) { 136 | delete staticRules[element.name]; 137 | return existingRules; 138 | } 139 | var filtered = {}; 140 | $.each(argument.split(/\s/), function(index, method) { 141 | filtered[method] = existingRules[method]; 142 | delete existingRules[method]; 143 | }); 144 | return filtered; 145 | } 146 | } 147 | 148 | var data = $.validator.normalizeRules( 149 | $.extend( 150 | {}, 151 | $.validator.metadataRules(element), 152 | $.validator.classRules(element), 153 | $.validator.attributeRules(element), 154 | $.validator.staticRules(element) 155 | ), element); 156 | 157 | // make sure required is at front 158 | if (data.required) { 159 | var param = data.required; 160 | delete data.required; 161 | data = $.extend({required: param}, data); 162 | } 163 | 164 | return data; 165 | } 166 | }); 167 | 168 | // Custom selectors 169 | $.extend($.expr[":"], { 170 | // http://docs.jquery.com/Plugins/Validation/blank 171 | blank: function(a) {return !$.trim("" + a.value);}, 172 | // http://docs.jquery.com/Plugins/Validation/filled 173 | filled: function(a) {return !!$.trim("" + a.value);}, 174 | // http://docs.jquery.com/Plugins/Validation/unchecked 175 | unchecked: function(a) {return !a.checked;} 176 | }); 177 | 178 | // constructor for validator 179 | $.validator = function( options, form ) { 180 | this.settings = $.extend( true, {}, $.validator.defaults, options ); 181 | this.currentForm = form; 182 | this.init(); 183 | }; 184 | 185 | $.validator.format = function(source, params) { 186 | if ( arguments.length === 1 ) { 187 | return function() { 188 | var args = $.makeArray(arguments); 189 | args.unshift(source); 190 | return $.validator.format.apply( this, args ); 191 | }; 192 | } 193 | if ( arguments.length > 2 && params.constructor !== Array ) { 194 | params = $.makeArray(arguments).slice(1); 195 | } 196 | if ( params.constructor !== Array ) { 197 | params = [ params ]; 198 | } 199 | $.each(params, function(i, n) { 200 | source = source.replace(new RegExp("\\{" + i + "\\}", "g"), n); 201 | }); 202 | return source; 203 | }; 204 | 205 | $.extend($.validator, { 206 | 207 | defaults: { 208 | messages: {}, 209 | groups: {}, 210 | rules: {}, 211 | errorClass: "error", 212 | validClass: "valid", 213 | errorElement: "label", 214 | focusInvalid: true, 215 | errorContainer: $( [] ), 216 | errorLabelContainer: $( [] ), 217 | onsubmit: true, 218 | ignore: ":hidden", 219 | ignoreTitle: false, 220 | onfocusin: function(element, event) { 221 | this.lastActive = element; 222 | 223 | // hide error label and remove error class on focus if enabled 224 | if ( this.settings.focusCleanup && !this.blockFocusCleanup ) { 225 | if ( this.settings.unhighlight ) { 226 | this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass ); 227 | } 228 | this.addWrapper(this.errorsFor(element)).hide(); 229 | } 230 | }, 231 | onfocusout: function(element, event) { 232 | if ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) { 233 | this.element(element); 234 | } 235 | }, 236 | onkeyup: function(element, event) { 237 | if ( element.name in this.submitted || element === this.lastElement ) { 238 | this.element(element); 239 | } 240 | }, 241 | onclick: function(element, event) { 242 | // click on selects, radiobuttons and checkboxes 243 | if ( element.name in this.submitted ) { 244 | this.element(element); 245 | } 246 | // or option elements, check parent select in that case 247 | else if (element.parentNode.name in this.submitted) { 248 | this.element(element.parentNode); 249 | } 250 | }, 251 | highlight: function(element, errorClass, validClass) { 252 | if (element.type === 'radio') { 253 | this.findByName(element.name).addClass(errorClass).removeClass(validClass); 254 | } else { 255 | $(element).addClass(errorClass).removeClass(validClass); 256 | } 257 | }, 258 | unhighlight: function(element, errorClass, validClass) { 259 | if (element.type === 'radio') { 260 | this.findByName(element.name).removeClass(errorClass).addClass(validClass); 261 | } else { 262 | $(element).removeClass(errorClass).addClass(validClass); 263 | } 264 | } 265 | }, 266 | 267 | // http://docs.jquery.com/Plugins/Validation/Validator/setDefaults 268 | setDefaults: function(settings) { 269 | $.extend( $.validator.defaults, settings ); 270 | }, 271 | 272 | messages: { 273 | required: "This field is required.", 274 | remote: "Please fix this field.", 275 | email: "Please enter a valid email address.", 276 | url: "Please enter a valid URL.", 277 | date: "Please enter a valid date.", 278 | dateISO: "Please enter a valid date (ISO).", 279 | number: "Please enter a valid number.", 280 | digits: "Please enter only digits.", 281 | creditcard: "Please enter a valid credit card number.", 282 | equalTo: "Please enter the same value again.", 283 | accept: "Please enter a value with a valid extension.", 284 | maxlength: $.validator.format("Please enter no more than {0} characters."), 285 | minlength: $.validator.format("Please enter at least {0} characters."), 286 | rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."), 287 | range: $.validator.format("Please enter a value between {0} and {1}."), 288 | max: $.validator.format("Please enter a value less than or equal to {0}."), 289 | min: $.validator.format("Please enter a value greater than or equal to {0}.") 290 | }, 291 | 292 | autoCreateRanges: false, 293 | 294 | prototype: { 295 | 296 | init: function() { 297 | this.labelContainer = $(this.settings.errorLabelContainer); 298 | this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm); 299 | this.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer ); 300 | this.submitted = {}; 301 | this.valueCache = {}; 302 | this.pendingRequest = 0; 303 | this.pending = {}; 304 | this.invalid = {}; 305 | this.reset(); 306 | 307 | var groups = (this.groups = {}); 308 | $.each(this.settings.groups, function(key, value) { 309 | $.each(value.split(/\s/), function(index, name) { 310 | groups[name] = key; 311 | }); 312 | }); 313 | var rules = this.settings.rules; 314 | $.each(rules, function(key, value) { 315 | rules[key] = $.validator.normalizeRule(value); 316 | }); 317 | 318 | function delegate(event) { 319 | var validator = $.data(this[0].form, "validator"), 320 | eventType = "on" + event.type.replace(/^validate/, ""); 321 | if (validator.settings[eventType]) { 322 | validator.settings[eventType].call(validator, this[0], event); 323 | } 324 | } 325 | $(this.currentForm) 326 | .validateDelegate("[type='text'], [type='password'], [type='file'], select, textarea, " + 327 | "[type='number'], [type='search'] ,[type='tel'], [type='url'], " + 328 | "[type='email'], [type='datetime'], [type='date'], [type='month'], " + 329 | "[type='week'], [type='time'], [type='datetime-local'], " + 330 | "[type='range'], [type='color'] ", 331 | "focusin focusout keyup", delegate) 332 | .validateDelegate("[type='radio'], [type='checkbox'], select, option", "click", delegate); 333 | 334 | if (this.settings.invalidHandler) { 335 | $(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler); 336 | } 337 | }, 338 | 339 | // http://docs.jquery.com/Plugins/Validation/Validator/form 340 | form: function() { 341 | this.checkForm(); 342 | $.extend(this.submitted, this.errorMap); 343 | this.invalid = $.extend({}, this.errorMap); 344 | if (!this.valid()) { 345 | $(this.currentForm).triggerHandler("invalid-form", [this]); 346 | } 347 | this.showErrors(); 348 | return this.valid(); 349 | }, 350 | 351 | checkForm: function() { 352 | this.prepareForm(); 353 | for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) { 354 | this.check( elements[i] ); 355 | } 356 | return this.valid(); 357 | }, 358 | 359 | // http://docs.jquery.com/Plugins/Validation/Validator/element 360 | element: function( element ) { 361 | element = this.validationTargetFor( this.clean( element ) ); 362 | this.lastElement = element; 363 | this.prepareElement( element ); 364 | this.currentElements = $(element); 365 | var result = this.check( element ) !== false; 366 | if (result) { 367 | delete this.invalid[element.name]; 368 | } else { 369 | this.invalid[element.name] = true; 370 | } 371 | if ( !this.numberOfInvalids() ) { 372 | // Hide error containers on last error 373 | this.toHide = this.toHide.add( this.containers ); 374 | } 375 | this.showErrors(); 376 | return result; 377 | }, 378 | 379 | // http://docs.jquery.com/Plugins/Validation/Validator/showErrors 380 | showErrors: function(errors) { 381 | if(errors) { 382 | // add items to error list and map 383 | $.extend( this.errorMap, errors ); 384 | this.errorList = []; 385 | for ( var name in errors ) { 386 | this.errorList.push({ 387 | message: errors[name], 388 | element: this.findByName(name)[0] 389 | }); 390 | } 391 | // remove items from success list 392 | this.successList = $.grep( this.successList, function(element) { 393 | return !(element.name in errors); 394 | }); 395 | } 396 | if (this.settings.showErrors) { 397 | this.settings.showErrors.call( this, this.errorMap, this.errorList ); 398 | } else { 399 | this.defaultShowErrors(); 400 | } 401 | }, 402 | 403 | // http://docs.jquery.com/Plugins/Validation/Validator/resetForm 404 | resetForm: function() { 405 | if ( $.fn.resetForm ) { 406 | $( this.currentForm ).resetForm(); 407 | } 408 | this.submitted = {}; 409 | this.lastElement = null; 410 | this.prepareForm(); 411 | this.hideErrors(); 412 | this.elements().removeClass( this.settings.errorClass ); 413 | }, 414 | 415 | numberOfInvalids: function() { 416 | return this.objectLength(this.invalid); 417 | }, 418 | 419 | objectLength: function( obj ) { 420 | var count = 0; 421 | for ( var i in obj ) { 422 | count++; 423 | } 424 | return count; 425 | }, 426 | 427 | hideErrors: function() { 428 | this.addWrapper( this.toHide ).hide(); 429 | }, 430 | 431 | valid: function() { 432 | return this.size() === 0; 433 | }, 434 | 435 | size: function() { 436 | return this.errorList.length; 437 | }, 438 | 439 | focusInvalid: function() { 440 | if( this.settings.focusInvalid ) { 441 | try { 442 | $(this.findLastActive() || this.errorList.length && this.errorList[0].element || []) 443 | .filter(":visible") 444 | .focus() 445 | // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find 446 | .trigger("focusin"); 447 | } catch(e) { 448 | // ignore IE throwing errors when focusing hidden elements 449 | } 450 | } 451 | }, 452 | 453 | findLastActive: function() { 454 | var lastActive = this.lastActive; 455 | return lastActive && $.grep(this.errorList, function(n) { 456 | return n.element.name === lastActive.name; 457 | }).length === 1 && lastActive; 458 | }, 459 | 460 | elements: function() { 461 | var validator = this, 462 | rulesCache = {}; 463 | 464 | // select all valid inputs inside the form (no submit or reset buttons) 465 | return $(this.currentForm) 466 | .find("input, select, textarea") 467 | .not(":submit, :reset, :image, [disabled]") 468 | .not( this.settings.ignore ) 469 | .filter(function() { 470 | if ( !this.name && validator.settings.debug && window.console ) { 471 | console.error( "%o has no name assigned", this); 472 | } 473 | 474 | // select only the first element for each name, and only those with rules specified 475 | if ( this.name in rulesCache || !validator.objectLength($(this).rules()) ) { 476 | return false; 477 | } 478 | 479 | rulesCache[this.name] = true; 480 | return true; 481 | }); 482 | }, 483 | 484 | clean: function( selector ) { 485 | return $( selector )[0]; 486 | }, 487 | 488 | errors: function() { 489 | var errorClass = this.settings.errorClass.replace(' ', '.'); 490 | return $( this.settings.errorElement + "." + errorClass, this.errorContext ); 491 | }, 492 | 493 | reset: function() { 494 | this.successList = []; 495 | this.errorList = []; 496 | this.errorMap = {}; 497 | this.toShow = $([]); 498 | this.toHide = $([]); 499 | this.currentElements = $([]); 500 | }, 501 | 502 | prepareForm: function() { 503 | this.reset(); 504 | this.toHide = this.errors().add( this.containers ); 505 | }, 506 | 507 | prepareElement: function( element ) { 508 | this.reset(); 509 | this.toHide = this.errorsFor(element); 510 | }, 511 | 512 | elementValue: function( element ) { 513 | var val = $(element).val(); 514 | if( typeof val === 'string' ) { 515 | return val.replace(/\r/g, ""); 516 | } 517 | return val; 518 | }, 519 | 520 | check: function( element ) { 521 | element = this.validationTargetFor( this.clean( element ) ); 522 | 523 | var rules = $(element).rules(); 524 | var dependencyMismatch = false; 525 | var val = this.elementValue(element); 526 | var result; 527 | 528 | for (var method in rules ) { 529 | var rule = { method: method, parameters: rules[method] }; 530 | try { 531 | 532 | result = $.validator.methods[method].call( this, val, element, rule.parameters ); 533 | 534 | // if a method indicates that the field is optional and therefore valid, 535 | // don't mark it as valid when there are no other rules 536 | if ( result === "dependency-mismatch" ) { 537 | dependencyMismatch = true; 538 | continue; 539 | } 540 | dependencyMismatch = false; 541 | 542 | if ( result === "pending" ) { 543 | this.toHide = this.toHide.not( this.errorsFor(element) ); 544 | return; 545 | } 546 | 547 | if( !result ) { 548 | this.formatAndAdd( element, rule ); 549 | return false; 550 | } 551 | } catch(e) { 552 | if ( this.settings.debug && window.console ) { 553 | console.log("exception occured when checking element " + element.id + ", check the '" + rule.method + "' method", e); 554 | } 555 | throw e; 556 | } 557 | } 558 | if (dependencyMismatch) { 559 | return; 560 | } 561 | if ( this.objectLength(rules) ) { 562 | this.successList.push(element); 563 | } 564 | return true; 565 | }, 566 | 567 | // return the custom message for the given element and validation method 568 | // specified in the element's "messages" metadata 569 | customMetaMessage: function(element, method) { 570 | if (!$.metadata) { 571 | return; 572 | } 573 | var meta = this.settings.meta ? $(element).metadata()[this.settings.meta] : $(element).metadata(); 574 | return meta && meta.messages && meta.messages[method]; 575 | }, 576 | 577 | // return the custom message for the given element name and validation method 578 | customMessage: function( name, method ) { 579 | var m = this.settings.messages[name]; 580 | return m && (m.constructor === String ? m : m[method]); 581 | }, 582 | 583 | // return the first defined argument, allowing empty strings 584 | findDefined: function() { 585 | for(var i = 0; i < arguments.length; i++) { 586 | if (arguments[i] !== undefined) { 587 | return arguments[i]; 588 | } 589 | } 590 | return undefined; 591 | }, 592 | 593 | defaultMessage: function( element, method) { 594 | return this.findDefined( 595 | this.customMessage( element.name, method ), 596 | this.customMetaMessage( element, method ), 597 | // title is never undefined, so handle empty string as undefined 598 | !this.settings.ignoreTitle && element.title || undefined, 599 | $.validator.messages[method], 600 | "Warning: No message defined for " + element.name + "" 601 | ); 602 | }, 603 | 604 | formatAndAdd: function( element, rule ) { 605 | var message = this.defaultMessage( element, rule.method ), 606 | theregex = /\$?\{(\d+)\}/g; 607 | if ( typeof message === "function" ) { 608 | message = message.call(this, rule.parameters, element); 609 | } else if (theregex.test(message)) { 610 | message = $.validator.format(message.replace(theregex, '{$1}'), rule.parameters); 611 | } 612 | this.errorList.push({ 613 | message: message, 614 | element: element 615 | }); 616 | 617 | this.errorMap[element.name] = message; 618 | this.submitted[element.name] = message; 619 | }, 620 | 621 | addWrapper: function(toToggle) { 622 | if ( this.settings.wrapper ) { 623 | toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) ); 624 | } 625 | return toToggle; 626 | }, 627 | 628 | defaultShowErrors: function() { 629 | var i, elements; 630 | for ( i = 0; this.errorList[i]; i++ ) { 631 | var error = this.errorList[i]; 632 | if ( this.settings.highlight ) { 633 | this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass ); 634 | } 635 | this.showLabel( error.element, error.message ); 636 | } 637 | if( this.errorList.length ) { 638 | this.toShow = this.toShow.add( this.containers ); 639 | } 640 | if (this.settings.success) { 641 | for ( i = 0; this.successList[i]; i++ ) { 642 | this.showLabel( this.successList[i] ); 643 | } 644 | } 645 | if (this.settings.unhighlight) { 646 | for ( i = 0, elements = this.validElements(); elements[i]; i++ ) { 647 | this.settings.unhighlight.call( this, elements[i], this.settings.errorClass, this.settings.validClass ); 648 | } 649 | } 650 | this.toHide = this.toHide.not( this.toShow ); 651 | this.hideErrors(); 652 | this.addWrapper( this.toShow ).show(); 653 | }, 654 | 655 | validElements: function() { 656 | return this.currentElements.not(this.invalidElements()); 657 | }, 658 | 659 | invalidElements: function() { 660 | return $(this.errorList).map(function() { 661 | return this.element; 662 | }); 663 | }, 664 | 665 | showLabel: function(element, message) { 666 | var label = this.errorsFor( element ); 667 | if ( label.length ) { 668 | // refresh error/success class 669 | label.removeClass( this.settings.validClass ).addClass( this.settings.errorClass ); 670 | 671 | // check if we have a generated label, replace the message then 672 | if ( label.attr("generated") ) { 673 | label.html(message); 674 | } 675 | } else { 676 | // create label 677 | label = $("<" + this.settings.errorElement + "/>") 678 | .attr({"for": this.idOrName(element), generated: true}) 679 | .addClass(this.settings.errorClass) 680 | .html(message || ""); 681 | if ( this.settings.wrapper ) { 682 | // make sure the element is visible, even in IE 683 | // actually showing the wrapped element is handled elsewhere 684 | label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent(); 685 | } 686 | if ( !this.labelContainer.append(label).length ) { 687 | if ( this.settings.errorPlacement ) { 688 | this.settings.errorPlacement(label, $(element) ); 689 | } else { 690 | label.insertAfter(element); 691 | } 692 | } 693 | } 694 | if ( !message && this.settings.success ) { 695 | label.text(""); 696 | if ( typeof this.settings.success === "string" ) { 697 | label.addClass( this.settings.success ); 698 | } else { 699 | this.settings.success( label ); 700 | } 701 | } 702 | this.toShow = this.toShow.add(label); 703 | }, 704 | 705 | errorsFor: function(element) { 706 | var name = this.idOrName(element); 707 | return this.errors().filter(function() { 708 | return $(this).attr('for') === name; 709 | }); 710 | }, 711 | 712 | idOrName: function(element) { 713 | return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name); 714 | }, 715 | 716 | validationTargetFor: function(element) { 717 | // if radio/checkbox, validate first element in group instead 718 | if (this.checkable(element)) { 719 | element = this.findByName( element.name ).not(this.settings.ignore)[0]; 720 | } 721 | return element; 722 | }, 723 | 724 | checkable: function( element ) { 725 | return (/radio|checkbox/i).test(element.type); 726 | }, 727 | 728 | findByName: function( name ) { 729 | // select by name and filter by form for performance over form.find("[name=...]") 730 | var form = this.currentForm; 731 | return $(document.getElementsByName(name)).map(function(index, element) { 732 | return element.form === form && element.name === name && element || null; 733 | }); 734 | }, 735 | 736 | getLength: function(value, element) { 737 | switch( element.nodeName.toLowerCase() ) { 738 | case 'select': 739 | return $("option:selected", element).length; 740 | case 'input': 741 | if( this.checkable( element) ) { 742 | return this.findByName(element.name).filter(':checked').length; 743 | } 744 | } 745 | return value.length; 746 | }, 747 | 748 | depend: function(param, element) { 749 | return this.dependTypes[typeof param] ? this.dependTypes[typeof param](param, element) : true; 750 | }, 751 | 752 | dependTypes: { 753 | "boolean": function(param, element) { 754 | return param; 755 | }, 756 | "string": function(param, element) { 757 | return !!$(param, element.form).length; 758 | }, 759 | "function": function(param, element) { 760 | return param(element); 761 | } 762 | }, 763 | 764 | optional: function(element) { 765 | var val = this.elementValue(element); 766 | return !$.validator.methods.required.call(this, val, element) && "dependency-mismatch"; 767 | }, 768 | 769 | startRequest: function(element) { 770 | if (!this.pending[element.name]) { 771 | this.pendingRequest++; 772 | this.pending[element.name] = true; 773 | } 774 | }, 775 | 776 | stopRequest: function(element, valid) { 777 | this.pendingRequest--; 778 | // sometimes synchronization fails, make sure pendingRequest is never < 0 779 | if (this.pendingRequest < 0) { 780 | this.pendingRequest = 0; 781 | } 782 | delete this.pending[element.name]; 783 | if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) { 784 | $(this.currentForm).submit(); 785 | this.formSubmitted = false; 786 | } else if (!valid && this.pendingRequest === 0 && this.formSubmitted) { 787 | $(this.currentForm).triggerHandler("invalid-form", [this]); 788 | this.formSubmitted = false; 789 | } 790 | }, 791 | 792 | previousValue: function(element) { 793 | return $.data(element, "previousValue") || $.data(element, "previousValue", { 794 | old: null, 795 | valid: true, 796 | message: this.defaultMessage( element, "remote" ) 797 | }); 798 | } 799 | 800 | }, 801 | 802 | classRuleSettings: { 803 | required: {required: true}, 804 | email: {email: true}, 805 | url: {url: true}, 806 | date: {date: true}, 807 | dateISO: {dateISO: true}, 808 | number: {number: true}, 809 | digits: {digits: true}, 810 | creditcard: {creditcard: true} 811 | }, 812 | 813 | addClassRules: function(className, rules) { 814 | if ( className.constructor === String ) { 815 | this.classRuleSettings[className] = rules; 816 | } else { 817 | $.extend(this.classRuleSettings, className); 818 | } 819 | }, 820 | 821 | classRules: function(element) { 822 | var rules = {}; 823 | var classes = $(element).attr('class'); 824 | if ( classes ) { 825 | $.each(classes.split(' '), function() { 826 | if (this in $.validator.classRuleSettings) { 827 | $.extend(rules, $.validator.classRuleSettings[this]); 828 | } 829 | }); 830 | } 831 | return rules; 832 | }, 833 | 834 | attributeRules: function(element) { 835 | var rules = {}; 836 | var $element = $(element); 837 | 838 | for (var method in $.validator.methods) { 839 | var value; 840 | 841 | // support for in both html5 and older browsers 842 | if (method === 'required') { 843 | value = $element.get(0).getAttribute(method); 844 | // Some browsers return an empty string for the required attribute 845 | // and non-HTML5 browsers might have required="" markup 846 | if (value === "") { 847 | value = true; 848 | } else if (value === "false") { 849 | value = false; 850 | } 851 | // force non-HTML5 browsers to return bool 852 | value = !!value; 853 | } else { 854 | value = $element.attr(method); 855 | } 856 | 857 | if (value) { 858 | rules[method] = value; 859 | } else if ($element[0].getAttribute("type") === method) { 860 | rules[method] = true; 861 | } 862 | } 863 | 864 | // maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs 865 | if (rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength)) { 866 | delete rules.maxlength; 867 | } 868 | 869 | return rules; 870 | }, 871 | 872 | metadataRules: function(element) { 873 | if (!$.metadata) { 874 | return {}; 875 | } 876 | 877 | var meta = $.data(element.form, 'validator').settings.meta; 878 | return meta ? 879 | $(element).metadata()[meta] : 880 | $(element).metadata(); 881 | }, 882 | 883 | staticRules: function(element) { 884 | var rules = {}; 885 | var validator = $.data(element.form, 'validator'); 886 | if (validator.settings.rules) { 887 | rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {}; 888 | } 889 | return rules; 890 | }, 891 | 892 | normalizeRules: function(rules, element) { 893 | // handle dependency check 894 | $.each(rules, function(prop, val) { 895 | // ignore rule when param is explicitly false, eg. required:false 896 | if (val === false) { 897 | delete rules[prop]; 898 | return; 899 | } 900 | if (val.param || val.depends) { 901 | var keepRule = true; 902 | switch (typeof val.depends) { 903 | case "string": 904 | keepRule = !!$(val.depends, element.form).length; 905 | break; 906 | case "function": 907 | keepRule = val.depends.call(element, element); 908 | break; 909 | } 910 | if (keepRule) { 911 | rules[prop] = val.param !== undefined ? val.param : true; 912 | } else { 913 | delete rules[prop]; 914 | } 915 | } 916 | }); 917 | 918 | // evaluate parameters 919 | $.each(rules, function(rule, parameter) { 920 | rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter; 921 | }); 922 | 923 | // clean number parameters 924 | $.each(['minlength', 'maxlength', 'min', 'max'], function() { 925 | if (rules[this]) { 926 | rules[this] = Number(rules[this]); 927 | } 928 | }); 929 | $.each(['rangelength', 'range'], function() { 930 | if (rules[this]) { 931 | rules[this] = [Number(rules[this][0]), Number(rules[this][1])]; 932 | } 933 | }); 934 | 935 | if ($.validator.autoCreateRanges) { 936 | // auto-create ranges 937 | if (rules.min && rules.max) { 938 | rules.range = [rules.min, rules.max]; 939 | delete rules.min; 940 | delete rules.max; 941 | } 942 | if (rules.minlength && rules.maxlength) { 943 | rules.rangelength = [rules.minlength, rules.maxlength]; 944 | delete rules.minlength; 945 | delete rules.maxlength; 946 | } 947 | } 948 | 949 | // To support custom messages in metadata ignore rule methods titled "messages" 950 | if (rules.messages) { 951 | delete rules.messages; 952 | } 953 | 954 | return rules; 955 | }, 956 | 957 | // Converts a simple string to a {string: true} rule, e.g., "required" to {required:true} 958 | normalizeRule: function(data) { 959 | if( typeof data === "string" ) { 960 | var transformed = {}; 961 | $.each(data.split(/\s/), function() { 962 | transformed[this] = true; 963 | }); 964 | data = transformed; 965 | } 966 | return data; 967 | }, 968 | 969 | // http://docs.jquery.com/Plugins/Validation/Validator/addMethod 970 | addMethod: function(name, method, message) { 971 | $.validator.methods[name] = method; 972 | $.validator.messages[name] = message !== undefined ? message : $.validator.messages[name]; 973 | if (method.length < 3) { 974 | $.validator.addClassRules(name, $.validator.normalizeRule(name)); 975 | } 976 | }, 977 | 978 | methods: { 979 | 980 | // http://docs.jquery.com/Plugins/Validation/Methods/required 981 | required: function(value, element, param) { 982 | // check if dependency is met 983 | if ( !this.depend(param, element) ) { 984 | return "dependency-mismatch"; 985 | } 986 | if ( element.nodeName.toLowerCase() === "select" ) { 987 | // could be an array for select-multiple or a string, both are fine this way 988 | var val = $(element).val(); 989 | return val && val.length > 0; 990 | } 991 | if ( this.checkable(element) ) { 992 | return this.getLength(value, element) > 0; 993 | } 994 | return $.trim(value).length > 0; 995 | }, 996 | 997 | // http://docs.jquery.com/Plugins/Validation/Methods/remote 998 | remote: function(value, element, param) { 999 | if ( this.optional(element) ) { 1000 | return "dependency-mismatch"; 1001 | } 1002 | 1003 | var previous = this.previousValue(element); 1004 | if (!this.settings.messages[element.name] ) { 1005 | this.settings.messages[element.name] = {}; 1006 | } 1007 | previous.originalMessage = this.settings.messages[element.name].remote; 1008 | this.settings.messages[element.name].remote = previous.message; 1009 | 1010 | param = typeof param === "string" && {url:param} || param; 1011 | 1012 | if ( this.pending[element.name] ) { 1013 | return "pending"; 1014 | } 1015 | if ( previous.old === value ) { 1016 | return previous.valid; 1017 | } 1018 | 1019 | previous.old = value; 1020 | var validator = this; 1021 | this.startRequest(element); 1022 | var data = {}; 1023 | data[element.name] = value; 1024 | $.ajax($.extend(true, { 1025 | url: param, 1026 | mode: "abort", 1027 | port: "validate" + element.name, 1028 | dataType: "json", 1029 | data: data, 1030 | success: function(response) { 1031 | validator.settings.messages[element.name].remote = previous.originalMessage; 1032 | var valid = response === true; 1033 | if ( valid ) { 1034 | var submitted = validator.formSubmitted; 1035 | validator.prepareElement(element); 1036 | validator.formSubmitted = submitted; 1037 | validator.successList.push(element); 1038 | validator.showErrors(); 1039 | } else { 1040 | var errors = {}; 1041 | var message = response || validator.defaultMessage( element, "remote" ); 1042 | errors[element.name] = previous.message = $.isFunction(message) ? message(value) : message; 1043 | validator.showErrors(errors); 1044 | } 1045 | previous.valid = valid; 1046 | validator.stopRequest(element, valid); 1047 | } 1048 | }, param)); 1049 | return "pending"; 1050 | }, 1051 | 1052 | // http://docs.jquery.com/Plugins/Validation/Methods/minlength 1053 | minlength: function(value, element, param) { 1054 | var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element); 1055 | return this.optional(element) || length >= param; 1056 | }, 1057 | 1058 | // http://docs.jquery.com/Plugins/Validation/Methods/maxlength 1059 | maxlength: function(value, element, param) { 1060 | var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element); 1061 | return this.optional(element) || length <= param; 1062 | }, 1063 | 1064 | // http://docs.jquery.com/Plugins/Validation/Methods/rangelength 1065 | rangelength: function(value, element, param) { 1066 | var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element); 1067 | return this.optional(element) || ( length >= param[0] && length <= param[1] ); 1068 | }, 1069 | 1070 | // http://docs.jquery.com/Plugins/Validation/Methods/min 1071 | min: function( value, element, param ) { 1072 | return this.optional(element) || value >= param; 1073 | }, 1074 | 1075 | // http://docs.jquery.com/Plugins/Validation/Methods/max 1076 | max: function( value, element, param ) { 1077 | return this.optional(element) || value <= param; 1078 | }, 1079 | 1080 | // http://docs.jquery.com/Plugins/Validation/Methods/range 1081 | range: function( value, element, param ) { 1082 | return this.optional(element) || ( value >= param[0] && value <= param[1] ); 1083 | }, 1084 | 1085 | // http://docs.jquery.com/Plugins/Validation/Methods/email 1086 | email: function(value, element) { 1087 | // contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/ 1088 | return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(value); 1089 | }, 1090 | 1091 | // http://docs.jquery.com/Plugins/Validation/Methods/url 1092 | url: function(value, element) { 1093 | // contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/ 1094 | return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value); 1095 | }, 1096 | 1097 | // http://docs.jquery.com/Plugins/Validation/Methods/date 1098 | date: function(value, element) { 1099 | return this.optional(element) || !/Invalid|NaN/.test(new Date(value)); 1100 | }, 1101 | 1102 | // http://docs.jquery.com/Plugins/Validation/Methods/dateISO 1103 | dateISO: function(value, element) { 1104 | return this.optional(element) || /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(value); 1105 | }, 1106 | 1107 | // http://docs.jquery.com/Plugins/Validation/Methods/number 1108 | number: function(value, element) { 1109 | return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value); 1110 | }, 1111 | 1112 | // http://docs.jquery.com/Plugins/Validation/Methods/digits 1113 | digits: function(value, element) { 1114 | return this.optional(element) || /^\d+$/.test(value); 1115 | }, 1116 | 1117 | // http://docs.jquery.com/Plugins/Validation/Methods/creditcard 1118 | // based on http://en.wikipedia.org/wiki/Luhn 1119 | creditcard: function(value, element) { 1120 | if ( this.optional(element) ) { 1121 | return "dependency-mismatch"; 1122 | } 1123 | // accept only spaces, digits and dashes 1124 | if (/[^0-9 \-]+/.test(value)) { 1125 | return false; 1126 | } 1127 | var nCheck = 0, 1128 | nDigit = 0, 1129 | bEven = false; 1130 | 1131 | value = value.replace(/\D/g, ""); 1132 | 1133 | for (var n = value.length - 1; n >= 0; n--) { 1134 | var cDigit = value.charAt(n); 1135 | nDigit = parseInt(cDigit, 10); 1136 | if (bEven) { 1137 | if ((nDigit *= 2) > 9) { 1138 | nDigit -= 9; 1139 | } 1140 | } 1141 | nCheck += nDigit; 1142 | bEven = !bEven; 1143 | } 1144 | 1145 | return (nCheck % 10) === 0; 1146 | }, 1147 | 1148 | // http://docs.jquery.com/Plugins/Validation/Methods/accept 1149 | accept: function(value, element, param) { 1150 | param = typeof param === "string" ? param.replace(/,/g, '|') : "png|jpe?g|gif"; 1151 | return this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i")); 1152 | }, 1153 | 1154 | // http://docs.jquery.com/Plugins/Validation/Methods/equalTo 1155 | equalTo: function(value, element, param) { 1156 | // bind to the blur event of the target in order to revalidate whenever the target field is updated 1157 | // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead 1158 | var target = $(param).unbind(".validate-equalTo").bind("blur.validate-equalTo", function() { 1159 | $(element).valid(); 1160 | }); 1161 | return value === target.val(); 1162 | } 1163 | 1164 | } 1165 | 1166 | }); 1167 | 1168 | // deprecated, use $.validator.format instead 1169 | $.format = $.validator.format; 1170 | 1171 | }(jQuery)); 1172 | 1173 | // ajax mode: abort 1174 | // usage: $.ajax({ mode: "abort"[, port: "uniqueport"]}); 1175 | // if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort() 1176 | (function($) { 1177 | var pendingRequests = {}; 1178 | // Use a prefilter if available (1.5+) 1179 | if ( $.ajaxPrefilter ) { 1180 | $.ajaxPrefilter(function(settings, _, xhr) { 1181 | var port = settings.port; 1182 | if (settings.mode === "abort") { 1183 | if ( pendingRequests[port] ) { 1184 | pendingRequests[port].abort(); 1185 | } 1186 | pendingRequests[port] = xhr; 1187 | } 1188 | }); 1189 | } else { 1190 | // Proxy ajax 1191 | var ajax = $.ajax; 1192 | $.ajax = function(settings) { 1193 | var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode, 1194 | port = ( "port" in settings ? settings : $.ajaxSettings ).port; 1195 | if (mode === "abort") { 1196 | if ( pendingRequests[port] ) { 1197 | pendingRequests[port].abort(); 1198 | } 1199 | return (pendingRequests[port] = ajax.apply(this, arguments)); 1200 | } 1201 | return ajax.apply(this, arguments); 1202 | }; 1203 | } 1204 | }(jQuery)); 1205 | 1206 | // provides cross-browser focusin and focusout events 1207 | // IE has native support, in other browsers, use event caputuring (neither bubbles) 1208 | 1209 | // provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation 1210 | // handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target 1211 | (function($) { 1212 | // only implement if not provided by jQuery core (since 1.4) 1213 | // TODO verify if jQuery 1.4's implementation is compatible with older jQuery special-event APIs 1214 | if (!jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener) { 1215 | $.each({ 1216 | focus: 'focusin', 1217 | blur: 'focusout' 1218 | }, function( original, fix ){ 1219 | $.event.special[fix] = { 1220 | setup:function() { 1221 | this.addEventListener( original, handler, true ); 1222 | }, 1223 | teardown:function() { 1224 | this.removeEventListener( original, handler, true ); 1225 | }, 1226 | handler: function(e) { 1227 | var args = arguments; 1228 | args[0] = $.event.fix(e); 1229 | args[0].type = fix; 1230 | return $.event.handle.apply(this, args); 1231 | } 1232 | }; 1233 | function handler(e) { 1234 | e = $.event.fix(e); 1235 | e.type = fix; 1236 | return $.event.handle.call(this, e); 1237 | } 1238 | }); 1239 | } 1240 | $.extend($.fn, { 1241 | validateDelegate: function(delegate, type, handler) { 1242 | return this.bind(type, function(event) { 1243 | var target = $(event.target); 1244 | if (target.is(delegate)) { 1245 | return handler.apply(target, arguments); 1246 | } 1247 | }); 1248 | } 1249 | }); 1250 | }(jQuery)); -------------------------------------------------------------------------------- /src/main/resources/templates/layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Layout 5 | 8 | 9 | 10 | 11 | 12 | 13 | 15 | Thymeleaf - Layout 16 | 17 | 18 | 19 | 20 | Messages 21 | 22 | 23 | 24 | 25 | 26 | Layout 27 | 28 | Fake content 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/main/resources/templates/messages/form.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Messages : Create 7 | 8 | 9 | Messages : Create 10 | 12 | 17 | 19 | 21 | Validation error 22 | 23 | 24 | 25 | 26 | Messages 27 | 28 | 29 | Summary 30 | 33 | Message 34 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/main/resources/templates/messages/list.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Messages : View all 7 | 8 | 9 | Messages : View all 10 | 11 | 12 | Create Message 13 | 14 | 15 | 16 | 17 | ID 18 | Created 19 | Summary 20 | 21 | 22 | 23 | 24 | 25 | No messages 26 | 27 | 28 | 29 | 1 30 | 31 | July 11, 2012 2:17:16 PM CDT 32 | 33 | 34 | 37 | The summary 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/main/resources/templates/messages/view.html: -------------------------------------------------------------------------------- 1 | 4 | 5 | Messages : View 6 | 7 | 8 | Messages : Create 9 | 11 | 14 | Some Success message 15 | 16 | 17 | 18 | Messages 19 | 20 | 21 | 22 | ID 23 | 123 24 | Date 25 | 27 | July 11, 2012 2:17:16 PM CDT 28 | 29 | Summary 30 | 32 | A short summary... 33 | 34 | Message 35 | 37 | A detailed message that is longer than the summary. 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/test/java/sample/ui/MessageControllerWebTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012-2014 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.ui; 18 | 19 | import java.util.regex.Pattern; 20 | 21 | import org.hamcrest.Description; 22 | import org.hamcrest.TypeSafeMatcher; 23 | import org.junit.Before; 24 | import org.junit.Test; 25 | import org.junit.runner.RunWith; 26 | import org.springframework.beans.factory.annotation.Autowired; 27 | import org.springframework.test.context.ContextConfiguration; 28 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 29 | import org.springframework.test.context.web.WebAppConfiguration; 30 | import org.springframework.test.web.servlet.MockMvc; 31 | import org.springframework.test.web.servlet.setup.MockMvcBuilders; 32 | import org.springframework.web.context.WebApplicationContext; 33 | 34 | import static org.hamcrest.Matchers.containsString; 35 | import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; 36 | import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; 37 | import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; 38 | import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header; 39 | import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; 40 | 41 | /** 42 | * A Basic Spring MVC Test for the Sample Controller" 43 | * 44 | * @author Biju Kunjummen 45 | * @author Doo-Hwan, Kwak 46 | */ 47 | @RunWith(SpringJUnit4ClassRunner.class) 48 | @WebAppConfiguration 49 | @ContextConfiguration(classes = SampleWebUiApplication.class) 50 | public class MessageControllerWebTests { 51 | 52 | @Autowired 53 | private WebApplicationContext wac; 54 | 55 | private MockMvc mockMvc; 56 | 57 | @Before 58 | public void setup() { 59 | this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build(); 60 | } 61 | 62 | @Test 63 | public void testHome() throws Exception { 64 | this.mockMvc.perform(get("/")).andExpect(status().isOk()) 65 | .andExpect(content().string(containsString("Messages"))); 66 | } 67 | 68 | @Test 69 | public void testCreate() throws Exception { 70 | this.mockMvc.perform(post("/").param("text", "FOO text").param("summary", "FOO")) 71 | .andExpect(status().isFound()) 72 | .andExpect(header().string("location", RegexMatcher.matches("/[0-9]+"))); 73 | } 74 | 75 | @Test 76 | public void testCreateValidation() throws Exception { 77 | this.mockMvc.perform(post("/").param("text", "").param("summary", "")) 78 | .andExpect(status().isOk()) 79 | .andExpect(content().string(containsString("is required"))); 80 | } 81 | 82 | private static class RegexMatcher extends TypeSafeMatcher { 83 | private final String regex; 84 | 85 | public RegexMatcher(String regex) { 86 | this.regex = regex; 87 | } 88 | 89 | public static org.hamcrest.Matcher matches(String regex) { 90 | return new RegexMatcher(regex); 91 | } 92 | 93 | @Override 94 | public boolean matchesSafely(String item) { 95 | return Pattern.compile(this.regex).matcher(item).find(); 96 | } 97 | 98 | @Override 99 | public void describeMismatchSafely(String item, Description mismatchDescription) { 100 | mismatchDescription.appendText("was \"").appendText(item).appendText("\""); 101 | } 102 | 103 | @Override 104 | public void describeTo(Description description) { 105 | description.appendText("a string that matches regex: ") 106 | .appendText(this.regex); 107 | } 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /src/test/java/sample/ui/SampleWebUiApplicationTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012-2014 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.ui; 18 | 19 | import java.net.URI; 20 | 21 | import org.junit.Test; 22 | import org.junit.runner.RunWith; 23 | import org.springframework.beans.factory.annotation.Value; 24 | import org.springframework.boot.test.IntegrationTest; 25 | import org.springframework.boot.test.SpringApplicationConfiguration; 26 | import org.springframework.boot.test.TestRestTemplate; 27 | import org.springframework.http.HttpStatus; 28 | import org.springframework.http.ResponseEntity; 29 | import org.springframework.test.annotation.DirtiesContext; 30 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 31 | import org.springframework.test.context.web.WebAppConfiguration; 32 | import org.springframework.util.LinkedMultiValueMap; 33 | import org.springframework.util.MultiValueMap; 34 | 35 | import static org.junit.Assert.assertEquals; 36 | import static org.junit.Assert.assertFalse; 37 | import static org.junit.Assert.assertTrue; 38 | 39 | /** 40 | * Basic integration tests for demo application. 41 | * 42 | * @author Dave Syer 43 | */ 44 | @RunWith(SpringJUnit4ClassRunner.class) 45 | @SpringApplicationConfiguration(classes = SampleWebUiApplication.class) 46 | @WebAppConfiguration 47 | @IntegrationTest("server.port:0") 48 | @DirtiesContext 49 | public class SampleWebUiApplicationTests { 50 | 51 | @Value("${local.server.port}") 52 | private int port; 53 | 54 | @Test 55 | public void testHome() throws Exception { 56 | ResponseEntity entity = new TestRestTemplate().getForEntity( 57 | "http://localhost:" + this.port, String.class); 58 | assertEquals(HttpStatus.OK, entity.getStatusCode()); 59 | assertTrue("Wrong body (title doesn't match):\n" + entity.getBody(), entity 60 | .getBody().contains("Messages")); 61 | assertFalse("Wrong body (found layout:fragment):\n" + entity.getBody(), entity 62 | .getBody().contains("layout:fragment")); 63 | } 64 | 65 | @Test 66 | public void testCreate() throws Exception { 67 | MultiValueMap map = new LinkedMultiValueMap(); 68 | map.set("text", "FOO text"); 69 | map.set("summary", "FOO"); 70 | URI location = new TestRestTemplate().postForLocation("http://localhost:" 71 | + this.port, map); 72 | assertTrue("Wrong location:\n" + location, 73 | location.toString().contains("localhost:" + this.port)); 74 | } 75 | 76 | @Test 77 | public void testCss() throws Exception { 78 | ResponseEntity entity = new TestRestTemplate().getForEntity( 79 | "http://localhost:" + this.port + "/css/bootstrap.min.css", String.class); 80 | assertEquals(HttpStatus.OK, entity.getStatusCode()); 81 | assertTrue("Wrong body:\n" + entity.getBody(), entity.getBody().contains("body")); 82 | } 83 | 84 | } 85 | --------------------------------------------------------------------------------
21 | Validation error 22 |