update
Signed-off-by: Chenx221 <chenx221@yandex.com>
This commit is contained in:
parent
91fea883f8
commit
f19010016b
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -17,19 +17,19 @@
|
||||
<select id="getQueryStudents" parameterType="cyou.chenx221.pojo.Student" resultType="cyou.chenx221.pojo.Student">
|
||||
SELECT * FROM student
|
||||
WHERE 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<if test="name != null and name != '' and name != 'null'">
|
||||
AND name = #{name}
|
||||
</if>
|
||||
<if test="sex != null and sex != ''">
|
||||
<if test="sex != null and sex != '' and sex != 'null'">
|
||||
AND sex = #{sex}
|
||||
</if>
|
||||
<if test="birthday != null">
|
||||
AND birthday = #{birthday}
|
||||
</if>
|
||||
<if test="phone != null and phone != ''">
|
||||
<if test="phone != null and phone != '' and phone != 'null'">
|
||||
AND phone = #{phone}
|
||||
</if>
|
||||
<if test="id != -1">
|
||||
<if test="id != null and id != -1">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
</select>
|
||||
@ -64,5 +64,11 @@
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 添加学生信息记录 -->
|
||||
<insert id="insertStudent" parameterType="cyou.chenx221.pojo.Student">
|
||||
INSERT INTO student (name, birthday, sex, phone, classes)
|
||||
VALUES (#{name}, #{birthday}, #{sex}, #{phone}, #{classes})
|
||||
</insert>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
@ -129,11 +129,7 @@
|
||||
style="background-image: url('${pageContext.request.contextPath}/resources/img/jason-blackeye-nyL-rzwP-Mk-unsplash.jpg'); margin-top: -58.59px;">
|
||||
<div class="mask d-flex align-items-center h-100" style="background-color: hsla(0, 0%, 100%, 0.5);">
|
||||
<div class="container d-flex justify-content-center">
|
||||
<button type="button" class="btn btn-primary" onclick="function goBack() {
|
||||
window.history.back();
|
||||
}
|
||||
goBack()">返回
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard'">返回</button>
|
||||
<div class="table-container rounded-4 shadow-3-strong"
|
||||
style="background-color: rgba(255,255,255,0.9); overflow-y: auto; max-height: 400px;">
|
||||
<table class="table table-striped table-hover border-primary">
|
||||
|
@ -14,7 +14,6 @@
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap"
|
||||
rel="stylesheet">
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/mdb.min.css"/>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/datepicker.min.css"/>
|
||||
<style>
|
||||
.table-container {
|
||||
min-width: 80vw;
|
||||
@ -162,8 +161,8 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 mb-4">
|
||||
<div class="form-outline datepicker">
|
||||
<input type="text" class="form-control" id="birthdayDate" name="birthday"/>
|
||||
<div class="form-outline">
|
||||
<input type="date" class="form-control" id="birthdayDate" name="birthday"/>
|
||||
<label for="birthdayDate" class="form-label">出生日期</label>
|
||||
</div>
|
||||
</div>
|
||||
@ -253,7 +252,6 @@
|
||||
|
||||
|
||||
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/mdb.min.js"></script>
|
||||
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/datepicker.min.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
|
@ -15,7 +15,6 @@
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap"
|
||||
rel="stylesheet">
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/mdb.min.css"/>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/datepicker.min.css"/>
|
||||
<style>
|
||||
.table-container {
|
||||
min-width: 60vw; /* 设置最小宽度为视窗宽度的80% */
|
||||
@ -192,8 +191,8 @@
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-12">
|
||||
<div class="form-outline datepicker">
|
||||
<input type="text" id="typeText4" class="form-control"
|
||||
<div class="form-outline">
|
||||
<input type="date" id="typeText4" class="form-control"
|
||||
name="birthday"/>
|
||||
<label class="form-label" for="typeText4">出生日期</label>
|
||||
</div>
|
||||
@ -287,7 +286,6 @@
|
||||
|
||||
|
||||
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/mdb.min.js"></script>
|
||||
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/datepicker.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
<%-- 判断模型中是否存在错误信息 --%>
|
||||
|
@ -129,11 +129,7 @@
|
||||
style="background-image: url('${pageContext.request.contextPath}/resources/img/jason-blackeye-nyL-rzwP-Mk-unsplash.jpg'); margin-top: -58.59px;">
|
||||
<div class="mask d-flex align-items-center h-100" style="background-color: hsla(0, 0%, 100%, 0.5);">
|
||||
<div class="container d-flex justify-content-center">
|
||||
<button type="button" class="btn btn-primary" onclick="function goBack() {
|
||||
window.history.back();
|
||||
}
|
||||
goBack()">返回
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard'">返回</button>
|
||||
<div class="table-container rounded-4 shadow-3-strong"
|
||||
style="background-color: rgba(255,255,255,0.9); overflow-y: auto; max-height: 400px;">
|
||||
<table class="table table-striped table-hover border-primary">
|
||||
|
@ -15,7 +15,6 @@
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap"
|
||||
rel="stylesheet">
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/mdb.min.css"/>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/datepicker.min.css"/>
|
||||
<style>
|
||||
.table-container {
|
||||
min-width: 60vw;
|
||||
@ -179,7 +178,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
<!-- Tabs navs -->
|
||||
<hr class="hr" style="margin: 1px" />
|
||||
<hr class="hr" style="margin: 1px"/>
|
||||
<!-- Tabs content -->
|
||||
<div class="tab-content" id="ex1-content">
|
||||
<div class="tab-pane fade show active" id="ex1-tabs-1" role="tabpanel"
|
||||
@ -215,8 +214,8 @@
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-12">
|
||||
<div class="form-outline datepicker">
|
||||
<input type="text" id="typeText4" class="form-control"
|
||||
<div class="form-outline">
|
||||
<input type="date" id="typeText4" class="form-control"
|
||||
name="birthday"/>
|
||||
<label class="form-label" for="typeText4">出生日期</label>
|
||||
</div>
|
||||
@ -281,16 +280,7 @@
|
||||
<div class="tab-pane fade" id="ex1-tabs-3" role="tabpanel" aria-labelledby="ex1-tab-3">
|
||||
<!-- <h5 class="card-header">信息添加</h5> -->
|
||||
<div class="card-body" style="min-width: 175px">
|
||||
<form action="modinfo" method="post">
|
||||
<div class="row mb-2">
|
||||
<div class="col-12">
|
||||
<div class="form-outline">
|
||||
<input type="number" id="typeText8" class="form-control"
|
||||
required name="id"/>
|
||||
<label class="form-label" for="typeText8">ID (必填)</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form action="addinfo" method="post">
|
||||
<div class="row mb-2">
|
||||
<div class="col-12">
|
||||
<div class="form-outline">
|
||||
@ -312,8 +302,8 @@
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-12">
|
||||
<div class="form-outline datepicker">
|
||||
<input type="text" id="typeText11" class="form-control"
|
||||
<div class="form-outline">
|
||||
<input type="date" id="typeText11" class="form-control"
|
||||
name="birthday"/>
|
||||
<label class="form-label" for="typeText11">出生日期 (必填)</label>
|
||||
</div>
|
||||
@ -341,7 +331,7 @@
|
||||
<div class="col-lg-6 text-center">
|
||||
<button type="submit" class="btn btn-primary"
|
||||
data-mdb-toggle="tooltip" data-mdb-placement="top"
|
||||
title="留空为不做修改">更改
|
||||
title="留空为不做修改">添加
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-lg-6 text-center">
|
||||
@ -414,7 +404,6 @@
|
||||
|
||||
|
||||
<script type="text/javascript" src="../../resources/js/mdb.min.js"></script>
|
||||
<script type="text/javascript" src="../../resources/js/datepicker.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
// 判断模型中是否存在错误信息
|
||||
|
@ -1,384 +0,0 @@
|
||||
.datepicker-toggle-button {
|
||||
position: absolute;
|
||||
outline: none;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
right: -10px;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%)
|
||||
}
|
||||
|
||||
.datepicker-toggle-button:focus, .datepicker-toggle-button:hover {
|
||||
color: #3b71ca
|
||||
}
|
||||
|
||||
.datepicker-backdrop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0, 0, 0, .4);
|
||||
z-index: 1065
|
||||
}
|
||||
|
||||
.datepicker-dropdown-container {
|
||||
height: 380px;
|
||||
border-radius: .5rem
|
||||
}
|
||||
|
||||
.datepicker-dropdown-container, .datepicker-modal-container {
|
||||
width: 328px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 2px 15px -3px rgba(0, 0, 0, .07), 0 10px 20px -2px rgba(0, 0, 0, .04);
|
||||
z-index: 1066
|
||||
}
|
||||
|
||||
.datepicker-modal-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
height: 512px;
|
||||
border-radius: .6rem .6rem .5rem .5rem
|
||||
}
|
||||
|
||||
@media screen and (min-width: 320px)and (max-width: 820px)and (orientation: landscape) {
|
||||
.datepicker-modal-container .datepicker-header {
|
||||
height: 100%
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 320px)and (max-width: 820px)and (orientation: landscape) {
|
||||
.datepicker-modal-container .datepicker-date {
|
||||
margin-top: 100px
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 320px)and (max-width: 820px)and (orientation: landscape) {
|
||||
.datepicker-modal-container .datepicker-day-cell {
|
||||
width: 32x;
|
||||
height: 32x
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 320px)and (max-width: 820px)and (orientation: landscape) {
|
||||
.datepicker-modal-container {
|
||||
flex-direction: row;
|
||||
width: 475px;
|
||||
height: 360px
|
||||
}
|
||||
|
||||
.datepicker-modal-container.datepicker-day-cell {
|
||||
width: 36px;
|
||||
height: 36px
|
||||
}
|
||||
}
|
||||
|
||||
.datepicker-header {
|
||||
height: 120px;
|
||||
padding-right: 24px;
|
||||
padding-left: 24px;
|
||||
background-color: #3b71ca;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-radius: .5rem .5rem 0 0
|
||||
}
|
||||
|
||||
.datepicker-title {
|
||||
height: 32px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end
|
||||
}
|
||||
|
||||
.datepicker-title-text {
|
||||
font-size: 10px;
|
||||
font-weight: 400;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1.7px;
|
||||
color: #fff
|
||||
}
|
||||
|
||||
.datepicker-date {
|
||||
height: 72px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end
|
||||
}
|
||||
|
||||
.datepicker-date-text {
|
||||
font-size: 34px;
|
||||
font-weight: 400;
|
||||
color: #fff
|
||||
}
|
||||
|
||||
.datepicker-main {
|
||||
position: relative;
|
||||
height: 100%
|
||||
}
|
||||
|
||||
.datepicker-date-controls {
|
||||
padding: 10px 12px 0;
|
||||
display: flex;
|
||||
justify-content: space-between
|
||||
}
|
||||
|
||||
.datepicker-arrow, .datepicker-arrow-up {
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 5px solid transparent;
|
||||
border-right: 5px solid transparent;
|
||||
border-top-width: 5px;
|
||||
border-top-style: solid;
|
||||
margin: 0 0 0 5px;
|
||||
vertical-align: middle
|
||||
}
|
||||
|
||||
.datepicker-arrow-up {
|
||||
transform: rotate(180deg)
|
||||
}
|
||||
|
||||
.datepicker-date-controls {
|
||||
color: rgba(0, 0, 0, .64)
|
||||
}
|
||||
|
||||
.datepicker-view-change-button {
|
||||
padding: 10px;
|
||||
color: #666;
|
||||
font-weight: 500;
|
||||
font-size: .9rem;
|
||||
border-radius: 10px;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
margin: 0;
|
||||
border: none
|
||||
}
|
||||
|
||||
.datepicker-view-change-button:focus, .datepicker-view-change-button:hover {
|
||||
background-color: #eee
|
||||
}
|
||||
|
||||
.datepicker-view-change-button:after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 5px solid transparent;
|
||||
border-right: 5px solid transparent;
|
||||
border-top-width: 5px;
|
||||
border-top-style: solid;
|
||||
margin: 0 0 0 5px;
|
||||
vertical-align: middle
|
||||
}
|
||||
|
||||
.datepicker-arrow-controls {
|
||||
margin-top: 10px
|
||||
}
|
||||
|
||||
/*!rtl:begin:options:
|
||||
{
|
||||
"autoRename": true,
|
||||
"stringMap":[
|
||||
{
|
||||
"name" : "prev-next",
|
||||
"search" : ["datepicker-previous-button", "datepicker-next-button"],
|
||||
"replace" : ["datepicker-next-button", "datepicker-previous-button"],
|
||||
"options" : {"ignoreCase":false}
|
||||
}
|
||||
]
|
||||
}
|
||||
*/
|
||||
.datepicker-previous-button {
|
||||
position: relative;
|
||||
padding: 0;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border: none;
|
||||
outline: none;
|
||||
color: rgba(0, 0, 0, .64);
|
||||
background-color: transparent;
|
||||
margin: 0 24px 0 0
|
||||
}
|
||||
|
||||
.datepicker-previous-button:focus, .datepicker-previous-button:hover {
|
||||
background-color: #eee;
|
||||
border-radius: 50%
|
||||
}
|
||||
|
||||
.datepicker-previous-button:after {
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
content: "";
|
||||
margin: 15.5px;
|
||||
border-color: currentcolor;
|
||||
border-style: solid;
|
||||
border-width: 2px 0 0 2px;
|
||||
transform: translateX(2px) rotate(-45deg)
|
||||
}
|
||||
|
||||
.datepicker-next-button {
|
||||
position: relative;
|
||||
padding: 0;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border: none;
|
||||
outline: none;
|
||||
margin: 0;
|
||||
color: rgba(0, 0, 0, .64);
|
||||
background-color: transparent
|
||||
}
|
||||
|
||||
.datepicker-next-button:focus, .datepicker-next-button:hover {
|
||||
background-color: #eee;
|
||||
border-radius: 50%
|
||||
}
|
||||
|
||||
.datepicker-next-button:after {
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
content: "";
|
||||
margin: 15.5px;
|
||||
border-color: currentcolor;
|
||||
border-style: solid;
|
||||
border-width: 2px 2px 0 0;
|
||||
transform: translateX(-2px) rotate(45deg)
|
||||
}
|
||||
|
||||
/*!rtl:end:options*/
|
||||
.datepicker-view {
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
outline: none
|
||||
}
|
||||
|
||||
.datepicker-table {
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
width: 304px
|
||||
}
|
||||
|
||||
.datepicker-day-heading {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
font-weight: 400
|
||||
}
|
||||
|
||||
.datepicker-cell {
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.datepicker-cell.disabled {
|
||||
color: #ccc;
|
||||
cursor: default;
|
||||
pointer-events: none
|
||||
}
|
||||
|
||||
.datepicker-cell.disabled:hover {
|
||||
cursor: default
|
||||
}
|
||||
|
||||
.datepicker-cell:hover {
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
.datepicker-cell:not(.disabled):not(.selected):hover .datepicker-cell-content {
|
||||
background-color: #d3d3d3
|
||||
}
|
||||
|
||||
.datepicker-cell.selected .datepicker-cell-content {
|
||||
background-color: #3b71ca;
|
||||
color: #fff
|
||||
}
|
||||
|
||||
.datepicker-cell:not(.selected).focused .datepicker-cell-content {
|
||||
background-color: #eee
|
||||
}
|
||||
|
||||
.datepicker-cell.focused .datepicker-cell-content.selected {
|
||||
background-color: #3b71ca
|
||||
}
|
||||
|
||||
.datepicker-cell.current .datepicker-cell-content {
|
||||
border: 1px solid #000
|
||||
}
|
||||
|
||||
.datepicker-small-cell {
|
||||
width: 40px;
|
||||
height: 40px
|
||||
}
|
||||
|
||||
.datepicker-small-cell-content {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
border-radius: 50%;
|
||||
font-size: 13px
|
||||
}
|
||||
|
||||
.datepicker-large-cell {
|
||||
width: 76px;
|
||||
height: 42px
|
||||
}
|
||||
|
||||
.datepicker-large-cell-content {
|
||||
width: 72px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding: 1px 2px;
|
||||
border-radius: 999px
|
||||
}
|
||||
|
||||
.datepicker-footer, .datepicker-yearview-content {
|
||||
padding-left: 12px;
|
||||
padding-right: 12px
|
||||
}
|
||||
|
||||
.datepicker-footer {
|
||||
height: 56px;
|
||||
display: flex;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
justify-content: flex-end;
|
||||
align-items: center
|
||||
}
|
||||
|
||||
.datepicker-footer-btn {
|
||||
background-color: #fff;
|
||||
color: #3b71ca;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: 0 10px;
|
||||
text-transform: uppercase;
|
||||
font-size: .8rem;
|
||||
font-weight: 500;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
letter-spacing: .1rem;
|
||||
border-radius: 10px;
|
||||
margin-bottom: 10px
|
||||
}
|
||||
|
||||
.datepicker-footer-btn:focus, .datepicker-footer-btn:hover {
|
||||
background-color: #eee
|
||||
}
|
||||
|
||||
.datepicker-clear-btn {
|
||||
margin-right: auto
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -2,20 +2,15 @@ package cyou.chenx221.controller;
|
||||
|
||||
import cyou.chenx221.pojo.Student;
|
||||
import cyou.chenx221.service.StudentService;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.sql.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Controller
|
||||
@ -37,25 +32,44 @@ public class StudentController {
|
||||
}
|
||||
|
||||
@GetMapping("/queryinfo")//处理访问学生信息查询
|
||||
public String getQueryInfo(Model model) {
|
||||
public String getQueryInfo() {
|
||||
return "studentListQuery";
|
||||
}
|
||||
|
||||
@PostMapping(value = "/query", produces = "application/x-www-form-urlencoded;charset=UTF-8")//学生信息查询(带条件)
|
||||
public String getQueryStudents(@RequestParam(value = "name", defaultValue = "null", required = false) String name,
|
||||
@RequestParam(value = "birthday", defaultValue = "#{null}", required = false) Date birthday,
|
||||
@RequestParam(value = "birthday", defaultValue = "null", required = false) String birthdayStr,
|
||||
@RequestParam(value = "inlineRadioOptions", defaultValue = "null", required = false) String option,
|
||||
@RequestParam(value = "student-id", defaultValue = "-1", required = false) int id,
|
||||
@RequestParam(value = "phone", defaultValue = "null", required = false) String phone,
|
||||
@RequestParam(value = "classes", defaultValue = "", required = false) List<String> classes,
|
||||
Model model) {
|
||||
Date birthday = null;
|
||||
if (!"null".equals(birthdayStr)) {
|
||||
birthday = Date.valueOf(birthdayStr);
|
||||
}
|
||||
// System.out.println(birthday);//debug
|
||||
List<Student> students;
|
||||
Student student;
|
||||
if (classes.size() == 0) {
|
||||
if (name.equals("null")) name = null;
|
||||
if (option.equals("null")) option = null;
|
||||
if (phone.equals("null")) phone = null;
|
||||
student = new Student(id, name, option, birthday, phone);
|
||||
System.out.println("id:" + student.getId() + " name:" + student.getName() + " sex:" + student.getSex() + " birthday:" + student.getBirthday() + " phone:" + student.getPhone());
|
||||
if (student.getId() == null) {
|
||||
System.out.println("id is null");
|
||||
}
|
||||
if (student.getName() == null) {
|
||||
System.out.println("name is null");
|
||||
}
|
||||
if (student.getSex() == null) {
|
||||
System.out.println("sex is null");
|
||||
}
|
||||
if (student.getBirthday() == null) {
|
||||
System.out.println("birthday is null");
|
||||
}
|
||||
if (student.getPhone() == null) {
|
||||
System.out.println("phone is null");
|
||||
}
|
||||
|
||||
students = studentService.getQueryStudents(student);
|
||||
} else {
|
||||
if (classes.size() == 1 && classes.get(0).equals("")) classes = null;
|
||||
@ -80,12 +94,17 @@ public class StudentController {
|
||||
|
||||
@PostMapping(value = "/modinfo", produces = "application/x-www-form-urlencoded;charset=UTF-8")//处理学生信息修改请求
|
||||
public String UpdateModInfo(@RequestParam(value = "name", defaultValue = "null", required = false) String name,
|
||||
@RequestParam(value = "birthday", defaultValue = "#{null}", required = false) Date birthday,
|
||||
@RequestParam(value = "birthday", defaultValue = "null", required = false) String birthdayStr,
|
||||
@RequestParam(value = "sex", defaultValue = "null", required = false) String sex,
|
||||
@RequestParam(value = "id", defaultValue = "-1", required = false) int id,
|
||||
@RequestParam(value = "phone", defaultValue = "null", required = false) String phone,
|
||||
@RequestParam(value = "classes", defaultValue = "", required = false) String classes,
|
||||
Model model) {
|
||||
Date birthday = null;
|
||||
if (!"null".equals(birthdayStr)) {
|
||||
birthday = Date.valueOf(birthdayStr);
|
||||
}
|
||||
System.out.println(birthday);//debug
|
||||
Student student;
|
||||
if (name.equals("null")) name = null;
|
||||
if (sex.equals("null")) sex = null;
|
||||
@ -99,7 +118,7 @@ public class StudentController {
|
||||
studentService.updateStudent(student);
|
||||
model.addAttribute("successMessage", "学生信息修改成功");
|
||||
}
|
||||
return "redirect:/student/modstep1";
|
||||
return "redirect:/student/infomodv2";
|
||||
}
|
||||
|
||||
@GetMapping("/infomodv2")//处理学生信息修改页
|
||||
@ -115,7 +134,7 @@ public class StudentController {
|
||||
}
|
||||
|
||||
@PostMapping(value = "/delinfo", produces = "application/x-www-form-urlencoded;charset=UTF-8")
|
||||
public String UpdateModInfo(@RequestParam(value = "id", defaultValue = "-1", required = false) int id,
|
||||
public String UpdateModInfo(@RequestParam(value = "id") int id,
|
||||
Model model) {
|
||||
Student temp = studentService.getStudentById(id);
|
||||
if (id <= 0 || temp == null) {
|
||||
@ -129,25 +148,25 @@ public class StudentController {
|
||||
}
|
||||
|
||||
@PostMapping(value = "/addinfo", produces = "application/x-www-form-urlencoded;charset=UTF-8")
|
||||
public String InsertStudentInfo(@RequestParam(value = "name", defaultValue = "null", required = false) String name,
|
||||
@RequestParam(value = "birthday", defaultValue = "#{null}", required = false) Date birthday,
|
||||
@RequestParam(value = "sex", defaultValue = "null", required = false) String sex,
|
||||
@RequestParam(value = "phone", defaultValue = "null", required = false) String phone,
|
||||
@RequestParam(value = "classes", defaultValue = "", required = false) String classes,
|
||||
public String InsertStudentInfo(@RequestParam(value = "name") String name,
|
||||
@RequestParam(value = "birthday") Date birthday,
|
||||
@RequestParam(value = "sex") String sex,
|
||||
@RequestParam(value = "phone") String phone,
|
||||
@RequestParam(value = "classes") String classes,
|
||||
Model model) {
|
||||
Student student;
|
||||
if (name.equals("null")) name = null;
|
||||
if (sex.equals("null")) sex = null;
|
||||
if (phone.equals("null")) phone = null;
|
||||
if (classes.equals("")) classes = null;
|
||||
String classesPattern = "[1-5]班";// 使用正则表达式验证班级格式
|
||||
|
||||
if (id <= -1) {
|
||||
model.addAttribute("errorMessage", "学生信息修改失败");
|
||||
//格式合法性检查
|
||||
if (!sex.equals("男") && !sex.equals("女")) {
|
||||
model.addAttribute("errorMessage", "性别格式不正确,仅允许'男'或'女'");
|
||||
} else if (!classes.matches(classesPattern)) {
|
||||
model.addAttribute("errorMessage", "班级格式不正确,格式应为?班(?为1~5之间的数字)");
|
||||
} else {
|
||||
student = new Student(id, name, sex, birthday, phone, classes);
|
||||
studentService.updateStudent(student);
|
||||
model.addAttribute("successMessage", "学生信息修改成功");
|
||||
student = new Student(name, sex, birthday, phone, classes);
|
||||
studentService.insertStudent(student);
|
||||
model.addAttribute("successMessage", "学生信息添加成功");
|
||||
}
|
||||
return "redirect:/student/modstep1";
|
||||
return "redirect:/student/infomodv2";
|
||||
}
|
||||
}
|
||||
|
@ -2,15 +2,11 @@ package cyou.chenx221.mapper.impl;
|
||||
|
||||
import cyou.chenx221.mapper.StudentDao;
|
||||
import cyou.chenx221.pojo.Student;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Repository
|
||||
public class StudentDaoImpl implements StudentDao {
|
||||
|
@ -2,7 +2,8 @@ package cyou.chenx221.pojo;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.sql.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class Student {
|
||||
@ -109,4 +110,11 @@ public class Student {
|
||||
this.classes = classes;
|
||||
}
|
||||
|
||||
public Student(String name, String sex, Date birthday, String phone, String classes) {
|
||||
this.name = name;
|
||||
this.sex = sex;
|
||||
this.birthday = birthday;
|
||||
this.phone = phone;
|
||||
this.classes = classes;
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ import cyou.chenx221.mapper.StudentDao;
|
||||
import cyou.chenx221.pojo.Student;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@ -42,4 +41,8 @@ public class StudentService {
|
||||
public void updateStudent(Student student) {
|
||||
studentDao.updateStudent(student);
|
||||
}
|
||||
|
||||
public void insertStudent(Student student) {
|
||||
studentDao.insertStudent(student);
|
||||
}
|
||||
}
|
||||
|
@ -17,19 +17,19 @@
|
||||
<select id="getQueryStudents" parameterType="cyou.chenx221.pojo.Student" resultType="cyou.chenx221.pojo.Student">
|
||||
SELECT * FROM student
|
||||
WHERE 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<if test="name != null and name != '' and name != 'null'">
|
||||
AND name = #{name}
|
||||
</if>
|
||||
<if test="sex != null and sex != ''">
|
||||
<if test="sex != null and sex != '' and sex != 'null'">
|
||||
AND sex = #{sex}
|
||||
</if>
|
||||
<if test="birthday != null">
|
||||
AND birthday = #{birthday}
|
||||
</if>
|
||||
<if test="phone != null and phone != ''">
|
||||
<if test="phone != null and phone != '' and phone != 'null'">
|
||||
AND phone = #{phone}
|
||||
</if>
|
||||
<if test="id != -1">
|
||||
<if test="id != null and id != -1">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
</select>
|
||||
@ -64,5 +64,11 @@
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 添加学生信息记录 -->
|
||||
<insert id="insertStudent" parameterType="cyou.chenx221.pojo.Student">
|
||||
INSERT INTO student (name, birthday, sex, phone, classes)
|
||||
VALUES (#{name}, #{birthday}, #{sex}, #{phone}, #{classes})
|
||||
</insert>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
@ -129,11 +129,7 @@
|
||||
style="background-image: url('${pageContext.request.contextPath}/resources/img/jason-blackeye-nyL-rzwP-Mk-unsplash.jpg'); margin-top: -58.59px;">
|
||||
<div class="mask d-flex align-items-center h-100" style="background-color: hsla(0, 0%, 100%, 0.5);">
|
||||
<div class="container d-flex justify-content-center">
|
||||
<button type="button" class="btn btn-primary" onclick="function goBack() {
|
||||
window.history.back();
|
||||
}
|
||||
goBack()">返回
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard'">返回</button>
|
||||
<div class="table-container rounded-4 shadow-3-strong"
|
||||
style="background-color: rgba(255,255,255,0.9); overflow-y: auto; max-height: 400px;">
|
||||
<table class="table table-striped table-hover border-primary">
|
||||
|
@ -14,7 +14,6 @@
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap"
|
||||
rel="stylesheet">
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/mdb.min.css"/>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/datepicker.min.css"/>
|
||||
<style>
|
||||
.table-container {
|
||||
min-width: 80vw;
|
||||
@ -162,8 +161,8 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 mb-4">
|
||||
<div class="form-outline datepicker">
|
||||
<input type="text" class="form-control" id="birthdayDate" name="birthday"/>
|
||||
<div class="form-outline">
|
||||
<input type="date" class="form-control" id="birthdayDate" name="birthday"/>
|
||||
<label for="birthdayDate" class="form-label">出生日期</label>
|
||||
</div>
|
||||
</div>
|
||||
@ -253,7 +252,6 @@
|
||||
|
||||
|
||||
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/mdb.min.js"></script>
|
||||
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/datepicker.min.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
|
@ -15,7 +15,6 @@
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap"
|
||||
rel="stylesheet">
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/mdb.min.css"/>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/datepicker.min.css"/>
|
||||
<style>
|
||||
.table-container {
|
||||
min-width: 60vw; /* 设置最小宽度为视窗宽度的80% */
|
||||
@ -192,8 +191,8 @@
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-12">
|
||||
<div class="form-outline datepicker">
|
||||
<input type="text" id="typeText4" class="form-control"
|
||||
<div class="form-outline">
|
||||
<input type="date" id="typeText4" class="form-control"
|
||||
name="birthday"/>
|
||||
<label class="form-label" for="typeText4">出生日期</label>
|
||||
</div>
|
||||
@ -287,7 +286,6 @@
|
||||
|
||||
|
||||
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/mdb.min.js"></script>
|
||||
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/datepicker.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
<%-- 判断模型中是否存在错误信息 --%>
|
||||
|
@ -129,11 +129,7 @@
|
||||
style="background-image: url('${pageContext.request.contextPath}/resources/img/jason-blackeye-nyL-rzwP-Mk-unsplash.jpg'); margin-top: -58.59px;">
|
||||
<div class="mask d-flex align-items-center h-100" style="background-color: hsla(0, 0%, 100%, 0.5);">
|
||||
<div class="container d-flex justify-content-center">
|
||||
<button type="button" class="btn btn-primary" onclick="function goBack() {
|
||||
window.history.back();
|
||||
}
|
||||
goBack()">返回
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" onclick="location.href='../dashboard'">返回</button>
|
||||
<div class="table-container rounded-4 shadow-3-strong"
|
||||
style="background-color: rgba(255,255,255,0.9); overflow-y: auto; max-height: 400px;">
|
||||
<table class="table table-striped table-hover border-primary">
|
||||
|
@ -15,7 +15,6 @@
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap"
|
||||
rel="stylesheet">
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/mdb.min.css"/>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/datepicker.min.css"/>
|
||||
<style>
|
||||
.table-container {
|
||||
min-width: 60vw;
|
||||
@ -179,13 +178,22 @@
|
||||
</li>
|
||||
</ul>
|
||||
<!-- Tabs navs -->
|
||||
<hr class="hr" style="margin: 1px" />
|
||||
<hr class="hr" style="margin: 1px"/>
|
||||
<!-- Tabs content -->
|
||||
<div class="tab-content" id="ex1-content">
|
||||
<div class="tab-pane fade show active" id="ex1-tabs-1" role="tabpanel"
|
||||
aria-labelledby="ex1-tab-1">
|
||||
<div class="card-body" style="min-width: 175px">
|
||||
<form action="modinfo" method="post">
|
||||
<div class="row mb-2">
|
||||
<div class="col-12">
|
||||
<div class="form-outline">
|
||||
<input type="number" id="typeText1" class="form-control"
|
||||
required name="id"/>
|
||||
<label class="form-label" for="typeText1">ID (必填)</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-12">
|
||||
<div class="form-outline">
|
||||
@ -206,8 +214,8 @@
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-12">
|
||||
<div class="form-outline datepicker">
|
||||
<input type="text" id="typeText4" class="form-control"
|
||||
<div class="form-outline">
|
||||
<input type="date" id="typeText4" class="form-control"
|
||||
name="birthday"/>
|
||||
<label class="form-label" for="typeText4">出生日期</label>
|
||||
</div>
|
||||
@ -272,16 +280,7 @@
|
||||
<div class="tab-pane fade" id="ex1-tabs-3" role="tabpanel" aria-labelledby="ex1-tab-3">
|
||||
<!-- <h5 class="card-header">信息添加</h5> -->
|
||||
<div class="card-body" style="min-width: 175px">
|
||||
<form action="modinfo" method="post">
|
||||
<div class="row mb-2">
|
||||
<div class="col-12">
|
||||
<div class="form-outline">
|
||||
<input type="number" id="typeText8" class="form-control"
|
||||
required name="id"/>
|
||||
<label class="form-label" for="typeText8">ID (必填)</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form action="addinfo" method="post">
|
||||
<div class="row mb-2">
|
||||
<div class="col-12">
|
||||
<div class="form-outline">
|
||||
@ -303,8 +302,8 @@
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-12">
|
||||
<div class="form-outline datepicker">
|
||||
<input type="text" id="typeText11" class="form-control"
|
||||
<div class="form-outline">
|
||||
<input type="date" id="typeText11" class="form-control"
|
||||
name="birthday"/>
|
||||
<label class="form-label" for="typeText11">出生日期 (必填)</label>
|
||||
</div>
|
||||
@ -332,7 +331,7 @@
|
||||
<div class="col-lg-6 text-center">
|
||||
<button type="submit" class="btn btn-primary"
|
||||
data-mdb-toggle="tooltip" data-mdb-placement="top"
|
||||
title="留空为不做修改">更改
|
||||
title="留空为不做修改">添加
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-lg-6 text-center">
|
||||
@ -405,7 +404,6 @@
|
||||
|
||||
|
||||
<script type="text/javascript" src="../../resources/js/mdb.min.js"></script>
|
||||
<script type="text/javascript" src="../../resources/js/datepicker.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
// 判断模型中是否存在错误信息
|
||||
|
384
project2/web/resources/css/datepicker.min.css
vendored
384
project2/web/resources/css/datepicker.min.css
vendored
@ -1,384 +0,0 @@
|
||||
.datepicker-toggle-button {
|
||||
position: absolute;
|
||||
outline: none;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
right: -10px;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%)
|
||||
}
|
||||
|
||||
.datepicker-toggle-button:focus, .datepicker-toggle-button:hover {
|
||||
color: #3b71ca
|
||||
}
|
||||
|
||||
.datepicker-backdrop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0, 0, 0, .4);
|
||||
z-index: 1065
|
||||
}
|
||||
|
||||
.datepicker-dropdown-container {
|
||||
height: 380px;
|
||||
border-radius: .5rem
|
||||
}
|
||||
|
||||
.datepicker-dropdown-container, .datepicker-modal-container {
|
||||
width: 328px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 2px 15px -3px rgba(0, 0, 0, .07), 0 10px 20px -2px rgba(0, 0, 0, .04);
|
||||
z-index: 1066
|
||||
}
|
||||
|
||||
.datepicker-modal-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
height: 512px;
|
||||
border-radius: .6rem .6rem .5rem .5rem
|
||||
}
|
||||
|
||||
@media screen and (min-width: 320px)and (max-width: 820px)and (orientation: landscape) {
|
||||
.datepicker-modal-container .datepicker-header {
|
||||
height: 100%
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 320px)and (max-width: 820px)and (orientation: landscape) {
|
||||
.datepicker-modal-container .datepicker-date {
|
||||
margin-top: 100px
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 320px)and (max-width: 820px)and (orientation: landscape) {
|
||||
.datepicker-modal-container .datepicker-day-cell {
|
||||
width: 32x;
|
||||
height: 32x
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 320px)and (max-width: 820px)and (orientation: landscape) {
|
||||
.datepicker-modal-container {
|
||||
flex-direction: row;
|
||||
width: 475px;
|
||||
height: 360px
|
||||
}
|
||||
|
||||
.datepicker-modal-container.datepicker-day-cell {
|
||||
width: 36px;
|
||||
height: 36px
|
||||
}
|
||||
}
|
||||
|
||||
.datepicker-header {
|
||||
height: 120px;
|
||||
padding-right: 24px;
|
||||
padding-left: 24px;
|
||||
background-color: #3b71ca;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-radius: .5rem .5rem 0 0
|
||||
}
|
||||
|
||||
.datepicker-title {
|
||||
height: 32px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end
|
||||
}
|
||||
|
||||
.datepicker-title-text {
|
||||
font-size: 10px;
|
||||
font-weight: 400;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1.7px;
|
||||
color: #fff
|
||||
}
|
||||
|
||||
.datepicker-date {
|
||||
height: 72px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end
|
||||
}
|
||||
|
||||
.datepicker-date-text {
|
||||
font-size: 34px;
|
||||
font-weight: 400;
|
||||
color: #fff
|
||||
}
|
||||
|
||||
.datepicker-main {
|
||||
position: relative;
|
||||
height: 100%
|
||||
}
|
||||
|
||||
.datepicker-date-controls {
|
||||
padding: 10px 12px 0;
|
||||
display: flex;
|
||||
justify-content: space-between
|
||||
}
|
||||
|
||||
.datepicker-arrow, .datepicker-arrow-up {
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 5px solid transparent;
|
||||
border-right: 5px solid transparent;
|
||||
border-top-width: 5px;
|
||||
border-top-style: solid;
|
||||
margin: 0 0 0 5px;
|
||||
vertical-align: middle
|
||||
}
|
||||
|
||||
.datepicker-arrow-up {
|
||||
transform: rotate(180deg)
|
||||
}
|
||||
|
||||
.datepicker-date-controls {
|
||||
color: rgba(0, 0, 0, .64)
|
||||
}
|
||||
|
||||
.datepicker-view-change-button {
|
||||
padding: 10px;
|
||||
color: #666;
|
||||
font-weight: 500;
|
||||
font-size: .9rem;
|
||||
border-radius: 10px;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
margin: 0;
|
||||
border: none
|
||||
}
|
||||
|
||||
.datepicker-view-change-button:focus, .datepicker-view-change-button:hover {
|
||||
background-color: #eee
|
||||
}
|
||||
|
||||
.datepicker-view-change-button:after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 5px solid transparent;
|
||||
border-right: 5px solid transparent;
|
||||
border-top-width: 5px;
|
||||
border-top-style: solid;
|
||||
margin: 0 0 0 5px;
|
||||
vertical-align: middle
|
||||
}
|
||||
|
||||
.datepicker-arrow-controls {
|
||||
margin-top: 10px
|
||||
}
|
||||
|
||||
/*!rtl:begin:options:
|
||||
{
|
||||
"autoRename": true,
|
||||
"stringMap":[
|
||||
{
|
||||
"name" : "prev-next",
|
||||
"search" : ["datepicker-previous-button", "datepicker-next-button"],
|
||||
"replace" : ["datepicker-next-button", "datepicker-previous-button"],
|
||||
"options" : {"ignoreCase":false}
|
||||
}
|
||||
]
|
||||
}
|
||||
*/
|
||||
.datepicker-previous-button {
|
||||
position: relative;
|
||||
padding: 0;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border: none;
|
||||
outline: none;
|
||||
color: rgba(0, 0, 0, .64);
|
||||
background-color: transparent;
|
||||
margin: 0 24px 0 0
|
||||
}
|
||||
|
||||
.datepicker-previous-button:focus, .datepicker-previous-button:hover {
|
||||
background-color: #eee;
|
||||
border-radius: 50%
|
||||
}
|
||||
|
||||
.datepicker-previous-button:after {
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
content: "";
|
||||
margin: 15.5px;
|
||||
border-color: currentcolor;
|
||||
border-style: solid;
|
||||
border-width: 2px 0 0 2px;
|
||||
transform: translateX(2px) rotate(-45deg)
|
||||
}
|
||||
|
||||
.datepicker-next-button {
|
||||
position: relative;
|
||||
padding: 0;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border: none;
|
||||
outline: none;
|
||||
margin: 0;
|
||||
color: rgba(0, 0, 0, .64);
|
||||
background-color: transparent
|
||||
}
|
||||
|
||||
.datepicker-next-button:focus, .datepicker-next-button:hover {
|
||||
background-color: #eee;
|
||||
border-radius: 50%
|
||||
}
|
||||
|
||||
.datepicker-next-button:after {
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
content: "";
|
||||
margin: 15.5px;
|
||||
border-color: currentcolor;
|
||||
border-style: solid;
|
||||
border-width: 2px 2px 0 0;
|
||||
transform: translateX(-2px) rotate(45deg)
|
||||
}
|
||||
|
||||
/*!rtl:end:options*/
|
||||
.datepicker-view {
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
outline: none
|
||||
}
|
||||
|
||||
.datepicker-table {
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
width: 304px
|
||||
}
|
||||
|
||||
.datepicker-day-heading {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
font-weight: 400
|
||||
}
|
||||
|
||||
.datepicker-cell {
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.datepicker-cell.disabled {
|
||||
color: #ccc;
|
||||
cursor: default;
|
||||
pointer-events: none
|
||||
}
|
||||
|
||||
.datepicker-cell.disabled:hover {
|
||||
cursor: default
|
||||
}
|
||||
|
||||
.datepicker-cell:hover {
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
.datepicker-cell:not(.disabled):not(.selected):hover .datepicker-cell-content {
|
||||
background-color: #d3d3d3
|
||||
}
|
||||
|
||||
.datepicker-cell.selected .datepicker-cell-content {
|
||||
background-color: #3b71ca;
|
||||
color: #fff
|
||||
}
|
||||
|
||||
.datepicker-cell:not(.selected).focused .datepicker-cell-content {
|
||||
background-color: #eee
|
||||
}
|
||||
|
||||
.datepicker-cell.focused .datepicker-cell-content.selected {
|
||||
background-color: #3b71ca
|
||||
}
|
||||
|
||||
.datepicker-cell.current .datepicker-cell-content {
|
||||
border: 1px solid #000
|
||||
}
|
||||
|
||||
.datepicker-small-cell {
|
||||
width: 40px;
|
||||
height: 40px
|
||||
}
|
||||
|
||||
.datepicker-small-cell-content {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
border-radius: 50%;
|
||||
font-size: 13px
|
||||
}
|
||||
|
||||
.datepicker-large-cell {
|
||||
width: 76px;
|
||||
height: 42px
|
||||
}
|
||||
|
||||
.datepicker-large-cell-content {
|
||||
width: 72px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding: 1px 2px;
|
||||
border-radius: 999px
|
||||
}
|
||||
|
||||
.datepicker-footer, .datepicker-yearview-content {
|
||||
padding-left: 12px;
|
||||
padding-right: 12px
|
||||
}
|
||||
|
||||
.datepicker-footer {
|
||||
height: 56px;
|
||||
display: flex;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
justify-content: flex-end;
|
||||
align-items: center
|
||||
}
|
||||
|
||||
.datepicker-footer-btn {
|
||||
background-color: #fff;
|
||||
color: #3b71ca;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: 0 10px;
|
||||
text-transform: uppercase;
|
||||
font-size: .8rem;
|
||||
font-weight: 500;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
letter-spacing: .1rem;
|
||||
border-radius: 10px;
|
||||
margin-bottom: 10px
|
||||
}
|
||||
|
||||
.datepicker-footer-btn:focus, .datepicker-footer-btn:hover {
|
||||
background-color: #eee
|
||||
}
|
||||
|
||||
.datepicker-clear-btn {
|
||||
margin-right: auto
|
||||
}
|
File diff suppressed because one or more lines are too long
2
project2/web/resources/js/datepicker.min.js
vendored
2
project2/web/resources/js/datepicker.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user