update:
1. 增加舱单统计接口和前端静态文件. 2. 更新预配原始相关类文件,以配合统计. 3. 增加预配批量删除处理. 4. 增加批量删除日志接口. 5. 优化swagger-ui配置及访问安全. 6. 增加yml文件swagger-ui配置信息. 7. 更改yml文件对于thymeleaf的XML模式的限制取消,增强对前端html模版和报文xml模版的适应性. Signed-off-by: mrz <17966059@qq.com>
正在显示
44 个修改的文件
包含
2665 行增加
和
46 行删除
@@ -14,9 +14,9 @@ spring: | @@ -14,9 +14,9 @@ spring: | ||
14 | thymeleaf: | 14 | thymeleaf: |
15 | cache: false | 15 | cache: false |
16 | encoding: UTF-8 | 16 | encoding: UTF-8 |
17 | - mode: XML | ||
18 | - suffix: .xml | ||
19 | - prefix: classpath:/templates/ | 17 | +# mode: XML |
18 | +# suffix: .xml | ||
19 | +# prefix: classpath:/templates/ | ||
20 | resources: | 20 | resources: |
21 | static-locations: classpath:/META-INF/resources/,classpath:/static,classpath:/resources/,file:${web.upload-path} | 21 | static-locations: classpath:/META-INF/resources/,classpath:/static,classpath:/resources/,file:${web.upload-path} |
22 | 22 | ||
@@ -37,12 +37,12 @@ spring: | @@ -37,12 +37,12 @@ spring: | ||
37 | #eureka主机名,会在控制页面中显示 | 37 | #eureka主机名,会在控制页面中显示 |
38 | #DEV环境关闭注册。 | 38 | #DEV环境关闭注册。 |
39 | features: | 39 | features: |
40 | - enabled: false | 40 | + enabled: true |
41 | discovery: | 41 | discovery: |
42 | - enabled: false | 42 | + enabled: true |
43 | service-registry: | 43 | service-registry: |
44 | auto-registration: | 44 | auto-registration: |
45 | - enabled: false | 45 | + enabled: true |
46 | 46 | ||
47 | datasource: | 47 | datasource: |
48 | type: com.alibaba.druid.pool.DruidDataSource | 48 | type: com.alibaba.druid.pool.DruidDataSource |
@@ -116,11 +116,17 @@ trace: false | @@ -116,11 +116,17 @@ trace: false | ||
116 | debug: true | 116 | debug: true |
117 | 117 | ||
118 | swagger: | 118 | swagger: |
119 | + enabled: false | ||
119 | production: false | 120 | production: false |
120 | basic: | 121 | basic: |
121 | enable: true | 122 | enable: true |
122 | - username: jack | ||
123 | - password: Admin2021@999 | 123 | + username: jackMa |
124 | + password: Admin2024@999 | ||
125 | + | ||
126 | +springfox: | ||
127 | + documentation: | ||
128 | + enabled: false | ||
129 | + | ||
124 | 130 | ||
125 | logging: | 131 | logging: |
126 | file: | 132 | file: |
@@ -23,8 +23,8 @@ public class SwaggerConfig { | @@ -23,8 +23,8 @@ public class SwaggerConfig { | ||
23 | .apiInfo(apiInfo()) | 23 | .apiInfo(apiInfo()) |
24 | .pathMapping("/") | 24 | .pathMapping("/") |
25 | .select() // 选择哪些路径和api会生成document | 25 | .select() // 选择哪些路径和api会生成document |
26 | - .apis(RequestHandlerSelectors.any())// 对所有api进行监控 | ||
27 | -// .apis(RequestHandlerSelectors.basePackage("com.hanstrovsky.controller"))// 选择监控的package | 26 | +// .apis(RequestHandlerSelectors.any())// 对所有api进行监控 |
27 | + .apis(RequestHandlerSelectors.basePackage("com.tianbo.analysis.controller"))// 选择监控的package | ||
28 | // .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))// 只监控有ApiOperation注解的接口 | 28 | // .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))// 只监控有ApiOperation注解的接口 |
29 | //不显示错误的接口地址 | 29 | //不显示错误的接口地址 |
30 | .paths(Predicates.not(PathSelectors.regex("/error.*")))//错误路径不监控 | 30 | .paths(Predicates.not(PathSelectors.regex("/error.*")))//错误路径不监控 |
1 | +package com.tianbo.analysis.controller; | ||
2 | +import com.tianbo.analysis.dao.BusinessAlterLogDao; | ||
3 | +import com.tianbo.analysis.model.BusinessAlterLog; | ||
4 | +import com.tianbo.analysis.model.ResultJson; | ||
5 | +import com.tianbo.analysis.service.BusinessAlterLogService; | ||
6 | +import lombok.extern.slf4j.Slf4j; | ||
7 | +import org.springframework.beans.factory.annotation.Autowired; | ||
8 | +import org.springframework.web.bind.annotation.*; | ||
9 | + | ||
10 | +import javax.annotation.Resource; | ||
11 | +import java.util.Date; | ||
12 | +import java.util.UUID; | ||
13 | + | ||
14 | +@Slf4j | ||
15 | +@RestController | ||
16 | +@RequestMapping("/businessAlterLog/") | ||
17 | +public class BusinessAlterLogController { | ||
18 | + | ||
19 | + @Autowired | ||
20 | + BusinessAlterLogService businessAlterLogService; | ||
21 | + | ||
22 | + | ||
23 | + @PostMapping("add") | ||
24 | + public ResultJson add(@RequestBody BusinessAlterLog businessAlterLog){ | ||
25 | + businessAlterLog.setAutoid(UUID.randomUUID().toString()); | ||
26 | + businessAlterLog.setCreatedate(new Date()); | ||
27 | + int i = businessAlterLogService.insert(businessAlterLog); | ||
28 | + return i>0 ? new ResultJson("200","变更原因存储成功",businessAlterLog): new ResultJson("400","变更原因存储失败",businessAlterLog); | ||
29 | + } | ||
30 | + | ||
31 | + @PostMapping("get") | ||
32 | + public ResultJson search(@RequestBody BusinessAlterLog businessAlterLog){ | ||
33 | + BusinessAlterLog result = businessAlterLogService.selectByBillAutoidAndType(businessAlterLog); | ||
34 | + return new ResultJson("200","获取批量删除申报信息成功", result); | ||
35 | + } | ||
36 | +} |
@@ -3,6 +3,7 @@ package com.tianbo.analysis.controller; | @@ -3,6 +3,7 @@ package com.tianbo.analysis.controller; | ||
3 | 3 | ||
4 | import com.github.pagehelper.PageInfo; | 4 | import com.github.pagehelper.PageInfo; |
5 | import com.tianbo.analysis.dao.PREPAREMASTERMapper; | 5 | import com.tianbo.analysis.dao.PREPAREMASTERMapper; |
6 | +import com.tianbo.analysis.model.BatchSend; | ||
6 | import com.tianbo.analysis.model.PREPAREMASTER; | 7 | import com.tianbo.analysis.model.PREPAREMASTER; |
7 | import com.tianbo.analysis.model.ResultJson; | 8 | import com.tianbo.analysis.model.ResultJson; |
8 | import com.tianbo.analysis.service.PREPARMASTERService; | 9 | import com.tianbo.analysis.service.PREPARMASTERService; |
@@ -10,12 +11,11 @@ import com.tianbo.util.Date.DateUtil; | @@ -10,12 +11,11 @@ import com.tianbo.util.Date.DateUtil; | ||
10 | import lombok.extern.slf4j.Slf4j; | 11 | import lombok.extern.slf4j.Slf4j; |
11 | import org.apache.commons.lang.StringUtils; | 12 | import org.apache.commons.lang.StringUtils; |
12 | import org.springframework.beans.factory.annotation.Autowired; | 13 | import org.springframework.beans.factory.annotation.Autowired; |
13 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
14 | -import org.springframework.web.bind.annotation.RequestParam; | ||
15 | -import org.springframework.web.bind.annotation.RestController; | 14 | +import org.springframework.web.bind.annotation.*; |
16 | 15 | ||
17 | import javax.annotation.Resource; | 16 | import javax.annotation.Resource; |
18 | import java.util.Date; | 17 | import java.util.Date; |
18 | +import java.util.List; | ||
19 | 19 | ||
20 | @Slf4j | 20 | @Slf4j |
21 | @RestController | 21 | @RestController |
@@ -51,5 +51,32 @@ public class PREPAREMASTERController { | @@ -51,5 +51,32 @@ public class PREPAREMASTERController { | ||
51 | return new ResultJson("200","OK",pageInfo); | 51 | return new ResultJson("200","OK",pageInfo); |
52 | } | 52 | } |
53 | 53 | ||
54 | + @PostMapping("batchDel") | ||
55 | + public ResultJson batchDel(@RequestBody BatchSend batchSend,@CookieValue("username") String username,@CookieValue("userid") String userid){ | ||
56 | + if (StringUtils.isEmpty(batchSend.businessAlterLog.getAlterReason())){ | ||
57 | + return new ResultJson("400","未提交删除申请原因"); | ||
58 | + } | ||
59 | + | ||
60 | + if (StringUtils.isEmpty(batchSend.businessAlterLog.getContantname())){ | ||
61 | + return new ResultJson("400","未提交删除申请联系人或电话"); | ||
62 | + } | ||
63 | + | ||
64 | + if (StringUtils.isEmpty(batchSend.businessAlterLog.getContenttel())){ | ||
65 | + return new ResultJson("400","未提交删除申请电话"); | ||
66 | + } | ||
67 | + | ||
68 | + if (batchSend.billListDes==null || batchSend.billListDes.isEmpty()){ | ||
69 | + return new ResultJson("400","未选择运单"); | ||
70 | + } | ||
71 | + | ||
72 | + boolean b = preparmasterService.batchDel(batchSend, username); | ||
73 | + if (b){ | ||
74 | + return new ResultJson("200","批量删除申请发送成功"); | ||
75 | + }else { | ||
76 | + return new ResultJson("400","批量删除申请发送失败"); | ||
77 | + } | ||
78 | + } | ||
79 | + | ||
54 | 80 | ||
55 | } | 81 | } |
82 | + |
1 | +package com.tianbo.analysis.controller; | ||
2 | + | ||
3 | +import org.springframework.stereotype.Controller; | ||
4 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
5 | + | ||
6 | +/** | ||
7 | + * Created by XYH on 2019/7/9. | ||
8 | + */ | ||
9 | +@Controller | ||
10 | +@RequestMapping("/transmission") | ||
11 | +public class TransmissionController { | ||
12 | + @RequestMapping("list") | ||
13 | + public String show(){return "transmission/transmission.html";} | ||
14 | +} |
1 | +package com.tianbo.analysis.controller; | ||
2 | + | ||
3 | +import com.tianbo.analysis.model.ORIGINMANIFESTMASTER; | ||
4 | +import com.tianbo.analysis.model.PREPAREMASTER; | ||
5 | +import com.tianbo.analysis.service.TransmissionService; | ||
6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
7 | +import org.springframework.stereotype.Controller; | ||
8 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
9 | +import org.springframework.web.bind.annotation.ResponseBody; | ||
10 | + | ||
11 | +import javax.servlet.http.HttpServletRequest; | ||
12 | +import java.util.HashMap; | ||
13 | +import java.util.List; | ||
14 | +import java.util.Map; | ||
15 | + | ||
16 | +/** | ||
17 | + * Created by XYH on 2019/7/9. | ||
18 | + */ | ||
19 | +@Controller | ||
20 | +@RequestMapping("/transmission") | ||
21 | +public class TransmissionJsonController { | ||
22 | + @Autowired | ||
23 | + TransmissionService service; | ||
24 | + @RequestMapping("search.json") | ||
25 | + @ResponseBody | ||
26 | + public Map<String,Object> selectList(HttpServletRequest request)throws Exception{ | ||
27 | + String startdate=request.getParameter("startdate"); | ||
28 | + String enddate=request.getParameter("enddate"); | ||
29 | + /*Gson gson=new Gson(); | ||
30 | + String successGson=null;*/ | ||
31 | + //ModelAndView modelAndView=new ModelAndView(); | ||
32 | + Map<String,Object> map=new HashMap<String,Object>(); | ||
33 | + if(startdate!=null&&enddate!=null){ | ||
34 | + List<ORIGINMANIFESTMASTER> originmanifestmasterList=service.selectOrig(startdate,enddate); | ||
35 | + List<PREPAREMASTER> preparemasterList=service.selectPre(startdate,enddate); | ||
36 | + /*System.out.print(originmanifestmasterList); | ||
37 | + modelAndView.addObject("origlist",originmanifestmasterList); | ||
38 | + modelAndView.addObject("prelist",preparemasterList); | ||
39 | + modelAndView.setViewName("transmission/transmission");*/ | ||
40 | + System.out.print(originmanifestmasterList); | ||
41 | + | ||
42 | + map.put("origlist",originmanifestmasterList); | ||
43 | + map.put("prelist",preparemasterList); | ||
44 | + //successGson=gson.toJson(map); | ||
45 | + } | ||
46 | + | ||
47 | + /*return modelAndView;*/ | ||
48 | + return map; | ||
49 | + } | ||
50 | +} |
1 | +package com.tianbo.analysis.dao; | ||
2 | + | ||
3 | +import com.tianbo.analysis.model.BusinessAlterLog; | ||
4 | + | ||
5 | +public interface BusinessAlterLogDao { | ||
6 | + int insert(BusinessAlterLog record); | ||
7 | + | ||
8 | + int update(BusinessAlterLog record); | ||
9 | + | ||
10 | + int insertSelective(BusinessAlterLog record); | ||
11 | + | ||
12 | + int updateSelective(BusinessAlterLog record); | ||
13 | + | ||
14 | + BusinessAlterLog selectByBillAutoidAndType(BusinessAlterLog record); | ||
15 | +} |
@@ -37,4 +37,6 @@ public interface ORIGINMANIFESTMASTERMapper { | @@ -37,4 +37,6 @@ public interface ORIGINMANIFESTMASTERMapper { | ||
37 | 37 | ||
38 | int updateByPrimaryKeySelective(ORIGINMANIFESTMASTER record); | 38 | int updateByPrimaryKeySelective(ORIGINMANIFESTMASTER record); |
39 | 39 | ||
40 | + List<ORIGINMANIFESTMASTER> selectOrig(String start,String end); | ||
41 | + | ||
40 | } | 42 | } |
@@ -27,6 +27,8 @@ public interface PREPAREMASTERMapper { | @@ -27,6 +27,8 @@ public interface PREPAREMASTERMapper { | ||
27 | 27 | ||
28 | int updateByPrimaryKey(PREPAREMASTER record); | 28 | int updateByPrimaryKey(PREPAREMASTER record); |
29 | 29 | ||
30 | + int updateDelStatusByPrimaryKey(List<PREPAREMASTER> record); | ||
31 | + | ||
30 | int updatePreArrivedBill(PREPAREMASTER record); | 32 | int updatePreArrivedBill(PREPAREMASTER record); |
31 | 33 | ||
32 | List<PREPAREMASTER> searchTree(@Param("waybillnomaster") String var1, | 34 | List<PREPAREMASTER> searchTree(@Param("waybillnomaster") String var1, |
@@ -36,4 +38,6 @@ public interface PREPAREMASTERMapper { | @@ -36,4 +38,6 @@ public interface PREPAREMASTERMapper { | ||
36 | ); | 38 | ); |
37 | 39 | ||
38 | List<PREPAREMASTER> searchSec(String autoid); | 40 | List<PREPAREMASTER> searchSec(String autoid); |
41 | + | ||
42 | + List<PREPAREMASTER> selectPre(String start,String end); | ||
39 | } | 43 | } |
@@ -13,6 +13,8 @@ public interface PREPARESECONDARYMapper { | @@ -13,6 +13,8 @@ public interface PREPARESECONDARYMapper { | ||
13 | 13 | ||
14 | PREPARESECONDARY selectByPrimaryKey(String autoid); | 14 | PREPARESECONDARY selectByPrimaryKey(String autoid); |
15 | 15 | ||
16 | + List<PREPARESECONDARY> selectByPrimaryKeys(List ids); | ||
17 | + | ||
16 | /** | 18 | /** |
17 | * 根据主单ID查分单 | 19 | * 根据主单ID查分单 |
18 | * @param masterid | 20 | * @param masterid |
@@ -22,5 +24,7 @@ public interface PREPARESECONDARYMapper { | @@ -22,5 +24,7 @@ public interface PREPARESECONDARYMapper { | ||
22 | 24 | ||
23 | int updateByPrimaryKeySelective(PREPARESECONDARY record); | 25 | int updateByPrimaryKeySelective(PREPARESECONDARY record); |
24 | 26 | ||
27 | + int updateDelStatusByPrimaryKey(List<PREPARESECONDARY> record); | ||
28 | + | ||
25 | int updateByPrimaryKey(PREPARESECONDARY record); | 29 | int updateByPrimaryKey(PREPARESECONDARY record); |
26 | } | 30 | } |
@@ -13,4 +13,6 @@ public interface SENDLOGMapper { | @@ -13,4 +13,6 @@ public interface SENDLOGMapper { | ||
13 | int insert(SENDLOG record); | 13 | int insert(SENDLOG record); |
14 | 14 | ||
15 | int insertSelective(SENDLOG record); | 15 | int insertSelective(SENDLOG record); |
16 | + | ||
17 | + int batchInsert(List<SENDLOG> record); | ||
16 | } | 18 | } |
1 | +package com.tianbo.analysis.model; | ||
2 | + | ||
3 | +import io.swagger.annotations.ApiModel; | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | +import java.io.Serializable; | ||
6 | +import java.util.Date; | ||
7 | + | ||
8 | +import lombok.Data; | ||
9 | + | ||
10 | +/** | ||
11 | + * BUSINESS_ALTER_LOG | ||
12 | + * @author | ||
13 | + */ | ||
14 | +@ApiModel(value="com.tianbo.analysis.model.BusinessAlterLog") | ||
15 | +@Data | ||
16 | +public class BusinessAlterLog implements Serializable { | ||
17 | + private static final long serialVersionUID = 1L; | ||
18 | + | ||
19 | + private String autoid; | ||
20 | + | ||
21 | + private Date createdate; | ||
22 | + | ||
23 | + //业务类型 | ||
24 | + private String businesstype; | ||
25 | + | ||
26 | + //原因 | ||
27 | + private String alterReason; | ||
28 | + | ||
29 | + //联系人姓名 | ||
30 | + private String contantname; | ||
31 | + | ||
32 | + //联系人电话 | ||
33 | + private String contenttel; | ||
34 | + | ||
35 | + //关联运单ID | ||
36 | + private String billAuotid; | ||
37 | + | ||
38 | +} |
@@ -3,7 +3,7 @@ package com.tianbo.analysis.model; | @@ -3,7 +3,7 @@ package com.tianbo.analysis.model; | ||
3 | import java.util.Date; | 3 | import java.util.Date; |
4 | import java.util.List; | 4 | import java.util.List; |
5 | 5 | ||
6 | -public class PREPAREMASTER { | 6 | +public class PREPAREMASTER extends ManifestBase{ |
7 | private String autoid; | 7 | private String autoid; |
8 | 8 | ||
9 | private String flightno; | 9 | private String flightno; |
@@ -84,8 +84,6 @@ public class PREPAREMASTER { | @@ -84,8 +84,6 @@ public class PREPAREMASTER { | ||
84 | 84 | ||
85 | private String arrivedAhead; | 85 | private String arrivedAhead; |
86 | 86 | ||
87 | - public String messagetype; | ||
88 | - | ||
89 | public List<PREPAREMASTER> chidren; | 87 | public List<PREPAREMASTER> chidren; |
90 | 88 | ||
91 | public String getAutoid() { | 89 | public String getAutoid() { |
@@ -402,4 +402,4 @@ public class PREPARESECONDARY { | @@ -402,4 +402,4 @@ public class PREPARESECONDARY { | ||
402 | public void setUnloadingstation(String unloadingstation) { | 402 | public void setUnloadingstation(String unloadingstation) { |
403 | this.unloadingstation = unloadingstation == null ? null : unloadingstation.trim(); | 403 | this.unloadingstation = unloadingstation == null ? null : unloadingstation.trim(); |
404 | } | 404 | } |
405 | -} | ||
405 | +} |
1 | +package com.tianbo.analysis.service; | ||
2 | + | ||
3 | +import com.tianbo.analysis.model.BusinessAlterLog; | ||
4 | + | ||
5 | +public interface BusinessAlterLogService { | ||
6 | + /** | ||
7 | + * 插入一条新的业务变更日志记录。 | ||
8 | + * @param record 要插入的记录 | ||
9 | + * @return 插入操作影响的行数 | ||
10 | + */ | ||
11 | + int insert(BusinessAlterLog record); | ||
12 | + | ||
13 | + /** | ||
14 | + * 更新一条业务变更日志记录。 | ||
15 | + * @param record 包含更新信息的记录 | ||
16 | + * @return 更新操作影响的行数 | ||
17 | + */ | ||
18 | + int update(BusinessAlterLog record); | ||
19 | + | ||
20 | + /** | ||
21 | + * 选择性地插入一条新的业务变更日志记录。 | ||
22 | + * @param record 要插入的记录 | ||
23 | + * @return 插入操作影响的行数 | ||
24 | + */ | ||
25 | + int insertSelective(BusinessAlterLog record); | ||
26 | + | ||
27 | + /** | ||
28 | + * 选择性地更新一条业务变更日志记录。 | ||
29 | + * @param record 包含更新信息的记录 | ||
30 | + * @return 更新操作影响的行数 | ||
31 | + */ | ||
32 | + int updateSelective(BusinessAlterLog record); | ||
33 | + | ||
34 | + /** | ||
35 | + * 根据账单自动ID和业务类型查询业务变更日志。 | ||
36 | + * @param record 查询条件 | ||
37 | + * @return 符合条件的业务变更日志 | ||
38 | + */ | ||
39 | + BusinessAlterLog selectByBillAutoidAndType(BusinessAlterLog record); | ||
40 | +} |
1 | package com.tianbo.analysis.service; | 1 | package com.tianbo.analysis.service; |
2 | 2 | ||
3 | import com.github.pagehelper.PageInfo; | 3 | import com.github.pagehelper.PageInfo; |
4 | +import com.tianbo.analysis.model.BatchSend; | ||
4 | import com.tianbo.analysis.model.PREPAREMASTER; | 5 | import com.tianbo.analysis.model.PREPAREMASTER; |
6 | +import org.springframework.web.bind.annotation.CookieValue; | ||
5 | 7 | ||
6 | public interface PREPARMASTERService { | 8 | public interface PREPARMASTERService { |
7 | PageInfo<PREPAREMASTER> search(PREPAREMASTER preparemaster,int pageNum, int pageSize); | 9 | PageInfo<PREPAREMASTER> search(PREPAREMASTER preparemaster,int pageNum, int pageSize); |
@@ -20,4 +22,6 @@ public interface PREPARMASTERService { | @@ -20,4 +22,6 @@ public interface PREPARMASTERService { | ||
20 | String flightNo, | 22 | String flightNo, |
21 | int page, | 23 | int page, |
22 | int limit); | 24 | int limit); |
25 | + | ||
26 | + boolean batchDel(BatchSend batchSend,String username); | ||
23 | } | 27 | } |
1 | +package com.tianbo.analysis.service; | ||
2 | + | ||
3 | +import com.tianbo.analysis.model.ORIGINMANIFESTMASTER; | ||
4 | +import com.tianbo.analysis.model.PREPAREMASTER; | ||
5 | + | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | +/** | ||
9 | + * Created by XYH on 2019/7/9. | ||
10 | + */ | ||
11 | +public interface TransmissionService { | ||
12 | + List<ORIGINMANIFESTMASTER> selectOrig(String start,String end)throws Exception; | ||
13 | + List<PREPAREMASTER> selectPre(String start,String end)throws Exception; | ||
14 | +} |
1 | +package com.tianbo.analysis.service.imp; | ||
2 | + | ||
3 | +import com.tianbo.analysis.dao.BusinessAlterLogDao; | ||
4 | +import com.tianbo.analysis.model.BusinessAlterLog; | ||
5 | +import com.tianbo.analysis.service.BusinessAlterLogService; | ||
6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
7 | +import org.springframework.stereotype.Service; | ||
8 | + | ||
9 | +@Service | ||
10 | +public class BusinessAlterLogServiceImpl implements BusinessAlterLogService { | ||
11 | + | ||
12 | + @Autowired | ||
13 | + private BusinessAlterLogDao businessAlterLogDao; | ||
14 | + | ||
15 | + @Override | ||
16 | + public int insert(BusinessAlterLog record) { | ||
17 | + int i = 0; | ||
18 | + BusinessAlterLog businessAlterLog = selectByBillAutoidAndType(record); | ||
19 | + if (businessAlterLog!=null) { | ||
20 | + record.setAutoid(businessAlterLog.getAutoid()); | ||
21 | + i = businessAlterLogDao.updateSelective(record); | ||
22 | + }else { | ||
23 | + i = businessAlterLogDao.insert(record); | ||
24 | + } | ||
25 | + return i; | ||
26 | + } | ||
27 | + | ||
28 | + @Override | ||
29 | + public int update(BusinessAlterLog record) { | ||
30 | + return businessAlterLogDao.update(record); | ||
31 | + } | ||
32 | + | ||
33 | + @Override | ||
34 | + public int insertSelective(BusinessAlterLog record) { | ||
35 | + return businessAlterLogDao.insertSelective(record); | ||
36 | + } | ||
37 | + | ||
38 | + @Override | ||
39 | + public int updateSelective(BusinessAlterLog record) { | ||
40 | + return businessAlterLogDao.updateSelective(record); | ||
41 | + } | ||
42 | + | ||
43 | + @Override | ||
44 | + public BusinessAlterLog selectByBillAutoidAndType(BusinessAlterLog record) { | ||
45 | + return businessAlterLogDao.selectByBillAutoidAndType(record); | ||
46 | + } | ||
47 | +} |
@@ -7,6 +7,7 @@ import com.tianbo.analysis.dao.MANIFEST_AIR_CHANGEMapper; | @@ -7,6 +7,7 @@ import com.tianbo.analysis.dao.MANIFEST_AIR_CHANGEMapper; | ||
7 | import com.tianbo.analysis.dao.SENDLOGMapper; | 7 | import com.tianbo.analysis.dao.SENDLOGMapper; |
8 | import com.tianbo.analysis.model.*; | 8 | import com.tianbo.analysis.model.*; |
9 | import com.tianbo.analysis.service.MT8204Service; | 9 | import com.tianbo.analysis.service.MT8204Service; |
10 | +import com.tianbo.analysis.tools.XSDValidateWithXML; | ||
10 | import com.tianbo.util.Date.DateUtil; | 11 | import com.tianbo.util.Date.DateUtil; |
11 | import lombok.extern.slf4j.Slf4j; | 12 | import lombok.extern.slf4j.Slf4j; |
12 | import org.apache.commons.io.FileUtils; | 13 | import org.apache.commons.io.FileUtils; |
@@ -161,9 +162,9 @@ public class MT8204ServiceImp implements MT8204Service { | @@ -161,9 +162,9 @@ public class MT8204ServiceImp implements MT8204Service { | ||
161 | /** | 162 | /** |
162 | * 中文的地方在模板中要用utext,否则中文会被 escape 转义 | 163 | * 中文的地方在模板中要用utext,否则中文会被 escape 转义 |
163 | */ | 164 | */ |
164 | - String xmlStr = templateEngine.process("mt8204/MT8204",context); | 165 | + String xmlStr = templateEngine.process("mt8204/MT8204.xml",context); |
165 | 166 | ||
166 | - boolean valied = validateXMLSchema("xsd/Manifest_Change_Transport_Air_8204_2.xsd",xmlStr); | 167 | + boolean valied = XSDValidateWithXML.validateXMLSchema("xsd/Manifest_Change_Transport_Air_8204_2.xsd",xmlStr); |
167 | if (valied){ | 168 | if (valied){ |
168 | FileUtils.writeStringToFile(file,xmlStr, StandardCharsets.UTF_8); | 169 | FileUtils.writeStringToFile(file,xmlStr, StandardCharsets.UTF_8); |
169 | SENDLOG sendlog = new SENDLOG(); | 170 | SENDLOG sendlog = new SENDLOG(); |
@@ -212,23 +213,5 @@ public class MT8204ServiceImp implements MT8204Service { | @@ -212,23 +213,5 @@ public class MT8204ServiceImp implements MT8204Service { | ||
212 | 213 | ||
213 | } | 214 | } |
214 | 215 | ||
215 | - public boolean validateXMLSchema(String xsdPath, String xmlStr) throws IOException { | ||
216 | - ByteArrayInputStream bais = new ByteArrayInputStream(xmlStr.getBytes("UTF-8")); | ||
217 | - try { | ||
218 | - SchemaFactory factory = | ||
219 | - SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); | ||
220 | - Schema schema = factory.newSchema(new File(xsdPath)); | ||
221 | - Validator validator = schema.newValidator(); | ||
222 | - | ||
223 | - Source source = new StreamSource(bais); | ||
224 | - validator.validate(source); | ||
225 | - } catch (IOException | SAXException e) { | ||
226 | - e.printStackTrace(); | ||
227 | - log.error("Exception:{}",e.getMessage()); | ||
228 | - return false; | ||
229 | - }finally { | ||
230 | - bais.close(); | ||
231 | - } | ||
232 | - return true; | ||
233 | - } | 216 | + |
234 | } | 217 | } |
@@ -4,21 +4,53 @@ import com.github.pagehelper.Page; | @@ -4,21 +4,53 @@ import com.github.pagehelper.Page; | ||
4 | import com.github.pagehelper.PageHelper; | 4 | import com.github.pagehelper.PageHelper; |
5 | import com.github.pagehelper.PageInfo; | 5 | import com.github.pagehelper.PageInfo; |
6 | import com.tianbo.analysis.dao.PREPAREMASTERMapper; | 6 | import com.tianbo.analysis.dao.PREPAREMASTERMapper; |
7 | -import com.tianbo.analysis.model.MANIFEST_AIR_CHANGE; | ||
8 | -import com.tianbo.analysis.model.PREPAREMASTER; | 7 | +import com.tianbo.analysis.dao.PREPARESECONDARYMapper; |
8 | +import com.tianbo.analysis.dao.SENDLOGMapper; | ||
9 | +import com.tianbo.analysis.model.*; | ||
9 | import com.tianbo.analysis.service.PREPARMASTERService; | 10 | import com.tianbo.analysis.service.PREPARMASTERService; |
11 | +import com.tianbo.analysis.tools.XSDValidateWithXML; | ||
12 | +import com.tianbo.util.Date.DateUtil; | ||
13 | +import lombok.extern.slf4j.Slf4j; | ||
14 | +import org.apache.commons.io.FileUtils; | ||
15 | +import org.springframework.beans.factory.annotation.Autowired; | ||
16 | +import org.springframework.beans.factory.annotation.Value; | ||
10 | import org.springframework.stereotype.Service; | 17 | import org.springframework.stereotype.Service; |
18 | +import org.springframework.util.ResourceUtils; | ||
11 | import org.springframework.util.StringUtils; | 19 | import org.springframework.util.StringUtils; |
20 | +import org.thymeleaf.TemplateEngine; | ||
21 | +import org.thymeleaf.context.Context; | ||
12 | 22 | ||
13 | import javax.annotation.Resource; | 23 | import javax.annotation.Resource; |
14 | -import java.util.List; | 24 | +import java.io.File; |
25 | +import java.io.FileNotFoundException; | ||
26 | +import java.io.IOException; | ||
27 | +import java.math.BigDecimal; | ||
28 | +import java.nio.charset.StandardCharsets; | ||
29 | +import java.util.*; | ||
15 | 30 | ||
16 | @Service | 31 | @Service |
32 | +@Slf4j | ||
17 | public class PREPARMASTERServiceImpl implements PREPARMASTERService { | 33 | public class PREPARMASTERServiceImpl implements PREPARMASTERService { |
18 | 34 | ||
19 | @Resource | 35 | @Resource |
20 | PREPAREMASTERMapper preparemasterMapper; | 36 | PREPAREMASTERMapper preparemasterMapper; |
21 | 37 | ||
38 | + @Resource | ||
39 | + PREPARESECONDARYMapper preparesecondaryMapper; | ||
40 | + | ||
41 | + @Resource | ||
42 | + SENDLOGMapper sendlogMapper; | ||
43 | + | ||
44 | + @Autowired | ||
45 | + private TemplateEngine templateEngine; | ||
46 | + | ||
47 | + @Value("${customs.xml-path}") | ||
48 | + private String saveXmlDir; | ||
49 | + | ||
50 | + | ||
51 | + @Value("${customs.transport-number}") | ||
52 | + private String transportNo; | ||
53 | + | ||
22 | @Override | 54 | @Override |
23 | public PageInfo<PREPAREMASTER> search(PREPAREMASTER preparemaster,int pageNum, int pageSize) { | 55 | public PageInfo<PREPAREMASTER> search(PREPAREMASTER preparemaster,int pageNum, int pageSize) { |
24 | Page<PREPAREMASTER> page = PageHelper.startPage(pageNum,pageSize); | 56 | Page<PREPAREMASTER> page = PageHelper.startPage(pageNum,pageSize); |
@@ -36,4 +68,151 @@ public class PREPARMASTERServiceImpl implements PREPARMASTERService { | @@ -36,4 +68,151 @@ public class PREPARMASTERServiceImpl implements PREPARMASTERService { | ||
36 | PageInfo<PREPAREMASTER> result = new PageInfo<PREPAREMASTER>(list); | 68 | PageInfo<PREPAREMASTER> result = new PageInfo<PREPAREMASTER>(list); |
37 | return result; | 69 | return result; |
38 | } | 70 | } |
71 | + | ||
72 | + @Override | ||
73 | + public boolean batchDel(BatchSend batchSend, String username) { | ||
74 | + CustomsHead customsHead = new CustomsHead(); | ||
75 | + String nowStr = DateUtil.getCurrentTime17(); | ||
76 | + String messageID = "CN_" | ||
77 | + + "MT2201" | ||
78 | + + "_1P0_" | ||
79 | + + transportNo+ | ||
80 | + "_" + nowStr; | ||
81 | + | ||
82 | + customsHead.setMessageId(messageID); | ||
83 | + customsHead.setSendTime(nowStr); | ||
84 | + | ||
85 | + //航班信息存储 | ||
86 | + HashMap<String, String> flightMap = new HashMap<>(); | ||
87 | + ArrayList<Map> bills = new ArrayList<>(); | ||
88 | + | ||
89 | + | ||
90 | + /** | ||
91 | + * noList: master;fc68f797-58f9-4276-850d-f772ab54e041;Y87489;2018/7/16 0:00:00;871-52149624;NO;4620 | ||
92 | + * noList: sub;e430bacf-d34d-49c4-a646-c6bab53245d9;Y87489;2018/7/16 0:00:00;871-52149624;5758599033;4620 | ||
93 | + * noList: sub;4ff7853f-0315-4632-ad0f-6a028054513d;Y87489;2018/7/16 0:00:00;871-52149624;5758599022;4620 | ||
94 | + * noList: sub;52dc1407-d686-42ac-87cd-ddacdb84ca18;Y87489;2018/7/16 0:00:00;871-52149624;5758599044;4620 | ||
95 | + * noList: sub;26bf643c-cf5b-4af2-8394-51585c02d88d;Y87489;2018/7/16 0:00:00;871-52149624;5758599077;4620 | ||
96 | + */ | ||
97 | + if (batchSend.billListDes!=null && !batchSend.billListDes.isEmpty() && batchSend.businessAlterLog!=null){ | ||
98 | + for (String item : batchSend.billListDes) { | ||
99 | + HashMap<String, String> billsMap = new HashMap<>(); | ||
100 | + String[] split = item.split(";"); | ||
101 | + //单证类别:master为主单,sub为分单 | ||
102 | + String billType = split[0]; | ||
103 | + String billAutoId = split[1]; | ||
104 | + //航班号 | ||
105 | + String flightNo = split[2]; | ||
106 | + //航班日期 | ||
107 | + String flightDateString = split[3]; | ||
108 | + // 主单号 | ||
109 | + String billMasterNo = split[4].replace("-",""); | ||
110 | + // 分单号 | ||
111 | + String billSecNo = split[5]; | ||
112 | + // 申报关区 | ||
113 | + String customCode = split[6]; | ||
114 | + | ||
115 | + flightMap.put("flightNo",flightNo); | ||
116 | + flightMap.put("flightDate",flightDateString); | ||
117 | + //设置关区 | ||
118 | + customsHead.setReceiverID(customCode); | ||
119 | + | ||
120 | + billsMap.put("billAutoId",billAutoId); | ||
121 | + billsMap.put("billMasterNo",billMasterNo); | ||
122 | + billsMap.put("billSecNo",billMasterNo +"_" +billSecNo); | ||
123 | + billsMap.put("billType",billType); | ||
124 | + bills.add(billsMap); | ||
125 | + } | ||
126 | + } | ||
127 | + | ||
128 | + Context context = new Context(); | ||
129 | + context.setVariable("bills",bills); | ||
130 | + context.setVariable("head",customsHead); | ||
131 | + context.setVariable("flight",flightMap); | ||
132 | + context.setVariable("reason",batchSend.businessAlterLog); | ||
133 | + context.setLocale(Locale.SIMPLIFIED_CHINESE); | ||
134 | + | ||
135 | + //生成的文件名 | ||
136 | + String fileName = messageID + ".xml"; | ||
137 | + //生成的报文路径,带斜杠 | ||
138 | + String filePath = saveXmlDir+fileName; | ||
139 | + try { | ||
140 | + File file = ResourceUtils.getFile(filePath); | ||
141 | + /** | ||
142 | + * 中文的地方在模板中要用utext,否则中文会被 escape 转义 | ||
143 | + */ | ||
144 | + String xmlStr = templateEngine.process("mt2201/MT2201_D.xml",context); | ||
145 | + System.out.println("xmlStr = " + xmlStr); | ||
146 | + boolean valied = XSDValidateWithXML.validateXMLSchema("xsd/Manifest_Declare_Export_Air_Delete_2201_3.xsd",xmlStr); | ||
147 | + | ||
148 | + if (valied){ | ||
149 | + // 生成报文 | ||
150 | + FileUtils.writeStringToFile(file,xmlStr, StandardCharsets.UTF_8); | ||
151 | + log.info("[PRE-BATCH-SEND]-SUCCESS,批量删除发送成功"); | ||
152 | + | ||
153 | + // 更新运单状态,含主单表和分单表 | ||
154 | + Boolean b = updateBatchStatus(batchSend, bills, username); | ||
155 | + return b; | ||
156 | + }else { | ||
157 | + return false; | ||
158 | + } | ||
159 | + } catch (Exception e) { | ||
160 | + log.error("[PRE-BATCH-DEL]-批量删除发生异常,{}",e.getMessage()); | ||
161 | + return false; | ||
162 | + } | ||
163 | + } | ||
164 | + | ||
165 | + private Boolean updateBatchStatus(BatchSend batchSend,ArrayList<Map> bills,String username) { | ||
166 | + //存储更新主单状态的列表 | ||
167 | + ArrayList<PREPAREMASTER> preMasters = new ArrayList<>(); | ||
168 | + ArrayList<PREPARESECONDARY> preSubs = new ArrayList<>(); | ||
169 | + List<SENDLOG> sendlogList = new ArrayList<>(); | ||
170 | + | ||
171 | + for (Map<String,String> item : bills) { | ||
172 | + // 批量插入发送日志 | ||
173 | + SENDLOG sendlog = new SENDLOG(); | ||
174 | + sendlog.setAutoid(UUID.randomUUID().toString()); | ||
175 | + sendlog.setMessageautoid(item.get("billAutoId")); | ||
176 | + sendlog.setMessagetype(batchSend.businessAlterLog.getBusinesstype()); | ||
177 | + sendlog.setCreatedate(new Date()); | ||
178 | + sendlog.setReceiption("新舱单系统发送预配舱单批量删除报"); | ||
179 | + sendlog.setOpauthor(username); | ||
180 | + sendlog.setSendpeice(new Long(0)); | ||
181 | + sendlog.setSendweight(new BigDecimal(0)); | ||
182 | + sendlogList.add(sendlog); | ||
183 | + | ||
184 | + if ("master".equals(item.get("billType"))){ | ||
185 | + PREPAREMASTER preparemaster = new PREPAREMASTER(); | ||
186 | + preparemaster.setAutoid(item.get("billAutoId")); | ||
187 | + preMasters.add(preparemaster); | ||
188 | + }else { | ||
189 | + PREPARESECONDARY preparesecondary = new PREPARESECONDARY(); | ||
190 | + preparesecondary.setAutoid(item.get("billAutoId")); | ||
191 | + preSubs.add(preparesecondary); | ||
192 | + } | ||
193 | + } | ||
194 | + int i = sendlogMapper.batchInsert(sendlogList); | ||
195 | + if (i>0){ | ||
196 | + log.info("[PRE-BATCH-DEL-LOG-INSERT]-SUCCESS"); | ||
197 | + }else { | ||
198 | + log.error("[PRE-BATCH-DEL-LOG-INSERT]-FAILD"); | ||
199 | + return false; | ||
200 | + } | ||
201 | + | ||
202 | + /** | ||
203 | + * 以下两个批量更新语句无法返回具体影响行数,返回为-1 | ||
204 | + * 要么得配置在mybatis-config.xml,如下 | ||
205 | + * <configuration> | ||
206 | + * <settings> | ||
207 | + * <setting name="defaultExecutorType" value="SIMPLE"/> | ||
208 | + * <setting name="defaultExecutorType" value="BATCH"/> | ||
209 | + * </settings> | ||
210 | + * </configuration> | ||
211 | + */ | ||
212 | + | ||
213 | + int i1 = preparemasterMapper.updateDelStatusByPrimaryKey(preMasters); | ||
214 | + int i2 = preparesecondaryMapper.updateDelStatusByPrimaryKey(preSubs); | ||
215 | + | ||
216 | + return true; | ||
217 | + } | ||
39 | } | 218 | } |
1 | +package com.tianbo.analysis.service.imp; | ||
2 | + | ||
3 | +import com.tianbo.analysis.dao.ORIGINMANIFESTMASTERMapper; | ||
4 | +import com.tianbo.analysis.dao.PREPAREMASTERMapper; | ||
5 | +import com.tianbo.analysis.model.ORIGINMANIFESTMASTER; | ||
6 | +import com.tianbo.analysis.model.PREPAREMASTER; | ||
7 | +import com.tianbo.analysis.service.TransmissionService; | ||
8 | +import org.springframework.beans.factory.annotation.Autowired; | ||
9 | +import org.springframework.stereotype.Service; | ||
10 | + | ||
11 | +import java.util.List; | ||
12 | + | ||
13 | +/** | ||
14 | + * Created by XYH on 2019/7/9. | ||
15 | + */ | ||
16 | +@Service | ||
17 | +public class TransmissionImpl implements TransmissionService{ | ||
18 | + @Autowired | ||
19 | + ORIGINMANIFESTMASTERMapper originmanifestmasterMapper; | ||
20 | + @Autowired | ||
21 | + PREPAREMASTERMapper preparemasterMapper; | ||
22 | + @Override | ||
23 | + public List<ORIGINMANIFESTMASTER> selectOrig(String start, String end) throws Exception { | ||
24 | + return originmanifestmasterMapper.selectOrig(start,end); | ||
25 | + } | ||
26 | + | ||
27 | + @Override | ||
28 | + public List<PREPAREMASTER> selectPre(String start, String end) throws Exception { | ||
29 | + return preparemasterMapper.selectPre(start,end); | ||
30 | + } | ||
31 | +} |
1 | +package com.tianbo.analysis.tools; | ||
2 | + | ||
3 | +import lombok.extern.slf4j.Slf4j; | ||
4 | +import org.xml.sax.SAXException; | ||
5 | + | ||
6 | +import javax.xml.XMLConstants; | ||
7 | +import javax.xml.transform.Source; | ||
8 | +import javax.xml.transform.stream.StreamSource; | ||
9 | +import javax.xml.validation.Schema; | ||
10 | +import javax.xml.validation.SchemaFactory; | ||
11 | +import javax.xml.validation.Validator; | ||
12 | +import java.io.ByteArrayInputStream; | ||
13 | +import java.io.File; | ||
14 | +import java.io.IOException; | ||
15 | + | ||
16 | +@Slf4j | ||
17 | +public class XSDValidateWithXML { | ||
18 | + public static boolean validateXMLSchema(String xsdPath, String xmlStr) throws IOException { | ||
19 | + ByteArrayInputStream bais = new ByteArrayInputStream(xmlStr.getBytes("UTF-8")); | ||
20 | + try { | ||
21 | + SchemaFactory factory = | ||
22 | + SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); | ||
23 | + Schema schema = factory.newSchema(new File(xsdPath)); | ||
24 | + Validator validator = schema.newValidator(); | ||
25 | + | ||
26 | + Source source = new StreamSource(bais); | ||
27 | + validator.validate(source); | ||
28 | + } catch (IOException | SAXException e) { | ||
29 | + e.printStackTrace(); | ||
30 | + log.error("Exception:{}",e.getMessage()); | ||
31 | + return false; | ||
32 | + }finally { | ||
33 | + bais.close(); | ||
34 | + } | ||
35 | + return true; | ||
36 | + } | ||
37 | +} |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
3 | +<mapper namespace="com.tianbo.analysis.dao.BusinessAlterLogDao"> | ||
4 | + <resultMap id="BaseResultMap" type="com.tianbo.analysis.model.BusinessAlterLog"> | ||
5 | + <result column="AUTOID" jdbcType="VARCHAR" property="autoid" /> | ||
6 | + <result column="CREATEDATE" jdbcType="TIMESTAMP" property="createdate" /> | ||
7 | + <result column="BUSINESSTYPE" jdbcType="VARCHAR" property="businesstype" /> | ||
8 | + <result column="ALTER_REASON" jdbcType="VARCHAR" property="alterReason" /> | ||
9 | + <result column="CONTANTNAME" jdbcType="VARCHAR" property="contantname" /> | ||
10 | + <result column="CONTENTTEL" jdbcType="VARCHAR" property="contenttel" /> | ||
11 | + <result column="BILL_AUOTID" jdbcType="VARCHAR" property="billAuotid" /> | ||
12 | + </resultMap> | ||
13 | + <sql id="Base_Column_List"> | ||
14 | + AUTOID, CREATEDATE, BUSINESSTYPE, ALTER_REASON, CONTANTNAME, CONTENTTEL, BILL_AUOTID | ||
15 | + </sql> | ||
16 | + <insert id="insert" parameterType="com.tianbo.analysis.model.BusinessAlterLog"> | ||
17 | + insert into BUSINESS_ALTER_LOG (AUTOID, CREATEDATE, BUSINESSTYPE, | ||
18 | + ALTER_REASON, CONTANTNAME, CONTENTTEL, | ||
19 | + BILL_AUOTID) | ||
20 | + values (#{autoid,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP}, #{businesstype,jdbcType=VARCHAR}, | ||
21 | + #{alterReason,jdbcType=VARCHAR}, #{contantname,jdbcType=VARCHAR}, #{contenttel,jdbcType=VARCHAR}, | ||
22 | + #{billAuotid,jdbcType=VARCHAR}) | ||
23 | + </insert> | ||
24 | + <insert id="insertSelective" parameterType="com.tianbo.analysis.model.BusinessAlterLog"> | ||
25 | + insert into BUSINESS_ALTER_LOG | ||
26 | + <trim prefix="(" suffix=")" suffixOverrides=","> | ||
27 | + <if test="autoid != null"> | ||
28 | + AUTOID, | ||
29 | + </if> | ||
30 | + <if test="createdate != null"> | ||
31 | + CREATEDATE, | ||
32 | + </if> | ||
33 | + <if test="businesstype != null"> | ||
34 | + BUSINESSTYPE, | ||
35 | + </if> | ||
36 | + <if test="alterReason != null"> | ||
37 | + ALTER_REASON, | ||
38 | + </if> | ||
39 | + <if test="contantname != null"> | ||
40 | + CONTANTNAME, | ||
41 | + </if> | ||
42 | + <if test="contenttel != null"> | ||
43 | + CONTENTTEL, | ||
44 | + </if> | ||
45 | + <if test="billAuotid != null"> | ||
46 | + BILL_AUOTID, | ||
47 | + </if> | ||
48 | + </trim> | ||
49 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | ||
50 | + <if test="autoid != null"> | ||
51 | + #{autoid,jdbcType=VARCHAR}, | ||
52 | + </if> | ||
53 | + <if test="createdate != null"> | ||
54 | + #{createdate,jdbcType=TIMESTAMP}, | ||
55 | + </if> | ||
56 | + <if test="businesstype != null"> | ||
57 | + #{businesstype,jdbcType=VARCHAR}, | ||
58 | + </if> | ||
59 | + <if test="alterReason != null"> | ||
60 | + #{alterReason,jdbcType=VARCHAR}, | ||
61 | + </if> | ||
62 | + <if test="contantname != null"> | ||
63 | + #{contantname,jdbcType=VARCHAR}, | ||
64 | + </if> | ||
65 | + <if test="contenttel != null"> | ||
66 | + #{contenttel,jdbcType=VARCHAR}, | ||
67 | + </if> | ||
68 | + <if test="billAuotid != null"> | ||
69 | + #{billAuotid,jdbcType=VARCHAR}, | ||
70 | + </if> | ||
71 | + </trim> | ||
72 | + </insert> | ||
73 | + <update id="update" parameterType="com.tianbo.analysis.model.BusinessAlterLog"> | ||
74 | + update BUSINESS_ALTER_LOG | ||
75 | + set CREATEDATE = #{createdate,jdbcType=TIMESTAMP}, | ||
76 | + BUSINESSTYPE = #{businesstype,jdbcType=VARCHAR}, | ||
77 | + ALTER_REASON = #{alterReason,jdbcType=VARCHAR}, | ||
78 | + CONTANTNAME = #{contantname,jdbcType=VARCHAR}, | ||
79 | + CONTENTTEL = #{contenttel,jdbcType=VARCHAR}, | ||
80 | + BILL_AUOTID = #{billAuotid,jdbcType=VARCHAR} | ||
81 | + where AUTOID = #{autoid,jdbcType=VARCHAR} | ||
82 | + </update> | ||
83 | + | ||
84 | + <update id="updateSelective" parameterType="com.tianbo.analysis.model.BusinessAlterLog"> | ||
85 | + update BUSINESS_ALTER_LOG | ||
86 | + <set> | ||
87 | + <if test="createdate != null">CREATEDATE = #{createdate,jdbcType=TIMESTAMP},</if> | ||
88 | + <if test="businesstype != null">BUSINESSTYPE = #{businesstype,jdbcType=VARCHAR},</if> | ||
89 | + <if test="alterReason != null">ALTER_REASON = #{alterReason,jdbcType=VARCHAR},</if> | ||
90 | + <if test="contantname != null">CONTANTNAME = #{contantname,jdbcType=VARCHAR},</if> | ||
91 | + <if test="contenttel != null">CONTENTTEL = #{contenttel,jdbcType=VARCHAR},</if> | ||
92 | + <if test="billAuotid != null">BILL_AUOTID = #{billAuotid,jdbcType=VARCHAR},</if> | ||
93 | + </set> | ||
94 | + where AUTOID = #{autoid,jdbcType=VARCHAR} | ||
95 | + </update> | ||
96 | + <select id="selectByBillAutoidAndType" parameterType="com.tianbo.analysis.model.BusinessAlterLog" resultMap="BaseResultMap"> | ||
97 | + select | ||
98 | + <include refid="Base_Column_List" /> | ||
99 | + from BUSINESS_ALTER_LOG | ||
100 | + where BILL_AUOTID = #{billAuotid,jdbcType=VARCHAR} | ||
101 | + and BUSINESSTYPE = #{businesstype,jdbcType=VARCHAR} | ||
102 | + | ||
103 | + </select> | ||
104 | +</mapper> |
@@ -56,7 +56,7 @@ | @@ -56,7 +56,7 @@ | ||
56 | <include refid="Base_Column_List" /> | 56 | <include refid="Base_Column_List" /> |
57 | from | 57 | from |
58 | MANIFEST_AIR_CHANGE | 58 | MANIFEST_AIR_CHANGE |
59 | - where 1=1 | 59 | + <where> |
60 | <if test="flightno != null and flightno != ''"> | 60 | <if test="flightno != null and flightno != ''"> |
61 | and FLIGHTNO = #{flightno,jdbcType=VARCHAR} | 61 | and FLIGHTNO = #{flightno,jdbcType=VARCHAR} |
62 | </if> | 62 | </if> |
@@ -66,6 +66,7 @@ | @@ -66,6 +66,7 @@ | ||
66 | <if test="waybillnomaster != null and waybillnomaster != ''"> | 66 | <if test="waybillnomaster != null and waybillnomaster != ''"> |
67 | AND WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR} | 67 | AND WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR} |
68 | </if> | 68 | </if> |
69 | + </where> | ||
69 | ) t1 | 70 | ) t1 |
70 | LEFT JOIN ( | 71 | LEFT JOIN ( |
71 | SELECT | 72 | SELECT |
@@ -81,8 +82,7 @@ | @@ -81,8 +82,7 @@ | ||
81 | ) t2 ON t1.AUTOID = t2.MESSAGEAUTOID | 82 | ) t2 ON t1.AUTOID = t2.MESSAGEAUTOID |
82 | AND t2.rn = 1 | 83 | AND t2.rn = 1 |
83 | ) t3 | 84 | ) t3 |
84 | - where 1=1 | ||
85 | - order by CREATEDATE desc | 85 | + order by FLIGHT_DATE desc |
86 | </select> | 86 | </select> |
87 | 87 | ||
88 | <select id="selectListByAutoIDS" resultMap="BaseResultMap" parameterType="java.util.List" > | 88 | <select id="selectListByAutoIDS" resultMap="BaseResultMap" parameterType="java.util.List" > |
@@ -47,6 +47,9 @@ | @@ -47,6 +47,9 @@ | ||
47 | <result column="SPECIFIC_CONSIGNEE_PHONE" property="specificConsigneePhone" jdbcType="VARCHAR"/> | 47 | <result column="SPECIFIC_CONSIGNEE_PHONE" property="specificConsigneePhone" jdbcType="VARCHAR"/> |
48 | <result column="CONSIGNEE_PHONE" property="consigneePhone" jdbcType="VARCHAR"/> | 48 | <result column="CONSIGNEE_PHONE" property="consigneePhone" jdbcType="VARCHAR"/> |
49 | <result column="messagetype" property="messagetype" jdbcType="VARCHAR"/> | 49 | <result column="messagetype" property="messagetype" jdbcType="VARCHAR"/> |
50 | + <result column="NUM" property="num" jdbcType="VARCHAR"/> | ||
51 | + <result column="FLIGHT" property="flight" jdbcType="VARCHAR"/> | ||
52 | + | ||
50 | </resultMap> | 53 | </resultMap> |
51 | <sql id="Base_Column_List"> | 54 | <sql id="Base_Column_List"> |
52 | AUTOID, WAYBILLNOMASTER, FLIGHTNO, FLIGHT_DATE | 55 | AUTOID, WAYBILLNOMASTER, FLIGHTNO, FLIGHT_DATE |
@@ -676,4 +679,10 @@ GROUP BY | @@ -676,4 +679,10 @@ GROUP BY | ||
676 | where AUTOID = #{autoid,jdbcType=VARCHAR} | 679 | where AUTOID = #{autoid,jdbcType=VARCHAR} |
677 | </update> | 680 | </update> |
678 | 681 | ||
682 | + <select id="selectOrig" resultMap="BaseResultMap" > | ||
683 | + select flight,count(*) as num from (select o.*,substr(flightno,1,2) as flight from ORIGINMANIFESTMASTER o where destinationstation='CGO') | ||
684 | + where flight_date BETWEEN to_date(#{param1},'yyyy/MM/dd') | ||
685 | + and to_date(#{param2},'yyyy/MM/dd') group by flight | ||
686 | + </select> | ||
687 | + | ||
679 | </mapper> | 688 | </mapper> |
@@ -41,6 +41,8 @@ | @@ -41,6 +41,8 @@ | ||
41 | <result column="CONSIGNEE_AEO" property="consigneeAeo" jdbcType="VARCHAR" /> | 41 | <result column="CONSIGNEE_AEO" property="consigneeAeo" jdbcType="VARCHAR" /> |
42 | <result column="UNLOADINGSTATION" property="unloadingstation" jdbcType="VARCHAR" /> | 42 | <result column="UNLOADINGSTATION" property="unloadingstation" jdbcType="VARCHAR" /> |
43 | <result column="ARRIVED_AHEAD" property="arrivedAhead" jdbcType="VARCHAR" /> | 43 | <result column="ARRIVED_AHEAD" property="arrivedAhead" jdbcType="VARCHAR" /> |
44 | + <result column="FLIGHT" property="flight" jdbcType="VARCHAR"/> | ||
45 | + <result column="NUM" property="num" jdbcType="VARCHAR"/> | ||
44 | </resultMap> | 46 | </resultMap> |
45 | <sql id="Base_Column_List" > | 47 | <sql id="Base_Column_List" > |
46 | AUTOID, FLIGHTNO, FLIGHTDATE, ORIGINATINGSTATION, DESTINATIONSTATION, WAYBILLNOMASTER, | 48 | AUTOID, FLIGHTNO, FLIGHTDATE, ORIGINATINGSTATION, DESTINATIONSTATION, WAYBILLNOMASTER, |
@@ -569,11 +571,21 @@ | @@ -569,11 +571,21 @@ | ||
569 | 571 | ||
570 | <update id="updatePreArrivedBill" parameterType="com.tianbo.analysis.model.PREPAREMASTER"> | 572 | <update id="updatePreArrivedBill" parameterType="com.tianbo.analysis.model.PREPAREMASTER"> |
571 | update CGONMS.PREPAREMASTER | 573 | update CGONMS.PREPAREMASTER |
572 | - set | ||
573 | - ARRIVED_AHEAD = #{arrivedAhead,jdbcType=VARCHAR} | 574 | + set |
575 | + ARRIVED_AHEAD = #{arrivedAhead,jdbcType=VARCHAR} | ||
574 | where WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR} | 576 | where WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR} |
575 | </update> | 577 | </update> |
576 | 578 | ||
579 | + <update id="updateDelStatusByPrimaryKey" parameterType="java.util.List"> | ||
580 | + BEGIN | ||
581 | + <foreach collection="list" item="item" index="index" separator=";"> | ||
582 | + UPDATE CGONMS.PREPAREMASTER | ||
583 | + SET STATUS = '08' | ||
584 | + WHERE AUTOID = #{item.autoid,jdbcType=VARCHAR} | ||
585 | + </foreach> | ||
586 | + ;END; | ||
587 | + </update> | ||
588 | + | ||
577 | <select id="searchTree" resultMap="TreeMap"> | 589 | <select id="searchTree" resultMap="TreeMap"> |
578 | select * from( | 590 | select * from( |
579 | SELECT | 591 | SELECT |
@@ -734,4 +746,11 @@ select * from( | @@ -734,4 +746,11 @@ select * from( | ||
734 | from tallysecondary | 746 | from tallysecondary |
735 | where tallymasterID= #{autoid} | 747 | where tallymasterID= #{autoid} |
736 | </select> | 748 | </select> |
749 | + | ||
750 | + <select id="selectPre" resultMap="BaseResultMap" > | ||
751 | + select carrier as FLIGHT,count(*) as NUM from PREPAREMASTER where ORIGINATINGSTATION='CGO' | ||
752 | + AND FLIGHTDATE between to_date(#{param1},'yyyy/MM/dd') | ||
753 | + and to_date(#{param2},'yyyy/MM/dd') | ||
754 | + group by carrier | ||
755 | + </select> | ||
737 | </mapper> | 756 | </mapper> |
@@ -59,6 +59,13 @@ | @@ -59,6 +59,13 @@ | ||
59 | where AUTOID = #{autoid,jdbcType=VARCHAR} | 59 | where AUTOID = #{autoid,jdbcType=VARCHAR} |
60 | </select> | 60 | </select> |
61 | 61 | ||
62 | + <select id="selectByPrimaryKeys" resultMap="BaseResultMap" parameterType="java.lang.String" > | ||
63 | + select | ||
64 | + <include refid="Base_Column_List" /> | ||
65 | + from CGONMS.PREPARESECONDARY | ||
66 | + where AUTOID in (#{autoid,jdbcType=VARCHAR}) | ||
67 | + </select> | ||
68 | + | ||
62 | <select id="selectByMasterKey" resultMap="BaseResultMap" parameterType="java.lang.String" > | 69 | <select id="selectByMasterKey" resultMap="BaseResultMap" parameterType="java.lang.String" > |
63 | select | 70 | select |
64 | <include refid="Base_Column_List" /> | 71 | <include refid="Base_Column_List" /> |
@@ -469,6 +476,17 @@ | @@ -469,6 +476,17 @@ | ||
469 | </set> | 476 | </set> |
470 | where AUTOID = #{autoid,jdbcType=VARCHAR} | 477 | where AUTOID = #{autoid,jdbcType=VARCHAR} |
471 | </update> | 478 | </update> |
479 | + | ||
480 | + <update id="updateDelStatusByPrimaryKey" parameterType="java.util.List" > | ||
481 | + BEGIN | ||
482 | + <foreach collection="list" item="item" index="index" separator=";"> | ||
483 | + UPDATE CGONMS.PREPARESECONDARY | ||
484 | + SET STATUS = '08' | ||
485 | + WHERE AUTOID = #{item.autoid,jdbcType=VARCHAR} | ||
486 | + </foreach> | ||
487 | + ;END; | ||
488 | + </update> | ||
489 | + | ||
472 | <update id="updateByPrimaryKey" parameterType="com.tianbo.analysis.model.PREPARESECONDARY" > | 490 | <update id="updateByPrimaryKey" parameterType="com.tianbo.analysis.model.PREPARESECONDARY" > |
473 | update CGONMS.PREPARESECONDARY | 491 | update CGONMS.PREPARESECONDARY |
474 | set WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}, | 492 | set WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}, |
@@ -106,4 +106,23 @@ WHERE | @@ -106,4 +106,23 @@ WHERE | ||
106 | </if> | 106 | </if> |
107 | </trim> | 107 | </trim> |
108 | </insert> | 108 | </insert> |
109 | + | ||
110 | + <insert id="batchInsert" parameterType="java.util.List"> | ||
111 | + insert into CGONMS.SENDLOG | ||
112 | + (AUTOID, CREATEDATE, OPAUTHOR, SENDPEICE, SENDWEIGHT, RECEIPTION, MESSAGETYPE, MESSAGEAUTOID) | ||
113 | + <foreach collection="list" item="item" separator="union all" open="(" close=")"> | ||
114 | + select | ||
115 | + <trim suffixOverrides=","> | ||
116 | + #{item.autoid,jdbcType=VARCHAR}, | ||
117 | + #{item.createdate,jdbcType=TIMESTAMP}, | ||
118 | + #{item.opauthor,jdbcType=VARCHAR}, | ||
119 | + #{item.sendpeice,jdbcType=DECIMAL}, | ||
120 | + #{item.sendweight,jdbcType=DECIMAL}, | ||
121 | + #{item.receiption,jdbcType=VARCHAR}, | ||
122 | + #{item.messagetype,jdbcType=VARCHAR}, | ||
123 | + #{item.messageautoid,jdbcType=VARCHAR} | ||
124 | + </trim> | ||
125 | + from dual | ||
126 | + </foreach> | ||
127 | + </insert> | ||
109 | </mapper> | 128 | </mapper> |
src/main/resources/static/css/bootstrap.css
0 → 100644
此 diff 太大无法显示。
1 | +# Auto detect text files and perform LF normalization | ||
2 | +* text=auto | ||
3 | + | ||
4 | +# Custom for Visual Studio | ||
5 | +*.cs diff=csharp | ||
6 | +*.sln merge=union | ||
7 | +*.csproj merge=union | ||
8 | +*.vbproj merge=union | ||
9 | +*.fsproj merge=union | ||
10 | +*.dbproj merge=union | ||
11 | + | ||
12 | +# Standard to msysgit | ||
13 | +*.doc diff=astextplain | ||
14 | +*.DOC diff=astextplain | ||
15 | +*.docx diff=astextplain | ||
16 | +*.DOCX diff=astextplain | ||
17 | +*.dot diff=astextplain | ||
18 | +*.DOT diff=astextplain | ||
19 | +*.pdf diff=astextplain | ||
20 | +*.PDF diff=astextplain | ||
21 | +*.rtf diff=astextplain | ||
22 | +*.RTF diff=astextplain |
1 | +{ | ||
2 | + "bitwise": false, | ||
3 | + "camelcase": false, | ||
4 | + "curly": false, | ||
5 | + "eqeqeq": true, | ||
6 | + "es3": false, | ||
7 | + "forin": false, | ||
8 | + "freeze": false, | ||
9 | + "immed": false, | ||
10 | + "sub": true, | ||
11 | + "latedef": false, | ||
12 | + "newcap": false, | ||
13 | + "noarg": false, | ||
14 | + "node": true, | ||
15 | + "laxbreak": true, | ||
16 | + "noempty": true, | ||
17 | + "varstmt": false, | ||
18 | + "nonbsp": true, | ||
19 | + "nonew": false, | ||
20 | + "plusplus": false, | ||
21 | + "quotmark": "single", | ||
22 | + "undef": true, | ||
23 | + "unused": true, | ||
24 | + "esversion": 6, | ||
25 | + "strict": false, | ||
26 | + "trailing": true, | ||
27 | + "browser": false, | ||
28 | + "asi": true, | ||
29 | + "predef": ["window","document","jQuery","define"] | ||
30 | +} |
1 | +module.exports = (grunt) => { | ||
2 | + | ||
3 | + require('load-grunt-tasks')(grunt) | ||
4 | + | ||
5 | + grunt.initConfig({ | ||
6 | + pkg: grunt.file.readJSON('package.json'), | ||
7 | + jshint: { | ||
8 | + options: { | ||
9 | + jshintrc: '.jshintrc' | ||
10 | + }, | ||
11 | + all: { | ||
12 | + src: ['./js/bootstrap-datetimepicker.js'] | ||
13 | + } | ||
14 | + }, | ||
15 | + versioncheck: { | ||
16 | + target: { | ||
17 | + options: { | ||
18 | + hideUpToDate: true | ||
19 | + } | ||
20 | + } | ||
21 | + } | ||
22 | + }) | ||
23 | + | ||
24 | + grunt.registerTask('default', ['jshint', 'versioncheck']) | ||
25 | +} |
1 | + Apache License | ||
2 | + Version 2.0, January 2004 | ||
3 | + http://www.apache.org/licenses/ | ||
4 | + | ||
5 | + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | ||
6 | + | ||
7 | + 1. Definitions. | ||
8 | + | ||
9 | + "License" shall mean the terms and conditions for use, reproduction, | ||
10 | + and distribution as defined by Sections 1 through 9 of this document. | ||
11 | + | ||
12 | + "Licensor" shall mean the copyright owner or entity authorized by | ||
13 | + the copyright owner that is granting the License. | ||
14 | + | ||
15 | + "Legal Entity" shall mean the union of the acting entity and all | ||
16 | + other entities that control, are controlled by, or are under common | ||
17 | + control with that entity. For the purposes of this definition, | ||
18 | + "control" means (i) the power, direct or indirect, to cause the | ||
19 | + direction or management of such entity, whether by contract or | ||
20 | + otherwise, or (ii) ownership of fifty percent (50%) or more of the | ||
21 | + outstanding shares, or (iii) beneficial ownership of such entity. | ||
22 | + | ||
23 | + "You" (or "Your") shall mean an individual or Legal Entity | ||
24 | + exercising permissions granted by this License. | ||
25 | + | ||
26 | + "Source" form shall mean the preferred form for making modifications, | ||
27 | + including but not limited to software source code, documentation | ||
28 | + source, and configuration files. | ||
29 | + | ||
30 | + "Object" form shall mean any form resulting from mechanical | ||
31 | + transformation or translation of a Source form, including but | ||
32 | + not limited to compiled object code, generated documentation, | ||
33 | + and conversions to other media types. | ||
34 | + | ||
35 | + "Work" shall mean the work of authorship, whether in Source or | ||
36 | + Object form, made available under the License, as indicated by a | ||
37 | + copyright notice that is included in or attached to the work | ||
38 | + (an example is provided in the Appendix below). | ||
39 | + | ||
40 | + "Derivative Works" shall mean any work, whether in Source or Object | ||
41 | + form, that is based on (or derived from) the Work and for which the | ||
42 | + editorial revisions, annotations, elaborations, or other modifications | ||
43 | + represent, as a whole, an original work of authorship. For the purposes | ||
44 | + of this License, Derivative Works shall not include works that remain | ||
45 | + separable from, or merely link (or bind by name) to the interfaces of, | ||
46 | + the Work and Derivative Works thereof. | ||
47 | + | ||
48 | + "Contribution" shall mean any work of authorship, including | ||
49 | + the original version of the Work and any modifications or additions | ||
50 | + to that Work or Derivative Works thereof, that is intentionally | ||
51 | + submitted to Licensor for inclusion in the Work by the copyright owner | ||
52 | + or by an individual or Legal Entity authorized to submit on behalf of | ||
53 | + the copyright owner. For the purposes of this definition, "submitted" | ||
54 | + means any form of electronic, verbal, or written communication sent | ||
55 | + to the Licensor or its representatives, including but not limited to | ||
56 | + communication on electronic mailing lists, source code control systems, | ||
57 | + and issue tracking systems that are managed by, or on behalf of, the | ||
58 | + Licensor for the purpose of discussing and improving the Work, but | ||
59 | + excluding communication that is conspicuously marked or otherwise | ||
60 | + designated in writing by the copyright owner as "Not a Contribution." | ||
61 | + | ||
62 | + "Contributor" shall mean Licensor and any individual or Legal Entity | ||
63 | + on behalf of whom a Contribution has been received by Licensor and | ||
64 | + subsequently incorporated within the Work. | ||
65 | + | ||
66 | + 2. Grant of Copyright License. Subject to the terms and conditions of | ||
67 | + this License, each Contributor hereby grants to You a perpetual, | ||
68 | + worldwide, non-exclusive, no-charge, royalty-free, irrevocable | ||
69 | + copyright license to reproduce, prepare Derivative Works of, | ||
70 | + publicly display, publicly perform, sublicense, and distribute the | ||
71 | + Work and such Derivative Works in Source or Object form. | ||
72 | + | ||
73 | + 3. Grant of Patent License. Subject to the terms and conditions of | ||
74 | + this License, each Contributor hereby grants to You a perpetual, | ||
75 | + worldwide, non-exclusive, no-charge, royalty-free, irrevocable | ||
76 | + (except as stated in this section) patent license to make, have made, | ||
77 | + use, offer to sell, sell, import, and otherwise transfer the Work, | ||
78 | + where such license applies only to those patent claims licensable | ||
79 | + by such Contributor that are necessarily infringed by their | ||
80 | + Contribution(s) alone or by combination of their Contribution(s) | ||
81 | + with the Work to which such Contribution(s) was submitted. If You | ||
82 | + institute patent litigation against any entity (including a | ||
83 | + cross-claim or counterclaim in a lawsuit) alleging that the Work | ||
84 | + or a Contribution incorporated within the Work constitutes direct | ||
85 | + or contributory patent infringement, then any patent licenses | ||
86 | + granted to You under this License for that Work shall terminate | ||
87 | + as of the date such litigation is filed. | ||
88 | + | ||
89 | + 4. Redistribution. You may reproduce and distribute copies of the | ||
90 | + Work or Derivative Works thereof in any medium, with or without | ||
91 | + modifications, and in Source or Object form, provided that You | ||
92 | + meet the following conditions: | ||
93 | + | ||
94 | + (a) You must give any other recipients of the Work or | ||
95 | + Derivative Works a copy of this License; and | ||
96 | + | ||
97 | + (b) You must cause any modified files to carry prominent notices | ||
98 | + stating that You changed the files; and | ||
99 | + | ||
100 | + (c) You must retain, in the Source form of any Derivative Works | ||
101 | + that You distribute, all copyright, patent, trademark, and | ||
102 | + attribution notices from the Source form of the Work, | ||
103 | + excluding those notices that do not pertain to any part of | ||
104 | + the Derivative Works; and | ||
105 | + | ||
106 | + (d) If the Work includes a "NOTICE" text file as part of its | ||
107 | + distribution, then any Derivative Works that You distribute must | ||
108 | + include a readable copy of the attribution notices contained | ||
109 | + within such NOTICE file, excluding those notices that do not | ||
110 | + pertain to any part of the Derivative Works, in at least one | ||
111 | + of the following places: within a NOTICE text file distributed | ||
112 | + as part of the Derivative Works; within the Source form or | ||
113 | + documentation, if provided along with the Derivative Works; or, | ||
114 | + within a display generated by the Derivative Works, if and | ||
115 | + wherever such third-party notices normally appear. The contents | ||
116 | + of the NOTICE file are for informational purposes only and | ||
117 | + do not modify the License. You may add Your own attribution | ||
118 | + notices within Derivative Works that You distribute, alongside | ||
119 | + or as an addendum to the NOTICE text from the Work, provided | ||
120 | + that such additional attribution notices cannot be construed | ||
121 | + as modifying the License. | ||
122 | + | ||
123 | + You may add Your own copyright statement to Your modifications and | ||
124 | + may provide additional or different license terms and conditions | ||
125 | + for use, reproduction, or distribution of Your modifications, or | ||
126 | + for any such Derivative Works as a whole, provided Your use, | ||
127 | + reproduction, and distribution of the Work otherwise complies with | ||
128 | + the conditions stated in this License. | ||
129 | + | ||
130 | + 5. Submission of Contributions. Unless You explicitly state otherwise, | ||
131 | + any Contribution intentionally submitted for inclusion in the Work | ||
132 | + by You to the Licensor shall be under the terms and conditions of | ||
133 | + this License, without any additional terms or conditions. | ||
134 | + Notwithstanding the above, nothing herein shall supersede or modify | ||
135 | + the terms of any separate license agreement you may have executed | ||
136 | + with Licensor regarding such Contributions. | ||
137 | + | ||
138 | + 6. Trademarks. This License does not grant permission to use the trade | ||
139 | + names, trademarks, service marks, or product names of the Licensor, | ||
140 | + except as required for reasonable and customary use in describing the | ||
141 | + origin of the Work and reproducing the content of the NOTICE file. | ||
142 | + | ||
143 | + 7. Disclaimer of Warranty. Unless required by applicable law or | ||
144 | + agreed to in writing, Licensor provides the Work (and each | ||
145 | + Contributor provides its Contributions) on an "AS IS" BASIS, | ||
146 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | ||
147 | + implied, including, without limitation, any warranties or conditions | ||
148 | + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A | ||
149 | + PARTICULAR PURPOSE. You are solely responsible for determining the | ||
150 | + appropriateness of using or redistributing the Work and assume any | ||
151 | + risks associated with Your exercise of permissions under this License. | ||
152 | + | ||
153 | + 8. Limitation of Liability. In no event and under no legal theory, | ||
154 | + whether in tort (including negligence), contract, or otherwise, | ||
155 | + unless required by applicable law (such as deliberate and grossly | ||
156 | + negligent acts) or agreed to in writing, shall any Contributor be | ||
157 | + liable to You for damages, including any direct, indirect, special, | ||
158 | + incidental, or consequential damages of any character arising as a | ||
159 | + result of this License or out of the use or inability to use the | ||
160 | + Work (including but not limited to damages for loss of goodwill, | ||
161 | + work stoppage, computer failure or malfunction, or any and all | ||
162 | + other commercial damages or losses), even if such Contributor | ||
163 | + has been advised of the possibility of such damages. | ||
164 | + | ||
165 | + 9. Accepting Warranty or Additional Liability. While redistributing | ||
166 | + the Work or Derivative Works thereof, You may choose to offer, | ||
167 | + and charge a fee for, acceptance of support, warranty, indemnity, | ||
168 | + or other liability obligations and/or rights consistent with this | ||
169 | + License. However, in accepting such obligations, You may act only | ||
170 | + on Your own behalf and on Your sole responsibility, not on behalf | ||
171 | + of any other Contributor, and only if You agree to indemnify, | ||
172 | + defend, and hold each Contributor harmless for any liability | ||
173 | + incurred by, or claims asserted against, such Contributor by reason | ||
174 | + of your accepting any such warranty or additional liability. | ||
175 | + | ||
176 | + END OF TERMS AND CONDITIONS | ||
177 | + | ||
178 | + APPENDIX: How to apply the Apache License to your work. | ||
179 | + | ||
180 | + To apply the Apache License to your work, attach the following | ||
181 | + boilerplate notice, with the fields enclosed by brackets "[]" | ||
182 | + replaced with your own identifying information. (Don't include | ||
183 | + the brackets!) The text should be enclosed in the appropriate | ||
184 | + comment syntax for the file format. We also recommend that a | ||
185 | + file or class name and description of purpose be included on the | ||
186 | + same "printed page" as the copyright notice for easier | ||
187 | + identification within third-party archives. | ||
188 | + | ||
189 | + Copyright 2012 Sebastien MALOT | ||
190 | + | ||
191 | + Licensed under the Apache License, Version 2.0 (the "License"); | ||
192 | + you may not use this file except in compliance with the License. | ||
193 | + You may obtain a copy of the License at | ||
194 | + | ||
195 | + http://www.apache.org/licenses/LICENSE-2.0 | ||
196 | + | ||
197 | + Unless required by applicable law or agreed to in writing, software | ||
198 | + distributed under the License is distributed on an "AS IS" BASIS, | ||
199 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
200 | + See the License for the specific language governing permissions and | ||
201 | + limitations under the License. |
1 | +# Deprecation warning! | ||
2 | +We are going to move this project to [this repository](https://github.com/AuspeXeu/bootstrap-datetimepicker). Please do not file new issues or pull requests! | ||
3 | + | ||
4 | +# Project : bootstrap-datetimepicker | ||
5 | +====================================== | ||
6 | + | ||
7 | +[](https://travis-ci.org/smalot/bootstrap-datetimepicker) | ||
8 | + | ||
9 | +[Homepage](http://www.malot.fr/bootstrap-datetimepicker/) | ||
10 | + | ||
11 | +[Demo page](http://www.malot.fr/bootstrap-datetimepicker/demo.php) | ||
12 | + | ||
13 | +# Project forked | ||
14 | + | ||
15 | +This project is a fork of [bootstrap-datepicker project](https://github.com/eternicode/bootstrap-datepicker). | ||
16 | + | ||
17 | + | ||
18 | +# Home | ||
19 | + | ||
20 | +As 'bootstrap-datepicker' is restricted to the date scope (day, month, year), this project aims to support too the time picking (hour, minutes). | ||
21 | + | ||
22 | + | ||
23 | +# Screenshots | ||
24 | + | ||
25 | +## Decade year view | ||
26 | + | ||
27 | + | ||
28 | + | ||
29 | +This view allows to select the day in the selected month. | ||
30 | + | ||
31 | +## Year view | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | +This view allows to select the month in the selected year. | ||
36 | + | ||
37 | +## Month view | ||
38 | + | ||
39 | + | ||
40 | + | ||
41 | +This view allows to select the year in a range of 10 years. | ||
42 | + | ||
43 | +## Day view | ||
44 | + | ||
45 | + | ||
46 | + | ||
47 | +This view allows to select the hour in the selected day. | ||
48 | + | ||
49 | +## Hour view | ||
50 | + | ||
51 | + | ||
52 | + | ||
53 | +This view allows to select the preset of minutes in the selected hour. | ||
54 | +The range of 5 minutes (by default) has been selected to restrict buttons quantity to an acceptable value, but it can be overrided by the <code>minuteStep</code> property. | ||
55 | + | ||
56 | +## Day view - meridian | ||
57 | + | ||
58 | + | ||
59 | + | ||
60 | +Meridian is supported in both the day and hour views. | ||
61 | +To use it, just enable the <code>showMeridian</code> property. | ||
62 | + | ||
63 | +## Hour view - meridian | ||
64 | + | ||
65 | + | ||
66 | + | ||
67 | +# Example | ||
68 | + | ||
69 | +Attached to a field with the format specified via options: | ||
70 | + | ||
71 | +```html | ||
72 | +<input type="text" value="2012-05-15 21:05" id="datetimepicker"> | ||
73 | +``` | ||
74 | +```javascript | ||
75 | +$('#datetimepicker').datetimepicker({ | ||
76 | + format: 'yyyy-mm-dd hh:ii' | ||
77 | +}); | ||
78 | +``` | ||
79 | + | ||
80 | +Attached to a field with the format specified via markup: | ||
81 | + | ||
82 | +```html | ||
83 | +<input type="text" value="2012-05-15 21:05" id="datetimepicker" data-date-format="yyyy-mm-dd hh:ii"> | ||
84 | +``` | ||
85 | +```javascript | ||
86 | +$('#datetimepicker').datetimepicker(); | ||
87 | +``` | ||
88 | + | ||
89 | +As component: | ||
90 | + | ||
91 | +```html | ||
92 | +<div class="input-append date" id="datetimepicker" data-date="12-02-2012" data-date-format="dd-mm-yyyy"> | ||
93 | + <input size="16" type="text" value="12-02-2012" readonly> | ||
94 | + <span class="add-on"><i class="icon-th"></i></span> | ||
95 | +</div> | ||
96 | +``` | ||
97 | +```javascript | ||
98 | +$('#datetimepicker').datetimepicker(); | ||
99 | +``` | ||
100 | + | ||
101 | +As inline datetimepicker: | ||
102 | + | ||
103 | +```html | ||
104 | +<div id="datetimepicker"></div> | ||
105 | +``` | ||
106 | +```javascript | ||
107 | +$('#datetimepicker').datetimepicker(); | ||
108 | +``` | ||
109 | + | ||
110 | +# Using bootstrap-datetimepicker.js | ||
111 | + | ||
112 | +Call the datetimepicker via javascript: | ||
113 | + | ||
114 | +```javascript | ||
115 | +$('.datetimepicker').datetimepicker() | ||
116 | +``` | ||
117 | + | ||
118 | +## Dependencies | ||
119 | + | ||
120 | +Requires bootstrap's dropdown component (`dropdowns.less`) for some styles, and bootstrap's sprites (`sprites.less` and associated images) for arrows. | ||
121 | + | ||
122 | +A standalone .css file (including necessary dropdown styles and alternative, text-based arrows) can be generated by running `build/build_standalone.less` through the `lessc` compiler: | ||
123 | + | ||
124 | +```bash | ||
125 | +$ lessc build/build_standalone.less > datetimepicker.css | ||
126 | +``` | ||
127 | + | ||
128 | +## Options | ||
129 | + | ||
130 | +All options that take a "Date" can handle a `Date` object; a String formatted according to the given `format`; or a timedelta relative to today, eg '-1d', '+6m +1y', etc, where valid units are 'd' (day), 'w' (week), 'm' (month), and 'y' (year). | ||
131 | + | ||
132 | +You can also specify an ISO-8601 valid datetime, despite of the given `format` : | ||
133 | + * yyyy-mm-dd | ||
134 | + * yyyy-mm-dd hh:ii | ||
135 | + * yyyy-mm-ddThh:ii | ||
136 | + * yyyy-mm-dd hh:ii:ss | ||
137 | + * yyyy-mm-ddThh:ii:ssZ | ||
138 | + | ||
139 | +### format | ||
140 | + | ||
141 | +String. Default: 'mm/dd/yyyy' | ||
142 | + | ||
143 | +The date format, combination of p, P, h, hh, i, ii, s, ss, d, dd, m, mm, M, MM, yy, yyyy. | ||
144 | + | ||
145 | + * p : meridian in lower case ('am' or 'pm') - according to locale file | ||
146 | + * P : meridian in upper case ('AM' or 'PM') - according to locale file | ||
147 | + * s : seconds without leading zeros | ||
148 | + * ss : seconds, 2 digits with leading zeros | ||
149 | + * i : minutes without leading zeros | ||
150 | + * ii : minutes, 2 digits with leading zeros | ||
151 | + * h : hour without leading zeros - 24-hour format | ||
152 | + * hh : hour, 2 digits with leading zeros - 24-hour format | ||
153 | + * H : hour without leading zeros - 12-hour format | ||
154 | + * HH : hour, 2 digits with leading zeros - 12-hour format | ||
155 | + * d : day of the month without leading zeros | ||
156 | + * dd : day of the month, 2 digits with leading zeros | ||
157 | + * m : numeric representation of month without leading zeros | ||
158 | + * mm : numeric representation of the month, 2 digits with leading zeros | ||
159 | + * M : short textual representation of a month, three letters | ||
160 | + * MM : full textual representation of a month, such as January or March | ||
161 | + * yy : two digit representation of a year | ||
162 | + * yyyy : full numeric representation of a year, 4 digits | ||
163 | + * t : unix epoch timestamp | ||
164 | + * Z : abbreviated timezone name | ||
165 | + | ||
166 | +### weekStart | ||
167 | + | ||
168 | +Integer. Default: 0 | ||
169 | + | ||
170 | +Day of the week start. 0 (Sunday) to 6 (Saturday) | ||
171 | + | ||
172 | +### startDate | ||
173 | + | ||
174 | +Date. Default: Beginning of time | ||
175 | + | ||
176 | +The earliest date that may be selected; all earlier dates will be disabled. | ||
177 | + | ||
178 | +### endDate | ||
179 | + | ||
180 | +Date. Default: End of time | ||
181 | + | ||
182 | +The latest date that may be selected; all later dates will be disabled. | ||
183 | + | ||
184 | +### daysOfWeekDisabled | ||
185 | + | ||
186 | +String, Array. Default: '', [] | ||
187 | + | ||
188 | +Days of the week that should be disabled. Values are 0 (Sunday) to 6 (Saturday). Multiple values should be comma-separated. Example: disable weekends: `'0,6'` or `[0,6]`. | ||
189 | + | ||
190 | +### autoclose | ||
191 | + | ||
192 | +Boolean. Default: false | ||
193 | + | ||
194 | +Whether or not to close the datetimepicker immediately when a date is selected. | ||
195 | + | ||
196 | +### startView | ||
197 | + | ||
198 | +Number, String. Default: 2, 'month' | ||
199 | + | ||
200 | +The view that the datetimepicker should show when it is opened. | ||
201 | +Accepts values of : | ||
202 | + * 0 or 'hour' for the hour view | ||
203 | + * 1 or 'day' for the day view | ||
204 | + * 2 or 'month' for month view (the default) | ||
205 | + * 3 or 'year' for the 12-month overview | ||
206 | + * 4 or 'decade' for the 10-year overview. Useful for date-of-birth datetimepickers. | ||
207 | + | ||
208 | +### minView | ||
209 | + | ||
210 | +Number, String. Default: 0, 'hour' | ||
211 | + | ||
212 | +The lowest view that the datetimepicker should show. | ||
213 | + | ||
214 | +### maxView | ||
215 | + | ||
216 | +Number, String. Default: 4, 'decade' | ||
217 | + | ||
218 | +The highest view that the datetimepicker should show. | ||
219 | + | ||
220 | +### clearBtn | ||
221 | + | ||
222 | +Boolean. Default: false | ||
223 | + | ||
224 | +If true, displays a "Clear" button at the bottom of the datetimepicker to clear the current selection. Moreover, the datetimepicker will be closed if autoclose is set to true. | ||
225 | + | ||
226 | +### todayBtn | ||
227 | + | ||
228 | +Boolean, "linked". Default: false | ||
229 | + | ||
230 | +If true or "linked", displays a "Today" button at the bottom of the datetimepicker to select the current date. If true, the "Today" button will only move the current date into view; if "linked", the current date will also be selected. | ||
231 | + | ||
232 | +### todayHighlight | ||
233 | + | ||
234 | +Boolean. Default: false | ||
235 | + | ||
236 | +If true, highlights the current date. | ||
237 | + | ||
238 | +### keyboardNavigation | ||
239 | + | ||
240 | +Boolean. Default: true | ||
241 | + | ||
242 | +Whether or not to allow date navigation by arrow keys. | ||
243 | + | ||
244 | +### language | ||
245 | + | ||
246 | +String. Default: 'en' | ||
247 | + | ||
248 | +The two-letter code of the language to use for month and day names. These will also be used as the input's value (and subsequently sent to the server in the case of form submissions). Currently ships with English ('en'), German ('de'), Brazilian ('br'), and Spanish ('es') translations, but others can be added (see I18N below). If an unknown language code is given, English will be used. | ||
249 | + | ||
250 | +### forceParse | ||
251 | + | ||
252 | +Boolean. Default: true | ||
253 | + | ||
254 | +Whether or not to force parsing of the input value when the picker is closed. That is, when an invalid date is left in the input field by the user, the picker will forcibly parse that value, and set the input's value to the new, valid date, conforming to the given `format`. | ||
255 | + | ||
256 | +### bootcssVer | ||
257 | + | ||
258 | +Number. | ||
259 | + | ||
260 | +You can override the auto-detect functionality of the different bootstrap versions (e.g., 2 or 3) by using this option. | ||
261 | + | ||
262 | +### minuteStep | ||
263 | + | ||
264 | +Number. Default: 5 | ||
265 | + | ||
266 | +The increment used to build the hour view. A button is created for each <code>minuteStep</code> minutes. | ||
267 | + | ||
268 | +### pickerReferer : deprecated | ||
269 | + | ||
270 | +String. Default: 'default' | ||
271 | + | ||
272 | +The referer element to place the picker for the component implementation. If you want to place the picker just under the input field, just specify <code>input</code>. | ||
273 | + | ||
274 | +### pickerPosition | ||
275 | + | ||
276 | +String. Default: 'bottom-right' (supported values are: 'bottom-right', 'bottom-left', 'top-right', 'top-left') | ||
277 | + | ||
278 | +This option allows to place the picker just under the input field for the component implementation instead of the default position which is at the bottom right of the button. | ||
279 | + | ||
280 | +### viewSelect | ||
281 | + | ||
282 | +Number or String. Default: <code>same as minView</code> (supported values are: 'decade', 'year', 'month', 'day', 'hour') | ||
283 | + | ||
284 | +With this option you can select the view from which the date will be selected. By default it's the last one, however you can choose the first one, so at each click the date will be updated. | ||
285 | + | ||
286 | +### showMeridian | ||
287 | + | ||
288 | +Boolean. Default: false | ||
289 | + | ||
290 | +This option will enable meridian views for day and hour views. | ||
291 | + | ||
292 | +### initialDate | ||
293 | + | ||
294 | +Date or String. Default: new Date() | ||
295 | + | ||
296 | +You can initialize the viewer with a date. By default it's now, so you can specify yesterday or today at midnight ... | ||
297 | + | ||
298 | +### zIndex | ||
299 | + | ||
300 | +Number. Default: undefined | ||
301 | + | ||
302 | +zIndex value is being automatically calculated based on the DOM tree, where we seek the highest value. To skip this process you can set the value manually. | ||
303 | + | ||
304 | +### timezone | ||
305 | + | ||
306 | +String. Default: Clients current timezone abbreviated name | ||
307 | + | ||
308 | +You can allow the viewer to display the date along with the given timezone. Note that this has to be used in conjunction with the `Z` format option. Example below: | ||
309 | + | ||
310 | + | ||
311 | +```javascript | ||
312 | +$('#date-end').datetimepicker({ | ||
313 | + format: 'yyyy-mm-dd hh:ii P Z' | ||
314 | + timezone: 'GMT' | ||
315 | + }); | ||
316 | +``` | ||
317 | + | ||
318 | + | ||
319 | + | ||
320 | + | ||
321 | +### onRenderYear | ||
322 | + | ||
323 | +This event is fired when a year is rendered inside the datepicker. Should return an array of classes to add to this element. Return ['disabled'] to disable the day from being selected. | ||
324 | + | ||
325 | +```javascript | ||
326 | +$('#date') | ||
327 | + .datetimepicker({ | ||
328 | + onRenderYear: function(date) { | ||
329 | + //Disable picking dates from any year apart from 2015/2016 | ||
330 | + if (date.getFullYear() < 2015 || date.getFullYear() > 2016) | ||
331 | + return ['disabled'] | ||
332 | + } | ||
333 | + }); | ||
334 | +``` | ||
335 | + | ||
336 | +### onRenderMonth | ||
337 | + | ||
338 | +This event is fired when a month is rendered inside the datepicker. Should return an array of classes to add to this element. Return ['disabled'] to disable the day from being selected. | ||
339 | + | ||
340 | +```javascript | ||
341 | +$('#date') | ||
342 | + .datetimepicker({ | ||
343 | + onRenderMonth: function(date) { | ||
344 | + //Disable every other month in the year 2016 | ||
345 | + if (date.getUTCMonth() % 2 === 0 && date.getUTCFullYear() === 2016) | ||
346 | + return ['disabled'] | ||
347 | + } | ||
348 | + }); | ||
349 | +``` | ||
350 | + | ||
351 | +### onRenderDay | ||
352 | + | ||
353 | +This event is fired when a day is rendered inside the datepicker. Should return an array of classes to add to this element. Return ['disabled'] to disable the day from being selected. | ||
354 | + | ||
355 | +```javascript | ||
356 | +$('#date') | ||
357 | + .datetimepicker({ | ||
358 | + onRenderDay: function(date) { | ||
359 | + //Disable dates 18-24 of every month | ||
360 | + if (date.getDate() >= 18 && date.getDate() <= 24) | ||
361 | + return ['disabled']; | ||
362 | + } | ||
363 | + }); | ||
364 | +``` | ||
365 | + | ||
366 | +### onRenderHour | ||
367 | + | ||
368 | +This event is fired when a hour is rendered inside the datepicker. Should return an array of classes to add to this element. Return ['disabled'] to disable the day from being selected. | ||
369 | + | ||
370 | +```javascript | ||
371 | +$('#date') | ||
372 | + .datetimepicker({ | ||
373 | + onRenderHour: function(hour) { | ||
374 | + //Disable any time between 12:00 and 13:59 | ||
375 | + if (date.getUTCHours() === 12 || date.getUTCHours() === 13) | ||
376 | + return ['disabled']; | ||
377 | + } | ||
378 | + }); | ||
379 | +``` | ||
380 | + | ||
381 | +### onRenderMinute | ||
382 | + | ||
383 | +This event is fired when a minute is rendered inside the datepicker. Should return an array of classes to add to this element. Return ['disabled'] to disable the day from being selected. | ||
384 | + | ||
385 | +```javascript | ||
386 | +$('#date') | ||
387 | + .datetimepicker({ | ||
388 | + onRenderMinute: function(minute) { | ||
389 | + //Disable all times between 30 past and 20 to every hour for workdays | ||
390 | + if (date.getDay() !== 0 && date.getDay() !== 6 && date.getUTCMinutes() >= 30 && date.getUTCMinutes() <= 40) | ||
391 | + return ['disabled']; | ||
392 | + } | ||
393 | + }); | ||
394 | +``` | ||
395 | + | ||
396 | +### fontAwesome | ||
397 | + | ||
398 | +Boolean. Default: false | ||
399 | + | ||
400 | +If true, [Font Awesome](http://fontawesome.io/) will be used. | ||
401 | + | ||
402 | +## Markup | ||
403 | + | ||
404 | +Format as component. | ||
405 | + | ||
406 | +```html | ||
407 | +<div class="input-append date" id="datetimepicker" data-date="12-02-2012" data-date-format="dd-mm-yyyy"> | ||
408 | + <input class="span2" size="16" type="text" value="12-02-2012"> | ||
409 | + <span class="add-on"><i class="icon-th"></i></span> | ||
410 | +</div> | ||
411 | +``` | ||
412 | + | ||
413 | +Format as component with reset button to clear the input field. | ||
414 | + | ||
415 | +```html | ||
416 | +<div class="input-append date" id="datetimepicker" data-date="12-02-2012" data-date-format="dd-mm-yyyy"> | ||
417 | + <input class="span2" size="16" type="text" value="12-02-2012"> | ||
418 | + <span class="add-on"><i class="icon-remove"></i></span> | ||
419 | + <span class="add-on"><i class="icon-th"></i></span> | ||
420 | +</div> | ||
421 | +``` | ||
422 | + | ||
423 | +## Methods | ||
424 | + | ||
425 | +### .datetimepicker(options) | ||
426 | + | ||
427 | +Initializes an datetimepicker. | ||
428 | + | ||
429 | +### remove | ||
430 | + | ||
431 | +Arguments: None | ||
432 | + | ||
433 | +Remove the datetimepicker. Removes attached events, internal attached objects, and | ||
434 | +added HTML elements. | ||
435 | + | ||
436 | + $('#datetimepicker').datetimepicker('remove'); | ||
437 | + | ||
438 | +### show | ||
439 | + | ||
440 | +Arguments: None | ||
441 | + | ||
442 | +Show the datetimepicker. | ||
443 | + | ||
444 | +```javascript | ||
445 | +$('#datetimepicker').datetimepicker('show'); | ||
446 | +``` | ||
447 | + | ||
448 | +### hide | ||
449 | + | ||
450 | +Arguments: None | ||
451 | + | ||
452 | +Hide the datetimepicker. | ||
453 | + | ||
454 | +```javascript | ||
455 | +$('#datetimepicker').datetimepicker('hide'); | ||
456 | +``` | ||
457 | + | ||
458 | +### update | ||
459 | + | ||
460 | +Arguments: | ||
461 | + | ||
462 | +* currentDate (Date). | ||
463 | + | ||
464 | +Update the datetimepicker with the specified date. | ||
465 | + | ||
466 | +```javascript | ||
467 | +$('#datetimepicker').datetimepicker('update', new Date()); | ||
468 | +``` | ||
469 | + | ||
470 | +Omit currentDate to update the datetimepicker with the current input value. | ||
471 | + | ||
472 | +```javascript | ||
473 | +$('#datetimepicker').datetimepicker('update'); | ||
474 | +``` | ||
475 | + | ||
476 | +### setStartDate | ||
477 | + | ||
478 | +Arguments: | ||
479 | + | ||
480 | +* startDate (String) | ||
481 | + | ||
482 | +Sets a new lower date limit on the datetimepicker. | ||
483 | + | ||
484 | +```javascript | ||
485 | +$('#datetimepicker').datetimepicker('setStartDate', '2012-01-01'); | ||
486 | +``` | ||
487 | + | ||
488 | +Omit startDate (or provide an otherwise falsey value) to unset the limit. | ||
489 | + | ||
490 | +```javascript | ||
491 | +$('#datetimepicker').datetimepicker('setStartDate'); | ||
492 | +$('#datetimepicker').datetimepicker('setStartDate', null); | ||
493 | +``` | ||
494 | + | ||
495 | +### setEndDate | ||
496 | + | ||
497 | +Arguments: | ||
498 | + | ||
499 | +* endDate (String) | ||
500 | + | ||
501 | +Sets a new upper date limit on the datetimepicker. | ||
502 | + | ||
503 | +```javascript | ||
504 | +$('#datetimepicker').datetimepicker('setEndDate', '2012-12-31'); | ||
505 | +``` | ||
506 | + | ||
507 | +Omit endDate (or provide an otherwise falsey value) to unset the limit. | ||
508 | + | ||
509 | +```javascript | ||
510 | +$('#datetimepicker').datetimepicker('setEndDate'); | ||
511 | +$('#datetimepicker').datetimepicker('setEndDate', null); | ||
512 | +``` | ||
513 | + | ||
514 | +### setDaysOfWeekDisabled | ||
515 | + | ||
516 | +Arguments: | ||
517 | + | ||
518 | +* daysOfWeekDisabled (String|Array) | ||
519 | + | ||
520 | +Sets the days of week that should be disabled. | ||
521 | + | ||
522 | +```javascript | ||
523 | +$('#datetimepicker').datetimepicker('setDaysOfWeekDisabled', [0,6]); | ||
524 | +``` | ||
525 | + | ||
526 | +Omit daysOfWeekDisabled (or provide an otherwise falsey value) to unset the disabled days. | ||
527 | + | ||
528 | +```javascript | ||
529 | +$('#datetimepicker').datetimepicker('setDaysOfWeekDisabled'); | ||
530 | +$('#datetimepicker').datetimepicker('setDaysOfWeekDisabled', null); | ||
531 | +``` | ||
532 | + | ||
533 | +### setMinutesDisabled | ||
534 | + | ||
535 | +Arguments: | ||
536 | + | ||
537 | +* minutesDisabled (String|Array) | ||
538 | + | ||
539 | +Sets the minutes that should be disabled. | ||
540 | + | ||
541 | +```javascript | ||
542 | +$('#datetimepicker').datetimepicker('setMinutesDisabled', [25,59]); | ||
543 | +``` | ||
544 | + | ||
545 | +Omit minutesDisabled (or provide an otherwise falsey value) to unset the disabled minutes. | ||
546 | + | ||
547 | +```javascript | ||
548 | +$('#datetimepicker').datetimepicker('setMinutesDisabled'); | ||
549 | +$('#datetimepicker').datetimepicker('setMinutesDisabled', null); | ||
550 | +``` | ||
551 | + | ||
552 | +### setHoursDisabled | ||
553 | + | ||
554 | +Arguments: | ||
555 | + | ||
556 | +* hoursDisabled (String|Array) | ||
557 | + | ||
558 | +Sets the hours that should be disabled. | ||
559 | + | ||
560 | +```javascript | ||
561 | +$('#datetimepicker').datetimepicker('setHoursDisabled', [12,19]); | ||
562 | +``` | ||
563 | + | ||
564 | +Omit hoursDisabled (or provide an otherwise falsey value) to unset the disabled hours. | ||
565 | + | ||
566 | +```javascript | ||
567 | +$('#datetimepicker').datetimepicker('setHoursDisabled'); | ||
568 | +$('#datetimepicker').datetimepicker('setHoursDisabled', null); | ||
569 | +``` | ||
570 | + | ||
571 | +### setInitialDate | ||
572 | + | ||
573 | +Arguments: | ||
574 | + | ||
575 | +* setInitialDate (String) | ||
576 | + | ||
577 | +Sets a new inital date on the datetimepicker. | ||
578 | + | ||
579 | +```javascript | ||
580 | +$('#datetimepicker').datetimepicker('setInitialDate', '2012-12-31'); | ||
581 | +``` | ||
582 | + | ||
583 | +Get the inital date on the datetimepicker. | ||
584 | + | ||
585 | +```javascript | ||
586 | +$('#datetimepicker').datetimepicker('getInitialDate'); | ||
587 | +``` | ||
588 | + | ||
589 | +## Events | ||
590 | + | ||
591 | +Datetimepicker class exposes a few events for manipulating the dates. | ||
592 | + | ||
593 | +### show | ||
594 | + | ||
595 | +Fired when the date picker is displayed. | ||
596 | + | ||
597 | +### hide | ||
598 | + | ||
599 | +Fired when the date picker is hidden. | ||
600 | + | ||
601 | +### changeDate | ||
602 | + | ||
603 | +Fired when the date is changed. | ||
604 | + | ||
605 | +```javascript | ||
606 | +$('#date-end') | ||
607 | + .datetimepicker() | ||
608 | + .on('changeDate', function(ev){ | ||
609 | + if (ev.date.valueOf() < date-start-display.valueOf()){ | ||
610 | + .... | ||
611 | + } | ||
612 | + }); | ||
613 | +``` | ||
614 | + | ||
615 | +### changeYear | ||
616 | + | ||
617 | +Fired when the *view* year is changed from decade view. | ||
618 | + | ||
619 | +### changeMonth | ||
620 | + | ||
621 | +Fired when the *view* month is changed from year view. | ||
622 | + | ||
623 | +### outOfRange | ||
624 | + | ||
625 | +Fired when you pick a date before the *startDate* or after the *endDate* or when you specify a date via the method *setDate* or *setUTCDate*.. | ||
626 | + | ||
627 | +### next:* / prev:* | ||
628 | + | ||
629 | +Fired when you click the *next* or *previous* arrows. Supports all the differnt view modes ('year', 'month', 'day', 'hour'). For example allows you to bind a callback to 'next:month' or 'prev:month' action. | ||
630 | + | ||
631 | +## Keyboard support | ||
632 | + | ||
633 | +The datetimepicker includes some keyboard navigation: | ||
634 | + | ||
635 | + | ||
636 | + | ||
637 | +### up, down, left, right arrow keys | ||
638 | + | ||
639 | +By themselves, left/right will move backward/forward one day, up/down will move back/forward one week. | ||
640 | + | ||
641 | +With the shift key, up/left will move backward one month, down/right will move forward one month. | ||
642 | + | ||
643 | +With the ctrl key, up/left will move backward one year, down/right will move forward oone year. | ||
644 | + | ||
645 | +Shift+ctrl behaves the same as ctrl -- that is, it does not change both month and year simultaneously, only the year. | ||
646 | + | ||
647 | +### escape | ||
648 | + | ||
649 | +The escape key can be used to hide and re-show the datetimepicker; this is necessary if the user wants to manually edit the value. | ||
650 | + | ||
651 | +### enter | ||
652 | + | ||
653 | +When the picker is visible, enter will simply hide it. When the picker is not visible, enter will have normal effects -- submitting the current form, etc. | ||
654 | + | ||
655 | +## Mouse Wheel View Navigation | ||
656 | + | ||
657 | +In order to make this plugin easier to set different part of date time, mouse wheel has been used to navigate through different views. Scroll up your mouse wheel to navigate to the decade year view. Scroll down will lead to the minute view. | ||
658 | + | ||
659 | +### Dependency | ||
660 | + | ||
661 | +To enalbe this feature. [jQuery Mouse Wheel Plugin](https://github.com/brandonaaron/jquery-mousewheel) must be included before using this feature. | ||
662 | + | ||
663 | +### Options | ||
664 | + | ||
665 | +#### wheelViewModeNavigation | ||
666 | + | ||
667 | +Boolean. Default: false | ||
668 | + | ||
669 | +Whether or not to enable navigating through different view mode using mouse wheel. | ||
670 | + | ||
671 | +#### wheelViewModeNavigationInverseDirection | ||
672 | + | ||
673 | +Boolean. Default: false | ||
674 | + | ||
675 | +Whether or not to reverse the direction of scrolling. Default is scroll up to the decade view. | ||
676 | + | ||
677 | +#### wheelViewModeNavigationDelay | ||
678 | + | ||
679 | +Integer. Default: 100 | ||
680 | + | ||
681 | +Time delays between the next respond to the wheel command, it controls the speed between switching in different views. Unit is in million seconds. | ||
682 | + | ||
683 | +#### About viewSelect option | ||
684 | + | ||
685 | +The recommended value for viewSelect option is 4 when this feature is enable. That means you can easily update any the value in every view. This option value is applied in the demo page. | ||
686 | + | ||
687 | +### Feature Demo | ||
688 | + | ||
689 | +A simple [Demo](http://lyonlai.github.io/bootstrap-datetimepicker/demo.html) page is given to show it's simple idea. | ||
690 | + | ||
691 | +## I18N | ||
692 | + | ||
693 | +The plugin supports i18n for the month and weekday names and the `weekStart` option. The default is English ('en'); other available translations are avilable in the `js/locales/` directory, simply include your desired locale after the plugin. To add more languages, simply add a key to `$.fn.datetimepicker.dates`, before calling `.datetimepicker()`. Example: | ||
694 | + | ||
695 | +```javascript | ||
696 | +$.fn.datetimepicker.dates['en'] = { | ||
697 | + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], | ||
698 | + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], | ||
699 | + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"], | ||
700 | + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], | ||
701 | + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], | ||
702 | + today: "Today" | ||
703 | +}; | ||
704 | +``` | ||
705 | + | ||
706 | +You can override the default date format in the language configuration with `format` attribute. | ||
707 | +Example: | ||
708 | + | ||
709 | +```javascript | ||
710 | +$.fn.datetimepicker.dates['pt-BR'] = { | ||
711 | + format: 'dd/mm/yyyy' | ||
712 | +}; | ||
713 | +``` | ||
714 | + | ||
715 | +Right-to-left languages may also include `rtl: true` to make the calendar display appropriately. | ||
716 | + | ||
717 | +If your browser (or those of your users) is displaying characters wrong, chances are the browser is loading the javascript file with a non-unicode encoding. Simply add `charset="UTF-8"` to your `script` tag: | ||
718 | + | ||
719 | +```html | ||
720 | +<script type="text/javascript" src="bootstrap-datetimepicker.de.js" charset="UTF-8"></script> | ||
721 | +``` |
1 | +{ | ||
2 | + "name": "smalot-bootstrap-datetimepicker", | ||
3 | + "main": ["js/bootstrap-datetimepicker.min.js", "css/bootstrap-datetimepicker.min.css"], | ||
4 | + "ignore": [ | ||
5 | + "build", | ||
6 | + "sample in bootstrap v2", | ||
7 | + "sample in bootstrap v3", | ||
8 | + "screenshot", | ||
9 | + "tests", | ||
10 | + ".gitattributes", | ||
11 | + ".gitignore", | ||
12 | + ".travis.yml", | ||
13 | + "minify.sh" | ||
14 | + ] | ||
15 | +} |
1 | +// Datepicker .less buildfile. Includes select mixins/variables from bootstrap | ||
2 | +// and imports the included datepicker.less to output a minimal datepicker.css | ||
3 | +// | ||
4 | +// Usage: | ||
5 | +// lessc build.less datepicker.css | ||
6 | +// | ||
7 | +// Variables and mixins copied from bootstrap 2.0.2 | ||
8 | + | ||
9 | +// Variables | ||
10 | +@grayLight: #999; | ||
11 | +@grayLighter: #eee; | ||
12 | +@white: #fff; | ||
13 | +@linkColor: #08c; | ||
14 | +@btnPrimaryBackground: @linkColor; | ||
15 | +@orange: #f89406; | ||
16 | + | ||
17 | +// Mixins | ||
18 | + | ||
19 | +// Border Radius | ||
20 | +.border-radius(@radius: 5px) { | ||
21 | + -webkit-border-radius: @radius; | ||
22 | + -moz-border-radius: @radius; | ||
23 | + border-radius: @radius; | ||
24 | +} | ||
25 | + | ||
26 | +// Button backgrounds | ||
27 | +.buttonBackground(@startColor, @endColor) { | ||
28 | + .gradientBar(@startColor, @endColor); | ||
29 | + .reset-filter(); | ||
30 | + &:hover, &:active, &.active, &.disabled, &[disabled] { | ||
31 | + background-color: @endColor; | ||
32 | + } | ||
33 | + &:active, | ||
34 | + &.active { | ||
35 | + background-color: darken(@endColor, 10%) e("\9"); | ||
36 | + } | ||
37 | +} | ||
38 | + | ||
39 | +// Reset filters for IE | ||
40 | +.reset-filter() { | ||
41 | + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | ||
42 | +} | ||
43 | + | ||
44 | +// Gradient Bar Colors for buttons and alerts | ||
45 | +.gradientBar(@primaryColor, @secondaryColor) { | ||
46 | + #gradient > .vertical(@primaryColor, @secondaryColor); | ||
47 | + border-color: @secondaryColor @secondaryColor darken(@secondaryColor, 15%); | ||
48 | + border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%); | ||
49 | +} | ||
50 | + | ||
51 | +// Gradients | ||
52 | +#gradient { | ||
53 | + .vertical(@startColor: #555, @endColor: #333) { | ||
54 | + background-color: mix(@startColor, @endColor, 60%); | ||
55 | + background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+ | ||
56 | + background-image: -ms-linear-gradient(top, @startColor, @endColor); // IE10 | ||
57 | + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ | ||
58 | + background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+ | ||
59 | + background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10 | ||
60 | + background-image: linear-gradient(top, @startColor, @endColor); // The standard | ||
61 | + background-repeat: repeat-x; | ||
62 | + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down | ||
63 | + } | ||
64 | +} | ||
65 | + | ||
66 | +@import "../less/datetimepicker.less"; |
1 | +// Datepicker standalone .less buildfile. Includes all necessary mixins/variables/rules from bootstrap | ||
2 | +// and imports the included datepicker.less to output a minimal standalone datepicker.css | ||
3 | +// | ||
4 | +// Usage: | ||
5 | +// lessc build_standalone.less datepicker.css | ||
6 | +// | ||
7 | +// Variables, mixins, and rules copied from bootstrap 2.0.2 | ||
8 | + | ||
9 | +@import "build.less"; | ||
10 | + | ||
11 | +// Dropdown css | ||
12 | + | ||
13 | +@zindexDropdown: 1000; | ||
14 | +@grayDark: #333; | ||
15 | +@baseLineHeight: 18px; | ||
16 | +@tableBackground: transparent; // overall background-color | ||
17 | +@dropdownBackground: @white; | ||
18 | +@dropdownBorder: rgba(0,0,0,.2); | ||
19 | +@dropdownLinkColor: @grayDark; | ||
20 | +@dropdownLinkColorHover: @white; | ||
21 | +@dropdownLinkBackgroundHover: @linkColor; | ||
22 | + | ||
23 | +// Drop shadows | ||
24 | +.box-shadow(@shadow) { | ||
25 | + -webkit-box-shadow: @shadow; | ||
26 | + -moz-box-shadow: @shadow; | ||
27 | + box-shadow: @shadow; | ||
28 | +} | ||
29 | + | ||
30 | +// The dropdown menu (ul) | ||
31 | +// ---------------------- | ||
32 | +.datetimepicker.dropdown-menu { | ||
33 | + position: absolute; | ||
34 | + top: 100%; | ||
35 | + left: 0; | ||
36 | + z-index: @zindexDropdown; | ||
37 | + float: left; | ||
38 | + display: none; // none by default, but block on "open" of the menu | ||
39 | + min-width: 160px; | ||
40 | + list-style: none; | ||
41 | + background-color: @dropdownBackground; | ||
42 | + border: 1px solid #ccc; | ||
43 | + border: 1px solid rgba(0,0,0,.2); | ||
44 | + .border-radius(5px); | ||
45 | + .box-shadow(0 5px 10px rgba(0,0,0,.2)); | ||
46 | + -webkit-background-clip: padding-box; | ||
47 | + -moz-background-clip: padding; | ||
48 | + background-clip: padding-box; | ||
49 | + *border-right-width: 2px; | ||
50 | + *border-bottom-width: 2px; | ||
51 | + | ||
52 | + // Normally inherited from bootstrap's `body` | ||
53 | + color: #333333; | ||
54 | + font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; | ||
55 | + font-size:13px; | ||
56 | + line-height: @baseLineHeight; | ||
57 | + | ||
58 | + th, td { | ||
59 | + padding: 4px 5px; | ||
60 | + } | ||
61 | +} | ||
62 | + | ||
63 | +// Alternative arrows | ||
64 | +// May require `charset="UTF-8"` in your `<link>` tag | ||
65 | +.datetimepicker { | ||
66 | + .prev, .next {font-style:normal;} | ||
67 | + .prev:after {content:"«";} | ||
68 | + .next:after {content:"»";} | ||
69 | +} |
1 | +/*! | ||
2 | + * Datetimepicker for Bootstrap | ||
3 | + * | ||
4 | + * Copyright 2012 Stefan Petre | ||
5 | + * Improvements by Andrew Rowls | ||
6 | + * Licensed under the Apache License v2.0 | ||
7 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
8 | + * | ||
9 | + */ | ||
10 | +.datetimepicker { | ||
11 | + padding: 4px; | ||
12 | + margin-top: 1px; | ||
13 | + -webkit-border-radius: 4px; | ||
14 | + -moz-border-radius: 4px; | ||
15 | + border-radius: 4px; | ||
16 | + direction: ltr; | ||
17 | +} | ||
18 | + | ||
19 | +.datetimepicker-inline { | ||
20 | + width: 220px; | ||
21 | +} | ||
22 | + | ||
23 | +.datetimepicker.datetimepicker-rtl { | ||
24 | + direction: rtl; | ||
25 | +} | ||
26 | + | ||
27 | +.datetimepicker.datetimepicker-rtl table tr td span { | ||
28 | + float: right; | ||
29 | +} | ||
30 | + | ||
31 | +.datetimepicker-dropdown, .datetimepicker-dropdown-left { | ||
32 | + top: 0; | ||
33 | + left: 0; | ||
34 | +} | ||
35 | + | ||
36 | +[class*=" datetimepicker-dropdown"]:before { | ||
37 | + content: ''; | ||
38 | + display: inline-block; | ||
39 | + border-left: 7px solid transparent; | ||
40 | + border-right: 7px solid transparent; | ||
41 | + border-bottom: 7px solid #cccccc; | ||
42 | + border-bottom-color: rgba(0, 0, 0, 0.2); | ||
43 | + position: absolute; | ||
44 | +} | ||
45 | + | ||
46 | +[class*=" datetimepicker-dropdown"]:after { | ||
47 | + content: ''; | ||
48 | + display: inline-block; | ||
49 | + border-left: 6px solid transparent; | ||
50 | + border-right: 6px solid transparent; | ||
51 | + border-bottom: 6px solid #ffffff; | ||
52 | + position: absolute; | ||
53 | +} | ||
54 | + | ||
55 | +[class*=" datetimepicker-dropdown-top"]:before { | ||
56 | + content: ''; | ||
57 | + display: inline-block; | ||
58 | + border-left: 7px solid transparent; | ||
59 | + border-right: 7px solid transparent; | ||
60 | + border-top: 7px solid #cccccc; | ||
61 | + border-top-color: rgba(0, 0, 0, 0.2); | ||
62 | + border-bottom: 0; | ||
63 | +} | ||
64 | + | ||
65 | +[class*=" datetimepicker-dropdown-top"]:after { | ||
66 | + content: ''; | ||
67 | + display: inline-block; | ||
68 | + border-left: 6px solid transparent; | ||
69 | + border-right: 6px solid transparent; | ||
70 | + border-top: 6px solid #ffffff; | ||
71 | + border-bottom: 0; | ||
72 | +} | ||
73 | + | ||
74 | +.datetimepicker-dropdown-bottom-left:before { | ||
75 | + top: -7px; | ||
76 | + right: 6px; | ||
77 | +} | ||
78 | + | ||
79 | +.datetimepicker-dropdown-bottom-left:after { | ||
80 | + top: -6px; | ||
81 | + right: 7px; | ||
82 | +} | ||
83 | + | ||
84 | +.datetimepicker-dropdown-bottom-right:before { | ||
85 | + top: -7px; | ||
86 | + left: 6px; | ||
87 | +} | ||
88 | + | ||
89 | +.datetimepicker-dropdown-bottom-right:after { | ||
90 | + top: -6px; | ||
91 | + left: 7px; | ||
92 | +} | ||
93 | + | ||
94 | +.datetimepicker-dropdown-top-left:before { | ||
95 | + bottom: -7px; | ||
96 | + right: 6px; | ||
97 | +} | ||
98 | + | ||
99 | +.datetimepicker-dropdown-top-left:after { | ||
100 | + bottom: -6px; | ||
101 | + right: 7px; | ||
102 | +} | ||
103 | + | ||
104 | +.datetimepicker-dropdown-top-right:before { | ||
105 | + bottom: -7px; | ||
106 | + left: 6px; | ||
107 | +} | ||
108 | + | ||
109 | +.datetimepicker-dropdown-top-right:after { | ||
110 | + bottom: -6px; | ||
111 | + left: 7px; | ||
112 | +} | ||
113 | + | ||
114 | +.datetimepicker > div { | ||
115 | + display: none; | ||
116 | +} | ||
117 | + | ||
118 | +.datetimepicker.minutes div.datetimepicker-minutes { | ||
119 | + display: block; | ||
120 | +} | ||
121 | + | ||
122 | +.datetimepicker.hours div.datetimepicker-hours { | ||
123 | + display: block; | ||
124 | +} | ||
125 | + | ||
126 | +.datetimepicker.days div.datetimepicker-days { | ||
127 | + display: block; | ||
128 | +} | ||
129 | + | ||
130 | +.datetimepicker.months div.datetimepicker-months { | ||
131 | + display: block; | ||
132 | +} | ||
133 | + | ||
134 | +.datetimepicker.years div.datetimepicker-years { | ||
135 | + display: block; | ||
136 | +} | ||
137 | + | ||
138 | +.datetimepicker table { | ||
139 | + margin: 0; | ||
140 | +} | ||
141 | + | ||
142 | +.datetimepicker td, | ||
143 | +.datetimepicker th { | ||
144 | + text-align: center; | ||
145 | + width: 20px; | ||
146 | + height: 20px; | ||
147 | + -webkit-border-radius: 4px; | ||
148 | + -moz-border-radius: 4px; | ||
149 | + border-radius: 4px; | ||
150 | + border: none; | ||
151 | +} | ||
152 | + | ||
153 | +.table-striped .datetimepicker table tr td, | ||
154 | +.table-striped .datetimepicker table tr th { | ||
155 | + background-color: transparent; | ||
156 | +} | ||
157 | + | ||
158 | +.datetimepicker table tr td.minute:hover { | ||
159 | + background: #eeeeee; | ||
160 | + cursor: pointer; | ||
161 | +} | ||
162 | + | ||
163 | +.datetimepicker table tr td.hour:hover { | ||
164 | + background: #eeeeee; | ||
165 | + cursor: pointer; | ||
166 | +} | ||
167 | + | ||
168 | +.datetimepicker table tr td.day:hover { | ||
169 | + background: #eeeeee; | ||
170 | + cursor: pointer; | ||
171 | +} | ||
172 | + | ||
173 | +.datetimepicker table tr td.old, | ||
174 | +.datetimepicker table tr td.new { | ||
175 | + color: #999999; | ||
176 | +} | ||
177 | + | ||
178 | +.datetimepicker table tr td.disabled, | ||
179 | +.datetimepicker table tr td.disabled:hover { | ||
180 | + background: none; | ||
181 | + color: #999999; | ||
182 | + cursor: default; | ||
183 | +} | ||
184 | + | ||
185 | +.datetimepicker table tr td.today, | ||
186 | +.datetimepicker table tr td.today:hover, | ||
187 | +.datetimepicker table tr td.today.disabled, | ||
188 | +.datetimepicker table tr td.today.disabled:hover { | ||
189 | + background-color: #fde19a; | ||
190 | + background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a); | ||
191 | + background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a); | ||
192 | + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a)); | ||
193 | + background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a); | ||
194 | + background-image: -o-linear-gradient(top, #fdd49a, #fdf59a); | ||
195 | + background-image: linear-gradient(to bottom, #fdd49a, #fdf59a); | ||
196 | + background-repeat: repeat-x; | ||
197 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0); | ||
198 | + border-color: #fdf59a #fdf59a #fbed50; | ||
199 | + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); | ||
200 | + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); | ||
201 | +} | ||
202 | + | ||
203 | +.datetimepicker table tr td.today:hover, | ||
204 | +.datetimepicker table tr td.today:hover:hover, | ||
205 | +.datetimepicker table tr td.today.disabled:hover, | ||
206 | +.datetimepicker table tr td.today.disabled:hover:hover, | ||
207 | +.datetimepicker table tr td.today:active, | ||
208 | +.datetimepicker table tr td.today:hover:active, | ||
209 | +.datetimepicker table tr td.today.disabled:active, | ||
210 | +.datetimepicker table tr td.today.disabled:hover:active, | ||
211 | +.datetimepicker table tr td.today.active, | ||
212 | +.datetimepicker table tr td.today:hover.active, | ||
213 | +.datetimepicker table tr td.today.disabled.active, | ||
214 | +.datetimepicker table tr td.today.disabled:hover.active, | ||
215 | +.datetimepicker table tr td.today.disabled, | ||
216 | +.datetimepicker table tr td.today:hover.disabled, | ||
217 | +.datetimepicker table tr td.today.disabled.disabled, | ||
218 | +.datetimepicker table tr td.today.disabled:hover.disabled, | ||
219 | +.datetimepicker table tr td.today[disabled], | ||
220 | +.datetimepicker table tr td.today:hover[disabled], | ||
221 | +.datetimepicker table tr td.today.disabled[disabled], | ||
222 | +.datetimepicker table tr td.today.disabled:hover[disabled] { | ||
223 | + background-color: #fdf59a; | ||
224 | +} | ||
225 | + | ||
226 | +.datetimepicker table tr td.today:active, | ||
227 | +.datetimepicker table tr td.today:hover:active, | ||
228 | +.datetimepicker table tr td.today.disabled:active, | ||
229 | +.datetimepicker table tr td.today.disabled:hover:active, | ||
230 | +.datetimepicker table tr td.today.active, | ||
231 | +.datetimepicker table tr td.today:hover.active, | ||
232 | +.datetimepicker table tr td.today.disabled.active, | ||
233 | +.datetimepicker table tr td.today.disabled:hover.active { | ||
234 | + background-color: #fbf069; | ||
235 | +} | ||
236 | + | ||
237 | +.datetimepicker table tr td.active, | ||
238 | +.datetimepicker table tr td.active:hover, | ||
239 | +.datetimepicker table tr td.active.disabled, | ||
240 | +.datetimepicker table tr td.active.disabled:hover { | ||
241 | + background-color: #006dcc; | ||
242 | + background-image: -moz-linear-gradient(top, #0088cc, #0044cc); | ||
243 | + background-image: -ms-linear-gradient(top, #0088cc, #0044cc); | ||
244 | + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); | ||
245 | + background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); | ||
246 | + background-image: -o-linear-gradient(top, #0088cc, #0044cc); | ||
247 | + background-image: linear-gradient(to bottom, #0088cc, #0044cc); | ||
248 | + background-repeat: repeat-x; | ||
249 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0); | ||
250 | + border-color: #0044cc #0044cc #002a80; | ||
251 | + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); | ||
252 | + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); | ||
253 | + color: #ffffff; | ||
254 | + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); | ||
255 | +} | ||
256 | + | ||
257 | +.datetimepicker table tr td.active:hover, | ||
258 | +.datetimepicker table tr td.active:hover:hover, | ||
259 | +.datetimepicker table tr td.active.disabled:hover, | ||
260 | +.datetimepicker table tr td.active.disabled:hover:hover, | ||
261 | +.datetimepicker table tr td.active:active, | ||
262 | +.datetimepicker table tr td.active:hover:active, | ||
263 | +.datetimepicker table tr td.active.disabled:active, | ||
264 | +.datetimepicker table tr td.active.disabled:hover:active, | ||
265 | +.datetimepicker table tr td.active.active, | ||
266 | +.datetimepicker table tr td.active:hover.active, | ||
267 | +.datetimepicker table tr td.active.disabled.active, | ||
268 | +.datetimepicker table tr td.active.disabled:hover.active, | ||
269 | +.datetimepicker table tr td.active.disabled, | ||
270 | +.datetimepicker table tr td.active:hover.disabled, | ||
271 | +.datetimepicker table tr td.active.disabled.disabled, | ||
272 | +.datetimepicker table tr td.active.disabled:hover.disabled, | ||
273 | +.datetimepicker table tr td.active[disabled], | ||
274 | +.datetimepicker table tr td.active:hover[disabled], | ||
275 | +.datetimepicker table tr td.active.disabled[disabled], | ||
276 | +.datetimepicker table tr td.active.disabled:hover[disabled] { | ||
277 | + background-color: #0044cc; | ||
278 | +} | ||
279 | + | ||
280 | +.datetimepicker table tr td.active:active, | ||
281 | +.datetimepicker table tr td.active:hover:active, | ||
282 | +.datetimepicker table tr td.active.disabled:active, | ||
283 | +.datetimepicker table tr td.active.disabled:hover:active, | ||
284 | +.datetimepicker table tr td.active.active, | ||
285 | +.datetimepicker table tr td.active:hover.active, | ||
286 | +.datetimepicker table tr td.active.disabled.active, | ||
287 | +.datetimepicker table tr td.active.disabled:hover.active { | ||
288 | + background-color: #003399; | ||
289 | +} | ||
290 | + | ||
291 | +.datetimepicker table tr td span { | ||
292 | + display: block; | ||
293 | + width: 23%; | ||
294 | + height: 54px; | ||
295 | + line-height: 54px; | ||
296 | + float: left; | ||
297 | + margin: 1%; | ||
298 | + cursor: pointer; | ||
299 | + -webkit-border-radius: 4px; | ||
300 | + -moz-border-radius: 4px; | ||
301 | + border-radius: 4px; | ||
302 | +} | ||
303 | + | ||
304 | +.datetimepicker .datetimepicker-hours span { | ||
305 | + height: 26px; | ||
306 | + line-height: 26px; | ||
307 | +} | ||
308 | + | ||
309 | +.datetimepicker .datetimepicker-hours table tr td span.hour_am, | ||
310 | +.datetimepicker .datetimepicker-hours table tr td span.hour_pm { | ||
311 | + width: 14.6%; | ||
312 | +} | ||
313 | + | ||
314 | +.datetimepicker .datetimepicker-hours fieldset legend, | ||
315 | +.datetimepicker .datetimepicker-minutes fieldset legend { | ||
316 | + margin-bottom: inherit; | ||
317 | + line-height: 30px; | ||
318 | +} | ||
319 | + | ||
320 | +.datetimepicker .datetimepicker-minutes span { | ||
321 | + height: 26px; | ||
322 | + line-height: 26px; | ||
323 | +} | ||
324 | + | ||
325 | +.datetimepicker table tr td span:hover { | ||
326 | + background: #eeeeee; | ||
327 | +} | ||
328 | + | ||
329 | +.datetimepicker table tr td span.disabled, | ||
330 | +.datetimepicker table tr td span.disabled:hover { | ||
331 | + background: none; | ||
332 | + color: #999999; | ||
333 | + cursor: default; | ||
334 | +} | ||
335 | + | ||
336 | +.datetimepicker table tr td span.active, | ||
337 | +.datetimepicker table tr td span.active:hover, | ||
338 | +.datetimepicker table tr td span.active.disabled, | ||
339 | +.datetimepicker table tr td span.active.disabled:hover { | ||
340 | + background-color: #006dcc; | ||
341 | + background-image: -moz-linear-gradient(top, #0088cc, #0044cc); | ||
342 | + background-image: -ms-linear-gradient(top, #0088cc, #0044cc); | ||
343 | + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); | ||
344 | + background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); | ||
345 | + background-image: -o-linear-gradient(top, #0088cc, #0044cc); | ||
346 | + background-image: linear-gradient(to bottom, #0088cc, #0044cc); | ||
347 | + background-repeat: repeat-x; | ||
348 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0); | ||
349 | + border-color: #0044cc #0044cc #002a80; | ||
350 | + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); | ||
351 | + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); | ||
352 | + color: #ffffff; | ||
353 | + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); | ||
354 | +} | ||
355 | + | ||
356 | +.datetimepicker table tr td span.active:hover, | ||
357 | +.datetimepicker table tr td span.active:hover:hover, | ||
358 | +.datetimepicker table tr td span.active.disabled:hover, | ||
359 | +.datetimepicker table tr td span.active.disabled:hover:hover, | ||
360 | +.datetimepicker table tr td span.active:active, | ||
361 | +.datetimepicker table tr td span.active:hover:active, | ||
362 | +.datetimepicker table tr td span.active.disabled:active, | ||
363 | +.datetimepicker table tr td span.active.disabled:hover:active, | ||
364 | +.datetimepicker table tr td span.active.active, | ||
365 | +.datetimepicker table tr td span.active:hover.active, | ||
366 | +.datetimepicker table tr td span.active.disabled.active, | ||
367 | +.datetimepicker table tr td span.active.disabled:hover.active, | ||
368 | +.datetimepicker table tr td span.active.disabled, | ||
369 | +.datetimepicker table tr td span.active:hover.disabled, | ||
370 | +.datetimepicker table tr td span.active.disabled.disabled, | ||
371 | +.datetimepicker table tr td span.active.disabled:hover.disabled, | ||
372 | +.datetimepicker table tr td span.active[disabled], | ||
373 | +.datetimepicker table tr td span.active:hover[disabled], | ||
374 | +.datetimepicker table tr td span.active.disabled[disabled], | ||
375 | +.datetimepicker table tr td span.active.disabled:hover[disabled] { | ||
376 | + background-color: #0044cc; | ||
377 | +} | ||
378 | + | ||
379 | +.datetimepicker table tr td span.active:active, | ||
380 | +.datetimepicker table tr td span.active:hover:active, | ||
381 | +.datetimepicker table tr td span.active.disabled:active, | ||
382 | +.datetimepicker table tr td span.active.disabled:hover:active, | ||
383 | +.datetimepicker table tr td span.active.active, | ||
384 | +.datetimepicker table tr td span.active:hover.active, | ||
385 | +.datetimepicker table tr td span.active.disabled.active, | ||
386 | +.datetimepicker table tr td span.active.disabled:hover.active { | ||
387 | + background-color: #003399; | ||
388 | +} | ||
389 | + | ||
390 | +.datetimepicker table tr td span.old { | ||
391 | + color: #999999; | ||
392 | +} | ||
393 | + | ||
394 | +.datetimepicker th.switch { | ||
395 | + width: 145px; | ||
396 | +} | ||
397 | + | ||
398 | +.datetimepicker th span.glyphicon { | ||
399 | + pointer-events: none; | ||
400 | +} | ||
401 | + | ||
402 | +.datetimepicker thead tr:first-child th, | ||
403 | +.datetimepicker tfoot th { | ||
404 | + cursor: pointer; | ||
405 | +} | ||
406 | + | ||
407 | +.datetimepicker thead tr:first-child th:hover, | ||
408 | +.datetimepicker tfoot th:hover { | ||
409 | + background: #eeeeee; | ||
410 | +} | ||
411 | + | ||
412 | +.input-append.date .add-on i, | ||
413 | +.input-prepend.date .add-on i, | ||
414 | +.input-group.date .input-group-addon span { | ||
415 | + cursor: pointer; | ||
416 | + width: 14px; | ||
417 | + height: 14px; | ||
418 | +} |
1 | +/*! | ||
2 | + * Datetimepicker for Bootstrap | ||
3 | + * | ||
4 | + * Copyright 2012 Stefan Petre | ||
5 | + * Improvements by Andrew Rowls | ||
6 | + * Licensed under the Apache License v2.0 | ||
7 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
8 | + * | ||
9 | + */ | ||
10 | +.datetimepicker { | ||
11 | + padding: 4px; | ||
12 | + margin-top: 1px; | ||
13 | + -webkit-border-radius: 4px; | ||
14 | + -moz-border-radius: 4px; | ||
15 | + border-radius: 4px; | ||
16 | + direction: ltr | ||
17 | +} | ||
18 | + | ||
19 | +.datetimepicker-inline { | ||
20 | + width: 220px | ||
21 | +} | ||
22 | + | ||
23 | +.datetimepicker.datetimepicker-rtl { | ||
24 | + direction: rtl | ||
25 | +} | ||
26 | + | ||
27 | +.datetimepicker.datetimepicker-rtl table tr td span { | ||
28 | + float: right | ||
29 | +} | ||
30 | + | ||
31 | +.datetimepicker-dropdown, .datetimepicker-dropdown-left { | ||
32 | + top: 0; | ||
33 | + left: 0 | ||
34 | +} | ||
35 | + | ||
36 | +[class*=" datetimepicker-dropdown"]:before { | ||
37 | + content: ''; | ||
38 | + display: inline-block; | ||
39 | + border-left: 7px solid transparent; | ||
40 | + border-right: 7px solid transparent; | ||
41 | + border-bottom: 7px solid #ccc; | ||
42 | + border-bottom-color: rgba(0, 0, 0, 0.2); | ||
43 | + position: absolute | ||
44 | +} | ||
45 | + | ||
46 | +[class*=" datetimepicker-dropdown"]:after { | ||
47 | + content: ''; | ||
48 | + display: inline-block; | ||
49 | + border-left: 6px solid transparent; | ||
50 | + border-right: 6px solid transparent; | ||
51 | + border-bottom: 6px solid #fff; | ||
52 | + position: absolute | ||
53 | +} | ||
54 | + | ||
55 | +[class*=" datetimepicker-dropdown-top"]:before { | ||
56 | + content: ''; | ||
57 | + display: inline-block; | ||
58 | + border-left: 7px solid transparent; | ||
59 | + border-right: 7px solid transparent; | ||
60 | + border-top: 7px solid #ccc; | ||
61 | + border-top-color: rgba(0, 0, 0, 0.2); | ||
62 | + border-bottom: 0 | ||
63 | +} | ||
64 | + | ||
65 | +[class*=" datetimepicker-dropdown-top"]:after { | ||
66 | + content: ''; | ||
67 | + display: inline-block; | ||
68 | + border-left: 6px solid transparent; | ||
69 | + border-right: 6px solid transparent; | ||
70 | + border-top: 6px solid #fff; | ||
71 | + border-bottom: 0 | ||
72 | +} | ||
73 | + | ||
74 | +.datetimepicker-dropdown-bottom-left:before { | ||
75 | + top: -7px; | ||
76 | + right: 6px | ||
77 | +} | ||
78 | + | ||
79 | +.datetimepicker-dropdown-bottom-left:after { | ||
80 | + top: -6px; | ||
81 | + right: 7px | ||
82 | +} | ||
83 | + | ||
84 | +.datetimepicker-dropdown-bottom-right:before { | ||
85 | + top: -7px; | ||
86 | + left: 6px | ||
87 | +} | ||
88 | + | ||
89 | +.datetimepicker-dropdown-bottom-right:after { | ||
90 | + top: -6px; | ||
91 | + left: 7px | ||
92 | +} | ||
93 | + | ||
94 | +.datetimepicker-dropdown-top-left:before { | ||
95 | + bottom: -7px; | ||
96 | + right: 6px | ||
97 | +} | ||
98 | + | ||
99 | +.datetimepicker-dropdown-top-left:after { | ||
100 | + bottom: -6px; | ||
101 | + right: 7px | ||
102 | +} | ||
103 | + | ||
104 | +.datetimepicker-dropdown-top-right:before { | ||
105 | + bottom: -7px; | ||
106 | + left: 6px | ||
107 | +} | ||
108 | + | ||
109 | +.datetimepicker-dropdown-top-right:after { | ||
110 | + bottom: -6px; | ||
111 | + left: 7px | ||
112 | +} | ||
113 | + | ||
114 | +.datetimepicker > div { | ||
115 | + display: none | ||
116 | +} | ||
117 | + | ||
118 | +.datetimepicker.minutes div.datetimepicker-minutes { | ||
119 | + display: block | ||
120 | +} | ||
121 | + | ||
122 | +.datetimepicker.hours div.datetimepicker-hours { | ||
123 | + display: block | ||
124 | +} | ||
125 | + | ||
126 | +.datetimepicker.days div.datetimepicker-days { | ||
127 | + display: block | ||
128 | +} | ||
129 | + | ||
130 | +.datetimepicker.months div.datetimepicker-months { | ||
131 | + display: block | ||
132 | +} | ||
133 | + | ||
134 | +.datetimepicker.years div.datetimepicker-years { | ||
135 | + display: block | ||
136 | +} | ||
137 | + | ||
138 | +.datetimepicker table { | ||
139 | + margin: 0 | ||
140 | +} | ||
141 | + | ||
142 | +.datetimepicker td, .datetimepicker th { | ||
143 | + text-align: center; | ||
144 | + width: 20px; | ||
145 | + height: 20px; | ||
146 | + -webkit-border-radius: 4px; | ||
147 | + -moz-border-radius: 4px; | ||
148 | + border-radius: 4px; | ||
149 | + border: 0 | ||
150 | +} | ||
151 | + | ||
152 | +.table-striped .datetimepicker table tr td, .table-striped .datetimepicker table tr th { | ||
153 | + background-color: transparent | ||
154 | +} | ||
155 | + | ||
156 | +.datetimepicker table tr td.minute:hover { | ||
157 | + background: #eee; | ||
158 | + cursor: pointer | ||
159 | +} | ||
160 | + | ||
161 | +.datetimepicker table tr td.hour:hover { | ||
162 | + background: #eee; | ||
163 | + cursor: pointer | ||
164 | +} | ||
165 | + | ||
166 | +.datetimepicker table tr td.day:hover { | ||
167 | + background: #eee; | ||
168 | + cursor: pointer | ||
169 | +} | ||
170 | + | ||
171 | +.datetimepicker table tr td.old, .datetimepicker table tr td.new { | ||
172 | + color: #999 | ||
173 | +} | ||
174 | + | ||
175 | +.datetimepicker table tr td.disabled, .datetimepicker table tr td.disabled:hover { | ||
176 | + background: 0; | ||
177 | + color: #999; | ||
178 | + cursor: default | ||
179 | +} | ||
180 | + | ||
181 | +.datetimepicker table tr td.today, .datetimepicker table tr td.today:hover, .datetimepicker table tr td.today.disabled, .datetimepicker table tr td.today.disabled:hover { | ||
182 | + background-color: #fde19a; | ||
183 | + background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a); | ||
184 | + background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a); | ||
185 | + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a)); | ||
186 | + background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a); | ||
187 | + background-image: -o-linear-gradient(top, #fdd49a, #fdf59a); | ||
188 | + background-image: linear-gradient(to bottom, #fdd49a, #fdf59a); | ||
189 | + background-repeat: repeat-x; | ||
190 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0); | ||
191 | + border-color: #fdf59a #fdf59a #fbed50; | ||
192 | + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); | ||
193 | + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false) | ||
194 | +} | ||
195 | + | ||
196 | +.datetimepicker table tr td.today:hover, .datetimepicker table tr td.today:hover:hover, .datetimepicker table tr td.today.disabled:hover, .datetimepicker table tr td.today.disabled:hover:hover, .datetimepicker table tr td.today:active, .datetimepicker table tr td.today:hover:active, .datetimepicker table tr td.today.disabled:active, .datetimepicker table tr td.today.disabled:hover:active, .datetimepicker table tr td.today.active, .datetimepicker table tr td.today:hover.active, .datetimepicker table tr td.today.disabled.active, .datetimepicker table tr td.today.disabled:hover.active, .datetimepicker table tr td.today.disabled, .datetimepicker table tr td.today:hover.disabled, .datetimepicker table tr td.today.disabled.disabled, .datetimepicker table tr td.today.disabled:hover.disabled, .datetimepicker table tr td.today[disabled], .datetimepicker table tr td.today:hover[disabled], .datetimepicker table tr td.today.disabled[disabled], .datetimepicker table tr td.today.disabled:hover[disabled] { | ||
197 | + background-color: #fdf59a | ||
198 | +} | ||
199 | + | ||
200 | +.datetimepicker table tr td.today:active, .datetimepicker table tr td.today:hover:active, .datetimepicker table tr td.today.disabled:active, .datetimepicker table tr td.today.disabled:hover:active, .datetimepicker table tr td.today.active, .datetimepicker table tr td.today:hover.active, .datetimepicker table tr td.today.disabled.active, .datetimepicker table tr td.today.disabled:hover.active { | ||
201 | + background-color: #fbf069 | ||
202 | +} | ||
203 | + | ||
204 | +.datetimepicker table tr td.active, .datetimepicker table tr td.active:hover, .datetimepicker table tr td.active.disabled, .datetimepicker table tr td.active.disabled:hover { | ||
205 | + background-color: #006dcc; | ||
206 | + background-image: -moz-linear-gradient(top, #08c, #04c); | ||
207 | + background-image: -ms-linear-gradient(top, #08c, #04c); | ||
208 | + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#04c)); | ||
209 | + background-image: -webkit-linear-gradient(top, #08c, #04c); | ||
210 | + background-image: -o-linear-gradient(top, #08c, #04c); | ||
211 | + background-image: linear-gradient(to bottom, #08c, #04c); | ||
212 | + background-repeat: repeat-x; | ||
213 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0); | ||
214 | + border-color: #04c #04c #002a80; | ||
215 | + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); | ||
216 | + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); | ||
217 | + color: #fff; | ||
218 | + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25) | ||
219 | +} | ||
220 | + | ||
221 | +.datetimepicker table tr td.active:hover, .datetimepicker table tr td.active:hover:hover, .datetimepicker table tr td.active.disabled:hover, .datetimepicker table tr td.active.disabled:hover:hover, .datetimepicker table tr td.active:active, .datetimepicker table tr td.active:hover:active, .datetimepicker table tr td.active.disabled:active, .datetimepicker table tr td.active.disabled:hover:active, .datetimepicker table tr td.active.active, .datetimepicker table tr td.active:hover.active, .datetimepicker table tr td.active.disabled.active, .datetimepicker table tr td.active.disabled:hover.active, .datetimepicker table tr td.active.disabled, .datetimepicker table tr td.active:hover.disabled, .datetimepicker table tr td.active.disabled.disabled, .datetimepicker table tr td.active.disabled:hover.disabled, .datetimepicker table tr td.active[disabled], .datetimepicker table tr td.active:hover[disabled], .datetimepicker table tr td.active.disabled[disabled], .datetimepicker table tr td.active.disabled:hover[disabled] { | ||
222 | + background-color: #04c | ||
223 | +} | ||
224 | + | ||
225 | +.datetimepicker table tr td.active:active, .datetimepicker table tr td.active:hover:active, .datetimepicker table tr td.active.disabled:active, .datetimepicker table tr td.active.disabled:hover:active, .datetimepicker table tr td.active.active, .datetimepicker table tr td.active:hover.active, .datetimepicker table tr td.active.disabled.active, .datetimepicker table tr td.active.disabled:hover.active { | ||
226 | + background-color: #039 | ||
227 | +} | ||
228 | + | ||
229 | +.datetimepicker table tr td span { | ||
230 | + display: block; | ||
231 | + width: 23%; | ||
232 | + height: 54px; | ||
233 | + line-height: 54px; | ||
234 | + float: left; | ||
235 | + margin: 1%; | ||
236 | + cursor: pointer; | ||
237 | + -webkit-border-radius: 4px; | ||
238 | + -moz-border-radius: 4px; | ||
239 | + border-radius: 4px | ||
240 | +} | ||
241 | + | ||
242 | +.datetimepicker .datetimepicker-hours span { | ||
243 | + height: 26px; | ||
244 | + line-height: 26px | ||
245 | +} | ||
246 | + | ||
247 | +.datetimepicker .datetimepicker-hours table tr td span.hour_am, .datetimepicker .datetimepicker-hours table tr td span.hour_pm { | ||
248 | + width: 14.6% | ||
249 | +} | ||
250 | + | ||
251 | +.datetimepicker .datetimepicker-hours fieldset legend, .datetimepicker .datetimepicker-minutes fieldset legend { | ||
252 | + margin-bottom: inherit; | ||
253 | + line-height: 30px | ||
254 | +} | ||
255 | + | ||
256 | +.datetimepicker .datetimepicker-minutes span { | ||
257 | + height: 26px; | ||
258 | + line-height: 26px | ||
259 | +} | ||
260 | + | ||
261 | +.datetimepicker table tr td span:hover { | ||
262 | + background: #eee | ||
263 | +} | ||
264 | + | ||
265 | +.datetimepicker table tr td span.disabled, .datetimepicker table tr td span.disabled:hover { | ||
266 | + background: 0; | ||
267 | + color: #999; | ||
268 | + cursor: default | ||
269 | +} | ||
270 | + | ||
271 | +.datetimepicker table tr td span.active, .datetimepicker table tr td span.active:hover, .datetimepicker table tr td span.active.disabled, .datetimepicker table tr td span.active.disabled:hover { | ||
272 | + background-color: #006dcc; | ||
273 | + background-image: -moz-linear-gradient(top, #08c, #04c); | ||
274 | + background-image: -ms-linear-gradient(top, #08c, #04c); | ||
275 | + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#04c)); | ||
276 | + background-image: -webkit-linear-gradient(top, #08c, #04c); | ||
277 | + background-image: -o-linear-gradient(top, #08c, #04c); | ||
278 | + background-image: linear-gradient(to bottom, #08c, #04c); | ||
279 | + background-repeat: repeat-x; | ||
280 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0); | ||
281 | + border-color: #04c #04c #002a80; | ||
282 | + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); | ||
283 | + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); | ||
284 | + color: #fff; | ||
285 | + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25) | ||
286 | +} | ||
287 | + | ||
288 | +.datetimepicker table tr td span.active:hover, .datetimepicker table tr td span.active:hover:hover, .datetimepicker table tr td span.active.disabled:hover, .datetimepicker table tr td span.active.disabled:hover:hover, .datetimepicker table tr td span.active:active, .datetimepicker table tr td span.active:hover:active, .datetimepicker table tr td span.active.disabled:active, .datetimepicker table tr td span.active.disabled:hover:active, .datetimepicker table tr td span.active.active, .datetimepicker table tr td span.active:hover.active, .datetimepicker table tr td span.active.disabled.active, .datetimepicker table tr td span.active.disabled:hover.active, .datetimepicker table tr td span.active.disabled, .datetimepicker table tr td span.active:hover.disabled, .datetimepicker table tr td span.active.disabled.disabled, .datetimepicker table tr td span.active.disabled:hover.disabled, .datetimepicker table tr td span.active[disabled], .datetimepicker table tr td span.active:hover[disabled], .datetimepicker table tr td span.active.disabled[disabled], .datetimepicker table tr td span.active.disabled:hover[disabled] { | ||
289 | + background-color: #04c | ||
290 | +} | ||
291 | + | ||
292 | +.datetimepicker table tr td span.active:active, .datetimepicker table tr td span.active:hover:active, .datetimepicker table tr td span.active.disabled:active, .datetimepicker table tr td span.active.disabled:hover:active, .datetimepicker table tr td span.active.active, .datetimepicker table tr td span.active:hover.active, .datetimepicker table tr td span.active.disabled.active, .datetimepicker table tr td span.active.disabled:hover.active { | ||
293 | + background-color: #039 | ||
294 | +} | ||
295 | + | ||
296 | +.datetimepicker table tr td span.old { | ||
297 | + color: #999 | ||
298 | +} | ||
299 | + | ||
300 | +.datetimepicker th.switch { | ||
301 | + width: 145px | ||
302 | +} | ||
303 | + | ||
304 | +.datetimepicker th span.glyphicon { | ||
305 | + pointer-events: none | ||
306 | +} | ||
307 | + | ||
308 | +.datetimepicker thead tr:first-child th, .datetimepicker tfoot th { | ||
309 | + cursor: pointer | ||
310 | +} | ||
311 | + | ||
312 | +.datetimepicker thead tr:first-child th:hover, .datetimepicker tfoot th:hover { | ||
313 | + background: #eee | ||
314 | +} | ||
315 | + | ||
316 | +.input-append.date .add-on i, .input-prepend.date .add-on i, .input-group.date .input-group-addon span { | ||
317 | + cursor: pointer; | ||
318 | + width: 14px; | ||
319 | + height: 14px | ||
320 | +} |
-
请 注册 或 登录 后发表评论