-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
executable file
·191 lines (176 loc) · 6.26 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="stylesheets/simple-calendar.css">
<style>
body {
width: 100%;
height: 100%;
}
*{
padding: 0;
margin: 0;
}
.clearflx:after {
content: "";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.badge-important {
background-color: #FB6B5B;
}
.badge {
padding-right: 9px;
padding-left: 9px;
-webkit-border-radius: 9px;
-moz-border-radius: 9px;
border-radius: 9px;
}
.label, .badge {
display: inline-block;
padding: 2px 4px;
font-size: 11.844px;
font-weight: bold;
line-height: 14px;
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
white-space: nowrap;
vertical-align: baseline;
background-color: #FB6B5B;
}
.sc-calendar{
box-shadow: none;
border-top:1px solid #f5d838;
}
.sc-header{
height: 46px;
background: #f5f5f5;
padding-top: 10px;
}
.sc-actions{
height: 28px;
padding: 0 10px;
border: 1px solid #afafb3;
border-radius: 28px;
margin-left: 10px;
}
.sc-actions div{
padding-bottom: 0;
line-height: 1em;
}
.sc-item {
height: 20%;
color: #646466;
}
.sc-week{
border-bottom: 2px solid #f0f0f0;
}
.sc-week-item {
background: #ffffff;
border: none;
font-size: 16px;
color: #333;
font-weight: 700;
}
.sc-week-item:nth-child(7n), .sc-week-item:nth-child(7n+6) {
color: #333 !important;
}
.sc-item:nth-child(7n) .day, .sc-item:nth-child(7n+6) .day {
color: #646466;
}
.sc-today{
background: none;
border-width: 0 0 1px 1px;
border-color: #F1EBE4;
}
.sc-today .day{
color: #276cb5 !important;
}
.badge{
min-width: 10px;
}
.sc-mark{
background: none;
}
</style>
</head>
<body>
<div id="content-wrapper">
<div class="inner clearfix">
<div style="width: 400px;height:400px;float: left"></div>
<div id='calendar'></div>
</div>
</div>
</body>
</html>
<script type="text/javascript" src="javascripts/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="javascripts/simple-calendar.js"></script>
<script type="text/javascript">
var myCalendar = new SimpleCalendar('#calendar');
function showTooltips($this) {
var self = $this[0];
var text = $this.attr("tips");
$.pt({
target: self,
position: 'l', //提示框相对目标元素位置 t=top,b=bottom,r=right,l=left
align: 'c', //提示框与目标元素的对齐方式,自动调节箭头显示位置,指向目标元素中间位置
content: text
});
}
$(document).ready(function () {
myCalendar.updateSize('500px', '345px');
myCalendar.showLunarFestival(true);
myCalendar.addMark('', [{day: '2018-7-17', value: ['wwwq', 'hhhh', 'uuuu', 'iiiii']},
{day: '2018-7-18', value: ['333']},
{day: '2018-8-19', value: ['i666ii']}
]);
// myCalendar.addMark('2018-07-7',"rrrr");
// myCalendar.addDelay('2018-05-17', "test");
//日历添加点击事件
$(".sc-item").on("click", function () {
var calYear = $(".sc-select-year option:selected").val();
var calMonth = $(".sc-select-month option:selected").val();
var calDay = $(this).find(".day").text();
console.info("calDay" + calDay + ":calYear+" + calYear + "month" + calMonth);
if ($(this).hasClass("sc-othermenth")) {
return false;
/*if (calDay > 20) {
window.location.href = "/pms/a/workcal/pmWorkCalendar/form?searchDate=" + calYear + "-" + (parseInt(calMonth) - 1) + "-" + calDay;
return false;
} else if (calDay < 10) {
window.location.href = "/pms/a/workcal/pmWorkCalendar/form?searchDate=" + calYear + "-" + (parseInt(calMonth) + 1) + "-" + calDay;
return false;
}*/
}
alert(1)
//window.location.href = "/pms/a/workcal/pmWorkCalendar/form?searchDate=" + calYear + "-" + calMonth + "-" + calDay;
})
});
function itemCount(month,year){
alert(month+'===='+year)
// $.get("/pms/a/workcal/pmWorkCalendar/monthCount?year=" + year + "&month=" + month, function(data) {
// var returnMess = $.parseJSON(data);
// if (returnMess.messType == "Success") {
// myCalendar.clearMark();
// returnMess = $.parseJSON(returnMess.value);
// var infoArray = new Array();
// for ( var i in returnMess) {
// var info = {};
// info.day = year + '-' + returnMess[i].month + '-' + returnMess[i].day;
// info.value = returnMess[i].count;
// info.delayCount = returnMess[i].delayCount;
// infoArray.push(info);
// }
// myCalendar.addMark('', infoArray,month,year);
// myCalendar.addDelay('', infoArray,month,year);
// } else {
// alertx(returnMess.message);
// }
// });
}
</script>