1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
---|
2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
---|
3 | <head>
|
---|
4 | <meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
---|
5 | <title></title>
|
---|
6 | </head>
|
---|
7 | <script src="../../codebase/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script>
|
---|
8 | <link rel="stylesheet" href="../../codebase/dhtmlxscheduler.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
---|
9 |
|
---|
10 |
|
---|
11 | <style type="text/css" media="screen">
|
---|
12 | html, body{
|
---|
13 | margin:0px;
|
---|
14 | padding:0px;
|
---|
15 | height:100%;
|
---|
16 | overflow:hidden;
|
---|
17 | }
|
---|
18 | /*event in day or week view*/
|
---|
19 | .dhx_cal_event.past_event div{
|
---|
20 |
|
---|
21 | color:white !important;
|
---|
22 | }
|
---|
23 | /*multi-day event in month view*/
|
---|
24 | .dhx_cal_event_line.past_event{
|
---|
25 | background-color:purple !important;
|
---|
26 | color:white !important;
|
---|
27 | }
|
---|
28 |
|
---|
29 | .dhx_cal_event div.dhx_body{
|
---|
30 | background-color:#white !important;
|
---|
31 | color:white !important;
|
---|
32 | }
|
---|
33 | /*event with fixed time, in month view*/
|
---|
34 | .dhx_cal_event_clear.past_event{
|
---|
35 | color:purple !important;
|
---|
36 | }
|
---|
37 | </style>
|
---|
38 |
|
---|
39 | <script type="text/javascript" charset="utf-8">
|
---|
40 | function init() {
|
---|
41 | scheduler.config.xml_date="%Y-%m-%d %H:%i";
|
---|
42 | scheduler.init('scheduler_here',new Date(2010,0,10),"week");
|
---|
43 |
|
---|
44 | scheduler.attachEvent("onEventLoading",function(ev){
|
---|
45 | ev.color = Math.floor(Math.random()*16777216);
|
---|
46 |
|
---|
47 | var rule = ".dhx_cal_event.color_"+ev.color+" div";
|
---|
48 | var r = Math.floor(ev.color/(256*256)); var g = Math.floor((ev.color%(256*256))/256); var b = ev.color%256;
|
---|
49 | var rule_text = "background-color:rgb("+r+","+g+","+b+") !important; color:white !important;";
|
---|
50 |
|
---|
51 | if (_isIE)
|
---|
52 | document.styleSheets[0].addRule(rule, rule_text);
|
---|
53 | else
|
---|
54 | document.styleSheets[0].insertRule(rule+" { "+rule_text+" } ", 0);
|
---|
55 |
|
---|
56 | return true;
|
---|
57 | })
|
---|
58 | scheduler.templates.event_class=function(start,end,event){
|
---|
59 | return "color_"+event.color;
|
---|
60 | }
|
---|
61 | scheduler.load("../common/events.xml");
|
---|
62 |
|
---|
63 | }
|
---|
64 | </script>
|
---|
65 |
|
---|
66 | <body onload="init();">
|
---|
67 | <div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>
|
---|
68 | <div class="dhx_cal_navline">
|
---|
69 | <div class="dhx_cal_prev_button"> </div>
|
---|
70 | <div class="dhx_cal_next_button"> </div>
|
---|
71 | <div class="dhx_cal_today_button"></div>
|
---|
72 | <div class="dhx_cal_date"></div>
|
---|
73 | <div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div>
|
---|
74 | <div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div>
|
---|
75 | <div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div>
|
---|
76 | </div>
|
---|
77 | <div class="dhx_cal_header">
|
---|
78 | </div>
|
---|
79 | <div class="dhx_cal_data">
|
---|
80 | </div>
|
---|
81 | </div>
|
---|
82 | </body> |
---|