-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
341 lines (314 loc) · 12.4 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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1">
<title> My Calendar </title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<link href="css/dailog.css" rel="stylesheet" type="text/css" />
<link href="css/calendar.css" rel="stylesheet" type="text/css" />
<link href="css/dp.css" rel="stylesheet" type="text/css" />
<link href="css/alert.css" rel="stylesheet" type="text/css" />
<link href="css/main.css" rel="stylesheet" type="text/css" />
<script src="src/jquery.js" type="text/javascript"></script>
<script src="src/Plugins/Common.js" type="text/javascript"></script>
<script src="src/Plugins/datepicker_lang_CHS.js" type="text/javascript"></script>
<script src="src/Plugins/jquery.datepicker.js" type="text/javascript"></script>
<script src="src/Plugins/jquery.alert.js" type="text/javascript"></script>
<script src="src/Plugins/jquery.ifrmdailog.js" defer="defer" type="text/javascript"></script>
<script src="src/Plugins/wdCalendar_lang_CHS.js" type="text/javascript"></script>
<script src="src/Plugins/jquery.calendar.js" type="text/javascript"></script>
<style type="text/css">
.showpop {
width: 400px;
position: absolute;
top: 40%;
left: 25%;
display: none;
}
</style>
<script type="text/javascript">
$(document).ready(function () {
var jsondata = "json/br.json";
//"json/bc.json"
//"json/qt.json"
//"json/bmld.json"
var view = "day";
var DATA_FEED_URL = "php/datafeed.php";
var op = {
view:view,
theme:3,
showday:new Date(),
EditCmdhandler:Edit,
DeleteCmdhandler:Delete,
ViewCmdhandler:View,
onWeekOrMonthToDay:wtd,
onBeforeRequestData:cal_beforerequest,
onAfterRequestData:cal_afterrequest,
onRequestDataError:cal_onerror,
autoload:true,
//[id,title,start,end,全天日程,跨日日程,循环日程,theme,'地点','参与人']
//url:DATA_FEED_URL + "?method=list",
url:jsondata, //数据接口
quickAddUrl:DATA_FEED_URL + "?method=add", //快速新建日程的
quickUpdateUrl:DATA_FEED_URL + "?method=update", //快速更新日程的
quickDeleteUrl:DATA_FEED_URL + "?method=remove"//快速删除日程的
};
var $dv = $("#calhead");
var _MH = document.documentElement.clientHeight;
var dvH = $dv.height() + 2;
op.height = _MH - dvH;
op.eventItems = [];
var p = $("#gridcontainer").bcalendar(op).BcalGetOp();
if (p && p.datestrshow) {
$("#txtdatetimeshow").text(p.datestrshow);
}
$("#caltoolbar").noSelect();
$("#hdtxtshow").datepicker({ picker:"#txtdatetimeshow", showtarget:$("#txtdatetimeshow"),
onReturn:function (r) {
var p = $("#gridcontainer").gotoDate(r).BcalGetOp();
if (p && p.datestrshow) {
$("#txtdatetimeshow").text(p.datestrshow);
}
}
});
function cal_beforerequest(type) {
var t = "正在加载数据...";
switch (type) {
case 1:
t = "正在加载数据...";
break;
case 2:
case 3:
case 4:
t = "正在处理请求...";
break;
}
$("#errorpannel").hide();
$("#loadingpannel").html(t).show();
}
function cal_afterrequest(type) {
switch (type) {
case 1:
$("#loadingpannel").hide();
break;
case 2:
case 3:
case 4:
$("#loadingpannel").html("成功!");
window.setTimeout(function () {
$("#loadingpannel").hide();
}, 2000);
break;
}
}
function cal_onerror(type, data) {
$("#errorpannel").show();
}
function Edit(data) {
var eurl = "edit.php?id={0}&start={2}&end={3}&isallday={4}&title={1}";
if (data) {
var url = StrFormat(eurl, data);
OpenModelWindow(url, { width:600, height:400, caption:"日程详情", onclose:function () {
$("#gridcontainer").reload();
}});
}
}
function View(data) {
var str = "";
$.each(data, function (i, item) {
str += "[" + i + "]: " + item + "\n";
});
alert(str);
}
function Delete(data, callback) {
$.alerts.okButton = "确定";
$.alerts.cancelButton = "取消";
hiConfirm("你是否确定删除此事件", 'Confirm', function (r) {
r && callback(0);
});
}
function wtd(p) {
if (p && p.datestrshow) {
$("#txtdatetimeshow").text(p.datestrshow);
}
$("#caltoolbar div.fcurrent").each(function () {
$(this).removeClass("fcurrent");
})
$("#showdaybtn").addClass("fcurrent");
}
//显示日视图
$("#showdaybtn").click(function (e) {
//document.location.href="#day";
$("#caltoolbar div.fcurrent").each(function () {
$(this).removeClass("fcurrent");
})
$(this).addClass("fcurrent");
var p = $("#gridcontainer").swtichView("day").BcalGetOp();
if (p && p.datestrshow) {
$("#txtdatetimeshow").text(p.datestrshow);
}
});
//显示周视图
$("#showweekbtn").click(function (e) {
//document.location.href="#week";
$("#caltoolbar div.fcurrent").each(function () {
$(this).removeClass("fcurrent");
})
$(this).addClass("fcurrent");
var p = $("#gridcontainer").swtichView("week").BcalGetOp();
if (p && p.datestrshow) {
$("#txtdatetimeshow").text(p.datestrshow);
}
});
//显示月视图
$("#showmonthbtn").click(function (e) {
//document.location.href="#month";
$("#caltoolbar div.fcurrent").each(function () {
$(this).removeClass("fcurrent");
})
$(this).addClass("fcurrent");
var p = $("#gridcontainer").swtichView("month").BcalGetOp();
if (p && p.datestrshow) {
$("#txtdatetimeshow").text(p.datestrshow);
}
});
//刷新
$("#showreflashbtn").click(function (e) {
$("#gridcontainer").reload();
});
//新增日程
$("#faddbtn").click(function (e) {
var url = "edit.php";
OpenModelWindow(url, { width:500, height:400, caption:"创建新日程"});
});
//代填日程
$("#dtbtn").click(function (e) {
var url = "dtedit.php";
OpenModelWindow(url, { width:500, height:400, caption:"代填新日程"});
});
//回到今天
$("#showtodaybtn").click(function (e) {
var p = $("#gridcontainer").gotoDate().BcalGetOp();
if (p && p.datestrshow) {
$("#txtdatetimeshow").text(p.datestrshow);
}
});
//上一个
$("#sfprevbtn").click(function (e) {
var p = $("#gridcontainer").previousRange().BcalGetOp();
if (p && p.datestrshow) {
$("#txtdatetimeshow").text(p.datestrshow);
}
});
//下一个
$("#sfnextbtn").click(function (e) {
var p = $("#gridcontainer").nextRange().BcalGetOp();
if (p && p.datestrshow) {
$("#txtdatetimeshow").text(p.datestrshow);
}
});
//显示选择处室人员
$("#showds").click(function () {
$(".showpop").show().click(function () {
$(this).hide();
});
});
//显示本人
$("#user").click(function () {
window.location = "index.html#content";
});
//显示本处
$("#room").click(function () {
window.location = "bc.html#content";
});
//显示全厅
$("#home").click(function () {
window.location = "qt.html#content";
});
//部门领导
$("#bmld").click(function () {
window.location = "bmld.html#content";
});
});
</script>
</head>
<body>
<div style="width:1000px;height:410px; margin:0 auto -27px; display:block; position: relative;">
<img id="showds" src="css/images/day_01.png" />
<div class="showpop">
<img src="css/images/day_03.jpg" width="454" height="210" />
</div>
</div>
<div style="width: 1000px; margin: 0 auto;">
<div id="calhead" style="padding-left:1px;padding-right:1px;">
<div class="cHead">
<!--<div class="ftitle">我的日程</div>-->
<div id="loadingpannel" class="ptogtitle loadicon" style="display: none;">正在加载数据...</div>
<div id="errorpannel" class="ptogtitle loaderror" style="display: none;">非常抱歉,无法加载您的活动,请稍后再试</div>
</div>
<div id="caltoolbar" class="ctoolbar">
<div id="faddbtn" class="fbutton">
<div><span title='新建日程' class="addcal">新建日程</span></div>
</div>
<div class="btnseparator"></div>
<div id="dtbtn" class="fbutton">
<div><span title='代填日程' class="dtcal">代填日程</span></div>
</div>
<div class="btnseparator"></div>
<div id="showtodaybtn" class="fbutton">
<div><span title='返回当前日程' class="showtoday">今天</span></div>
</div>
<div class="btnseparator"></div>
<div id="showdaybtn" class="fbutton fcurrent">
<div><span title='日' class="showdayview">日</span></div>
</div>
<div id="showweekbtn" class="fbutton">
<div><span title='周' class="showweekview">周</span></div>
</div>
<div id="showmonthbtn" class="fbutton">
<div><span title='月' class="showmonthview">月</span></div>
</div>
<div class="btnseparator"></div>
<div id="showreflashbtn" class="fbutton">
<div><span title='刷新' class="showdayflash">刷新</span></div>
</div>
<div class="btnseparator"></div>
<div id="sfprevbtn" title="上一个" class="fbutton">
<span class="fprev"></span>
</div>
<div id="sfnextbtn" title="下一个" class="fbutton">
<span class="fnext"></span>
</div>
<div class="fshowdatep fbutton">
<div>
<input type="hidden" name="txtshow" id="hdtxtshow" /> <span id="txtdatetimeshow">Loading</span>
</div>
</div>
<div class="btnseparator"></div>
<div id="user" class="fbutton">
<div><span title='本人' class="user">本人</span></div>
</div>
<div id="room" class="fbutton">
<div><span title='本处' class="room">本处</span></div>
</div>
<div id="home" class="fbutton">
<div><span title='全厅' class="home">全厅</span></div>
</div>
<div id="bmld" class="fbutton">
<div><span title='部门领导' class="bmld">部门领导</span></div>
</div>
<div class="btnseparator"></div>
<div class="clear"></div>
</div>
</div>
<div style="padding:1px;" id="content">
<div class="t1 chromeColor"> </div>
<div class="t2 chromeColor"> </div>
<div id="dvCalMain" class="calmain printborder">
<div id="gridcontainer" style="overflow-y: visible;"></div>
</div>
<div class="t2 chromeColor"> </div>
<div class="t1 chromeColor"> </div>
</div>
</div>
</body>
</html>