[2] | 1 | <!-- BEGIN day --> |
---|
[4001] | 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/codebase/ext/dhtmlxscheduler_pdf.js"></script> |
---|
| 6 | <script src="calendar/js/dhtmlx/sources/locale_pt.js"></script> |
---|
| 7 | <script src="calendar/js/dhtmlx/sources/ext/ext_new_week.js"></script> |
---|
| 8 | <link rel="stylesheet" href="calendar/js/dhtmlx/codebase/dhtmlxscheduler.css" type="text/css" charset="utf-8"> |
---|
| 9 | |
---|
| 10 | <div class="th" style='width:1000px; height:470px;'> |
---|
| 11 | |
---|
| 12 | <div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'> |
---|
| 13 | <div class="dhx_cal_navline" style="display: none;"> |
---|
| 14 | <div class="dhx_cal_prev_button" style="display: none;"> </div> |
---|
| 15 | <div class="dhx_cal_next_button" style="display: none;"> </div> |
---|
| 16 | <div class="dhx_cal_today_button" style="display: none;" ></div> |
---|
| 17 | <div class="dhx_cal_date" style="display:none;"></div> |
---|
| 18 | <div class="dhx_cal_tab" name="day_tab" style="right:204px; display: none;"></div> |
---|
| 19 | <div class="dhx_cal_tab" name="week_tab" style="right:140px; display: none;"></div> |
---|
| 20 | <div class="dhx_cal_tab" name="month_tab" style="right:76px; display: none;"></div> |
---|
[2] | 21 | </div> |
---|
[4001] | 22 | <div class="dhx_cal_header" style="visibility: hidden;"> |
---|
| 23 | </div> |
---|
| 24 | <div class="dhx_cal_data"> |
---|
| 25 | </div> |
---|
| 26 | </div> |
---|
| 27 | </div> |
---|
| 28 | |
---|
[4114] | 29 | <div style='clear:left;margin-left:50px;margin-right:50px;text-align:center'> |
---|
| 30 | <br /> |
---|
| 31 | {iprint} |
---|
[4125] | 32 | <input type="radio" name="group1" id="list" value="list" onclick="printMode(this.value);" checked> Lista |
---|
| 33 | <input type="radio" name="group1" id="grid" value="grid" onclick="printMode(this.value);" > Grade |
---|
[4114] | 34 | |
---|
| 35 | </div> |
---|
| 36 | |
---|
[4001] | 37 | <body onload="loadScheduler()"></body> |
---|
| 38 | |
---|
| 39 | <script> |
---|
| 40 | |
---|
[4125] | 41 | function printMode(printType) |
---|
[4114] | 42 | { |
---|
| 43 | if(printType == "grid") |
---|
| 44 | { |
---|
| 45 | //document.getElementById("listPrint").style.visibility = 'hidden'; |
---|
| 46 | document.getElementById("printFriendly").onclick = function(){ |
---|
| 47 | scheduler.toPDF('calendar/js/dhtmlx/server/generate.php'); |
---|
| 48 | }; |
---|
| 49 | } |
---|
| 50 | else if(printType =="list") |
---|
| 51 | { |
---|
| 52 | //document.getElementById("listPrint").style.visibility = ''; |
---|
| 53 | document.getElementById("printFriendly").onclick = function(){ |
---|
| 54 | window.open("index.php?menuaction=calendar.uicalendar.month"+"{param}","","width=600,height=600,toolbar=no,scrollbars=yes,resizable=no"); |
---|
| 55 | }; |
---|
| 56 | } |
---|
| 57 | } |
---|
| 58 | |
---|
[4001] | 59 | function loadScheduler() |
---|
| 60 | { |
---|
| 61 | |
---|
[4125] | 62 | //document.getElementById("listPrint").style.visibility = 'hidden'; |
---|
| 63 | document.getElementById("printFriendly").onclick = function(){ |
---|
| 64 | if(document.getElementById("grid").checked == true) |
---|
| 65 | { |
---|
| 66 | //document.getElementById("listPrint").style.visibility = 'hidden'; |
---|
| 67 | scheduler.toPDF('calendar/js/dhtmlx/server/generate.php'); |
---|
| 68 | } |
---|
| 69 | else |
---|
| 70 | { |
---|
| 71 | window.open("index.php?menuaction=calendar.uicalendar.month"+"{param}","","width=600,height=600,toolbar=no,scrollbars=yes,resizable=no"); |
---|
| 72 | } |
---|
| 73 | }; |
---|
[4114] | 74 | |
---|
[4001] | 75 | //inicializa o calendário |
---|
| 76 | scheduler.showLightbox = function(id) |
---|
| 77 | { |
---|
| 78 | |
---|
| 79 | var ev = scheduler.getEvent(id); |
---|
| 80 | |
---|
| 81 | var bgYea = ev.start_date.getFullYear().toString(); |
---|
| 82 | var bgMon = (ev.start_date.getMonth() + 1).toString(); |
---|
| 83 | |
---|
| 84 | if (bgMon.length < 2) |
---|
| 85 | { |
---|
| 86 | bgMon = '0' + bgMon; |
---|
| 87 | } |
---|
| 88 | |
---|
| 89 | var bgDay = ev.start_date.getDate().toString(); |
---|
| 90 | |
---|
| 91 | if (bgDay.length < 2) |
---|
| 92 | { |
---|
| 93 | bgDay = '0' + bgDay; |
---|
| 94 | } |
---|
| 95 | |
---|
| 96 | var bgHou = ev.start_date.getHours(); |
---|
| 97 | var bgMin = ev.start_date.getMinutes(); |
---|
| 98 | |
---|
| 99 | window.location="index.php?menuaction=calendar.uicalendar.add&date=" + bgYea + bgMon + bgDay + "&hour=" + bgHou + "&minute=" + bgMin; |
---|
| 100 | |
---|
| 101 | } |
---|
| 102 | |
---|
| 103 | scheduler.templates.event_class=function(start,end,event){ |
---|
| 104 | if (event.rejected) |
---|
| 105 | return "rejected"; |
---|
| 106 | if (event.intersection) |
---|
| 107 | return "intersection"; |
---|
| 108 | |
---|
| 109 | } |
---|
| 110 | |
---|
| 111 | scheduler.templates.event_header=function(start,end,event){ |
---|
| 112 | |
---|
| 113 | var imgs = ''; |
---|
| 114 | if(event.recur && event.recur != false) |
---|
| 115 | { |
---|
[4323] | 116 | imgs += '<img width="10px" height="10px" border="0" title="'+event.recurTitle+'" src="calendar/templates/{templateSet}/images/recur.png"/>'; |
---|
[4001] | 117 | } |
---|
| 118 | |
---|
| 119 | if(event.participants == 1) |
---|
| 120 | { |
---|
[4193] | 121 | imgs += " " + '<img width="11px" height="10px" border="0" title="'+event.participants_title+'" src="calendar/templates/{templateSet}/images/multi_3.png"/>'; |
---|
[4001] | 122 | } |
---|
| 123 | else |
---|
| 124 | { |
---|
[4193] | 125 | imgs += " " + '<img width="11px" height="10px" border="0" title="'+event.participants_title+'" src="calendar/templates/{templateSet}/images/single.png"/>'; |
---|
[4001] | 126 | } |
---|
| 127 | |
---|
| 128 | if(event.attachments == 1) |
---|
| 129 | { |
---|
[4323] | 130 | imgs += " " + '<img width="10px" height="10px" border="0" title="'+event.attachmentsTitle+'" src="calendar/templates/{templateSet}/images/clip.png"/>'; |
---|
[4001] | 131 | } |
---|
| 132 | |
---|
| 133 | if(event.isPublic == 0) |
---|
| 134 | { |
---|
[4193] | 135 | imgs += " " + '<img width="11px" height="10px" border="0" title="'+event.isPublicTitle+'" src="calendar/templates/{templateSet}/images/private.png"/>'; |
---|
[4001] | 136 | } |
---|
| 137 | |
---|
| 138 | if(event.alarm == 1) |
---|
| 139 | { |
---|
[4323] | 140 | imgs += " " + '<img width="11px" height="10px" border="0" title="'+event.alarmTitle+'" src="calendar/templates/{templateSet}/images/alarm.png"/>'; |
---|
[4001] | 141 | } |
---|
| 142 | |
---|
| 143 | if(event.title) |
---|
| 144 | { |
---|
| 145 | var eventTitle = (" - ") + event.title; |
---|
| 146 | } |
---|
| 147 | else |
---|
| 148 | { |
---|
| 149 | var eventTitle = ""; |
---|
| 150 | } |
---|
| 151 | |
---|
[4707] | 152 | //hide/show event description according to the preference title_view |
---|
| 153 | if(event.title_view == 0) |
---|
| 154 | { |
---|
| 155 | if(event.descOnTitle == 1) //to show, or not, description beside the title |
---|
| 156 | { |
---|
| 157 | var eventDescOnTitle = (" - ") + event.text; |
---|
| 158 | } |
---|
| 159 | else |
---|
| 160 | { |
---|
| 161 | var eventDescOnTitle = ''; |
---|
| 162 | } |
---|
[4001] | 163 | } |
---|
| 164 | else |
---|
| 165 | { |
---|
| 166 | var eventDescOnTitle = ''; |
---|
| 167 | } |
---|
| 168 | |
---|
| 169 | return imgs + " " + scheduler.templates.hour_scale(start) + " " + scheduler.templates.hour_scale(end) + eventTitle + eventDescOnTitle; |
---|
| 170 | } |
---|
| 171 | |
---|
[4032] | 172 | scheduler.xy.scale_height=0; |
---|
| 173 | scheduler.xy.nav_height=0; |
---|
[4011] | 174 | scheduler.config.hour_size_px = {hour_size_px} ; |
---|
[4001] | 175 | scheduler.config.scroll_hour = 8; |
---|
| 176 | scheduler.config.time_step = 30; //- {numeric} minimal date size step in minutes; |
---|
| 177 | scheduler.config.start_on_monday = true; //{boolean} if true week starts from Monday ( if false, week start from Sunday); |
---|
| 178 | scheduler.config.first_hour = {hora_inicial}; |
---|
| 179 | scheduler.config.last_hour = {hora_final}; |
---|
| 180 | scheduler.config.drag_resize = false;//- {boolean} allows resizing events by dnd; |
---|
| 181 | scheduler.config.drag_move = false;//- {boolean} allows moving events by dnd; |
---|
| 182 | scheduler.config.drag_create = false;// - {boolean} allows creating new events by dnd; |
---|
| 183 | scheduler.config.dblclick_create = true;//- {boolean} allows creating new events by double click; |
---|
| 184 | scheduler.config.edit_on_create = true;//- {boolean} shows form on new event creation; |
---|
| 185 | 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); |
---|
| 186 | scheduler.config.details_on_dblclick = true;// - {boolean} uses extended form on event double-click (double-click on existing event). |
---|
| 187 | scheduler.attachEvent("onClick",function(){ return false;}); |
---|
| 188 | scheduler.attachEvent("onDblClick",function(id){ |
---|
| 189 | var ev = scheduler.getEvent(id); |
---|
| 190 | var id_mod = ev.id; |
---|
| 191 | if(ev.recur!=false) id_mod = ev.id.split('rc',1)[0]+"&date="+ev.recur; |
---|
| 192 | window.location="index.php?menuaction=calendar.uicalendar.view&cal_id="+id_mod;}); |
---|
| 193 | |
---|
| 194 | scheduler.config.xml_date="%Y-%m-%d %H:%i"; |
---|
| 195 | scheduler.init('scheduler_here',new {date},"day"); |
---|
| 196 | scheduler.parse({events_json},"json"); |
---|
| 197 | |
---|
| 198 | } |
---|
| 199 | |
---|
| 200 | function callViewEvent(id) //double click on events title bar |
---|
| 201 | { |
---|
| 202 | var ev = scheduler.getEvent(id); |
---|
| 203 | var id_mod = ev.id; |
---|
| 204 | if(ev.recur!=false) id_mod = ev.id.split('rc',1)[0]+"&date="+ev.recur; |
---|
| 205 | window.location="index.php?menuaction=calendar.uicalendar.view&cal_id="+id_mod; |
---|
| 206 | } |
---|
| 207 | |
---|
| 208 | </script> |
---|
| 209 | |
---|
[2] | 210 | <!-- END day --> |
---|
[4322] | 211 | <!-- BEGIN day_event_off --> |
---|
[4707] | 212 | <!--<font class="event-on">{event}</font>--> |
---|
[4322] | 213 | <!-- END day_event_off --> |
---|
| 214 | <!-- BEGIN day_time --> |
---|
[4707] | 215 | <!--{time}--> |
---|
[4322] | 216 | <!--<td class="time" nowrap>{open_link}{time}{close_link}</td>--> |
---|
| 217 | <!-- END day_time --> |
---|
| 218 | <!-- BEGIN day_row --> |
---|
| 219 | <!--<font style="font-size: 8pt;">{event}</font>--> |
---|
| 220 | <!-- END day_row --> |
---|
| 221 | <!-- BEGIN day_event_on --> |
---|
[4707] | 222 | <!--<font class="event-on">{event}</font>--> |
---|
[4322] | 223 | <!-- END day_event_on --> |
---|
| 224 | <!-- BEGIN day_event_holiday --> |
---|
[4707] | 225 | <!--{event}--> |
---|
| 226 | <!-- END day_event_holiday --> |
---|