1 | <!-- BEGIN day --> |
---|
2 | |
---|
3 | |
---|
4 | <script src="calendar/js/dhtmlx/codebase/dhtmlxscheduler_debug.js" type="text/javascript" charset="utf-8"></script> |
---|
5 | <script src="calendar/js/dhtmlx/sources/ext/ext_pdf.js"></script> |
---|
6 | <script src="calendar/js/dhtmlx/sources/locale_pt.js"></script> |
---|
7 | <script src="calendar/js/dhtmlx/sources/ext/ext_new_month.js"></script> |
---|
8 | <script> |
---|
9 | |
---|
10 | resize = function(){ |
---|
11 | |
---|
12 | var clientWidth = ((window.innerWidth ? window.innerWidth : document.body.offsetWidth)); |
---|
13 | var conteiner = document.getElementById('conteiner'); |
---|
14 | conteiner.style.width=clientWidth-374+'px' |
---|
15 | } |
---|
16 | |
---|
17 | |
---|
18 | function resize(){ |
---|
19 | |
---|
20 | var clientWidth = ((window.innerWidth ? window.innerWidth : document.body.offsetWidth)); |
---|
21 | var conteiner = document.getElementById('conteiner'); |
---|
22 | conteiner.style.width=clientWidth-374+'px' |
---|
23 | } |
---|
24 | |
---|
25 | |
---|
26 | |
---|
27 | window.onresize = resize; |
---|
28 | |
---|
29 | </script> |
---|
30 | |
---|
31 | <link rel="stylesheet" href="calendar/js/dhtmlx/codebase/dhtmlxscheduler.css" type="text/css" charset="utf-8"> |
---|
32 | |
---|
33 | |
---|
34 | |
---|
35 | <div id='conteiner' class="th" style='width:100px; height:650px;margin-left:50px;margin-right:50px;float:left;'> |
---|
36 | <div class='calendar_user_identifier' style='background-color:white;padding-bottom:2px;text-align:center'>: {user} :</div> |
---|
37 | <div class='calendar_month_identifier' style='background-color:white;padding-bottom:2px;text-align:center'>{title}</div> |
---|
38 | |
---|
39 | <div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:95%; border-left: 1px dotted #586A7E;'> |
---|
40 | <div class="dhx_cal_navline" style="display: none;"> |
---|
41 | <div class="dhx_cal_prev_button"> </div> |
---|
42 | <div class="dhx_cal_next_button"> </div> |
---|
43 | <div class="dhx_cal_today_button"></div> |
---|
44 | <div class="dhx_cal_date"></div> |
---|
45 | <div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div> |
---|
46 | <div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div> |
---|
47 | <div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div> |
---|
48 | </div> |
---|
49 | <div class="dhx_cal_header"> |
---|
50 | </div> |
---|
51 | <div class="dhx_cal_data"> |
---|
52 | </div> |
---|
53 | </div> |
---|
54 | </div> |
---|
55 | |
---|
56 | {minical} |
---|
57 | |
---|
58 | <div style='clear:left;margin-left:50px;margin-right:50px;text-align:center'> |
---|
59 | <br /> |
---|
60 | {iprint} |
---|
61 | <input type="radio" name="group1" id="list" value="list" onclick="printMode(this.value);" checked> Lista |
---|
62 | <input type="radio" name="group1" id="grid" value="grid" onclick="printMode(this.value);" > Grade<br> |
---|
63 | |
---|
64 | </div> |
---|
65 | |
---|
66 | <div style='clear:left;margin-left:50px;margin-right:50px;text-align:center'> </div> |
---|
67 | |
---|
68 | <body onload="resize();loadScheduler();"></body> |
---|
69 | |
---|
70 | <script> |
---|
71 | var holidayTab = {holidays_json}; |
---|
72 | function printMode(printType) |
---|
73 | { |
---|
74 | if(printType == "grid") |
---|
75 | { |
---|
76 | document.getElementById("listPrint").style.visibility = 'hidden'; |
---|
77 | document.getElementById("printFriendly").onclick = function(){ |
---|
78 | scheduler.toPDF('calendar/js/dhtmlx/server/generate.php'); |
---|
79 | }; |
---|
80 | } |
---|
81 | else if(printType =="list") |
---|
82 | { |
---|
83 | document.getElementById("listPrint").style.visibility = ''; |
---|
84 | document.getElementById("printFriendly").onclick = function(){ |
---|
85 | window.open("index.php?menuaction=calendar.uicalendar.month"+"{param}"+"&day_ini="+document.getElementById('dayIni').value+"&num_dias="+document.getElementById('numDays').value,"","width=600,height=600,toolbar=no,scrollbars=yes,resizable=no"); |
---|
86 | }; |
---|
87 | } |
---|
88 | } |
---|
89 | |
---|
90 | function loadScheduler() |
---|
91 | { |
---|
92 | document.getElementById("printFriendly").onclick = function(){ |
---|
93 | if(document.getElementById("grid").checked == true) |
---|
94 | { |
---|
95 | document.getElementById("listPrint").style.visibility = 'hidden'; |
---|
96 | scheduler.toPDF('calendar/js/dhtmlx/server/generate.php'); |
---|
97 | } |
---|
98 | else |
---|
99 | { |
---|
100 | window.open("index.php?menuaction=calendar.uicalendar.month"+"{param}"+"&day_ini="+document.getElementById('dayIni').value+"&num_dias="+document.getElementById('numDays').value,"","width=600,height=600,toolbar=no,scrollbars=yes,resizable=no"); |
---|
101 | } |
---|
102 | }; |
---|
103 | //inicializa o calendário |
---|
104 | scheduler.showLightbox = function(id) |
---|
105 | { |
---|
106 | |
---|
107 | var ev = scheduler.getEvent(id); |
---|
108 | |
---|
109 | var bgYea = ev.start_date.getFullYear().toString(); |
---|
110 | var bgMon = (ev.start_date.getMonth() + 1).toString(); |
---|
111 | |
---|
112 | if (bgMon.length < 2) |
---|
113 | { |
---|
114 | bgMon = '0' + bgMon; |
---|
115 | } |
---|
116 | |
---|
117 | var bgDay = ev.start_date.getDate().toString(); |
---|
118 | |
---|
119 | if (bgDay.length < 2) |
---|
120 | { |
---|
121 | bgDay = '0' + bgDay; |
---|
122 | } |
---|
123 | |
---|
124 | var bgHou = ev.start_date.getHours(); |
---|
125 | var bgMin = ev.start_date.getMinutes(); |
---|
126 | |
---|
127 | window.location="index.php?menuaction=calendar.uicalendar.add&date=" + bgYea + bgMon + bgDay + "&hour=" + bgHou + "&minute=" + bgMin; |
---|
128 | |
---|
129 | } |
---|
130 | scheduler.xy.nav_height=0; |
---|
131 | //scheduler.config.hour_size_px = 84; |
---|
132 | scheduler.config.scroll_hour = 8; |
---|
133 | scheduler.config.time_step = 30; //- {numeric} minimal date size step in minutes; |
---|
134 | scheduler.config.start_on_monday = true; //{boolean} if true week starts from Monday ( if false, week start from Sunday); |
---|
135 | scheduler.config.drag_resize = false;//- {boolean} allows resizing events by dnd; |
---|
136 | scheduler.config.drag_move = false;//- {boolean} allows moving events by dnd; |
---|
137 | scheduler.config.drag_create = false;// - {boolean} allows creating new events by dnd; |
---|
138 | scheduler.config.dblclick_create = true;//- {boolean} allows creating new events by double click; |
---|
139 | scheduler.config.edit_on_create = true;//- {boolean} shows form on new event creation; |
---|
140 | scheduler.config.details_on_create = true;//- {boolean} uses extended form on new event creation by drag or by dbl-click (option doesn't affect monthly view - where details form is the only way to change data); |
---|
141 | scheduler.config.details_on_dblclick = true;// - {boolean} uses extended form on event double-click (double-click on existing event). |
---|
142 | scheduler.attachEvent("onClick",function(){ return false;}); |
---|
143 | scheduler.attachEvent("onDblClick",function(id){ |
---|
144 | var ev = scheduler.getEvent(id); |
---|
145 | var id_mod = ev.id; |
---|
146 | if(ev.recur!=false) id_mod = ev.id.split('rc',1)[0]+"&date="+ev.recur; |
---|
147 | window.location="index.php?menuaction=calendar.uicalendar.view&cal_id="+id_mod;}); |
---|
148 | |
---|
149 | scheduler.config.xml_date="%Y-%m-%d %H:%i"; |
---|
150 | scheduler.init('scheduler_here',new {date},"month"); |
---|
151 | scheduler.parse({events_json},"json"); |
---|
152 | |
---|
153 | |
---|
154 | |
---|
155 | } |
---|
156 | |
---|
157 | function callViewEvent(id) //double click on events title bar |
---|
158 | { |
---|
159 | var ev = scheduler.getEvent(id); |
---|
160 | var id_mod = ev.id; |
---|
161 | if(ev.recur!=false) id_mod = ev.id.split('rc',1)[0]+"&date="+ev.recur; |
---|
162 | window.location="index.php?menuaction=calendar.uicalendar.view&cal_id="+id_mod; |
---|
163 | } |
---|
164 | |
---|
165 | </script> |
---|
166 | |
---|
167 | |
---|
168 | |
---|
169 | |
---|
170 | <!-- END day --> |
---|