[4049] | 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_week.js"></script> |
---|
[4865] | 8 | <script src="calendar/js/dhtmlx/sources/ext/brazil_patch.js"></script> |
---|
[4049] | 9 | <script> |
---|
[4550] | 10 | var holidayTab = {holidays_json}; |
---|
[4049] | 11 | resize = function(){ |
---|
| 12 | |
---|
| 13 | var clientWidth = ((window.innerWidth ? window.innerWidth : document.body.offsetWidth)); |
---|
| 14 | var conteiner = document.getElementById('conteiner'); |
---|
| 15 | conteiner.style.width=clientWidth-374+'px' |
---|
| 16 | } |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | function resize(){ |
---|
| 20 | |
---|
| 21 | var clientWidth = ((window.innerWidth ? window.innerWidth : document.body.offsetWidth)); |
---|
| 22 | var conteiner = document.getElementById('conteiner'); |
---|
| 23 | conteiner.style.width=clientWidth-374+'px' |
---|
| 24 | } |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | |
---|
| 28 | window.onresize = resize; |
---|
| 29 | |
---|
| 30 | </script> |
---|
| 31 | |
---|
| 32 | <link rel="stylesheet" href="calendar/js/dhtmlx/codebase/dhtmlxscheduler.css" type="text/css" charset="utf-8"> |
---|
| 33 | |
---|
| 34 | |
---|
[4098] | 35 | |
---|
| 36 | <div id='conteiner' class="th" style='height:700px;margin-left:50px;margin-right:50px;float:left;'> |
---|
[4115] | 37 | <div class='calendar_user_identifier' style='background-color:white;padding-bottom:2px;text-align:center'>: {user} :</div> |
---|
[4049] | 38 | <div class='calendar_month_identifier' style='background-color:white;padding-bottom:2px;text-align:center'>{title}</div> |
---|
| 39 | |
---|
[4115] | 40 | |
---|
[4098] | 41 | <div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:95%; border-left: 1px dotted #586A7E;'> |
---|
[4049] | 42 | <div class="dhx_cal_navline" style="display: none;"> |
---|
| 43 | <div class="dhx_cal_prev_button"> </div> |
---|
| 44 | <div class="dhx_cal_next_button"> </div> |
---|
| 45 | <div class="dhx_cal_today_button"></div> |
---|
| 46 | <div class="dhx_cal_date"></div> |
---|
| 47 | <div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div> |
---|
| 48 | <div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div> |
---|
| 49 | <div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div> |
---|
| 50 | </div> |
---|
| 51 | <div class="dhx_cal_header"> |
---|
| 52 | </div> |
---|
| 53 | <div class="dhx_cal_data"> |
---|
| 54 | </div> |
---|
| 55 | </div> |
---|
| 56 | </div> |
---|
[4114] | 57 | |
---|
[4049] | 58 | {minical} |
---|
| 59 | |
---|
[4114] | 60 | <div style='clear:left;margin-left:50px;margin-right:50px;text-align:center'> |
---|
| 61 | <br /> |
---|
| 62 | {iprint} |
---|
[4125] | 63 | <input type="radio" name="group1" id="list" value="list" onclick="printMode(this.value);" checked> Lista |
---|
| 64 | <input type="radio" name="group1" id="grid" value="grid" onclick="printMode(this.value);" > Grade<br> |
---|
[4114] | 65 | |
---|
| 66 | </div> |
---|
| 67 | |
---|
| 68 | <div style='clear:left;margin-left:50px;margin-right:50px;text-align:center'> </div> |
---|
| 69 | |
---|
[4049] | 70 | <body onload="resize();loadScheduler();"></body> |
---|
| 71 | |
---|
| 72 | <script> |
---|
| 73 | |
---|
[4125] | 74 | function printMode(printType) |
---|
[4114] | 75 | { |
---|
| 76 | if(printType == "grid") |
---|
| 77 | { |
---|
[4125] | 78 | //document.getElementById("listPrint").style.visibility = 'hidden'; |
---|
[4114] | 79 | document.getElementById("printFriendly").onclick = function(){ |
---|
| 80 | scheduler.toPDF('calendar/js/dhtmlx/server/generate.php'); |
---|
| 81 | }; |
---|
| 82 | } |
---|
| 83 | else if(printType =="list") |
---|
| 84 | { |
---|
[4125] | 85 | //document.getElementById("listPrint").style.visibility = ''; |
---|
[4114] | 86 | document.getElementById("printFriendly").onclick = function(){ |
---|
| 87 | window.open("index.php?menuaction=calendar.uicalendar.month"+"{param}","","width=600,height=600,toolbar=no,scrollbars=yes,resizable=no"); |
---|
| 88 | }; |
---|
| 89 | } |
---|
| 90 | } |
---|
| 91 | |
---|
[4049] | 92 | function loadScheduler() |
---|
| 93 | { |
---|
[4114] | 94 | document.getElementById("printFriendly").onclick = function(){ |
---|
| 95 | if(document.getElementById("grid").checked == true) |
---|
| 96 | { |
---|
[4125] | 97 | //document.getElementById("listPrint").style.visibility = 'hidden'; |
---|
[4114] | 98 | scheduler.toPDF('calendar/js/dhtmlx/server/generate.php'); |
---|
| 99 | } |
---|
| 100 | else |
---|
| 101 | { |
---|
| 102 | window.open("index.php?menuaction=calendar.uicalendar.month"+"{param}","","width=600,height=600,toolbar=no,scrollbars=yes,resizable=no"); |
---|
| 103 | } |
---|
| 104 | }; |
---|
[4049] | 105 | |
---|
| 106 | scheduler.showLightbox = function(id) |
---|
| 107 | { |
---|
| 108 | |
---|
| 109 | var ev = scheduler.getEvent(id); |
---|
| 110 | var bgYea = ev.start_date.getFullYear().toString(); |
---|
| 111 | var bgMon = (ev.start_date.getMonth() + 1).toString(); |
---|
| 112 | |
---|
| 113 | if (bgMon.length < 2) |
---|
| 114 | { |
---|
| 115 | bgMon = '0' + bgMon; |
---|
| 116 | } |
---|
| 117 | |
---|
| 118 | var bgDay = ev.start_date.getDate().toString(); |
---|
| 119 | |
---|
| 120 | if (bgDay.length < 2) |
---|
| 121 | { |
---|
| 122 | bgDay = '0' + bgDay; |
---|
| 123 | } |
---|
| 124 | |
---|
| 125 | var bgHou = ev.start_date.getHours(); |
---|
| 126 | var bgMin = ev.start_date.getMinutes(); |
---|
| 127 | |
---|
| 128 | window.location="index.php?menuaction=calendar.uicalendar.add&date=" + bgYea + bgMon + bgDay + "&hour=" + bgHou + "&minute=" + bgMin; |
---|
| 129 | |
---|
| 130 | } |
---|
| 131 | //inicializa o calendário |
---|
| 132 | scheduler.xy.scale_height=0; |
---|
| 133 | scheduler.xy.nav_height=0; |
---|
| 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 | scheduler.config.multi_day = true; |
---|
| 149 | scheduler.config.xml_date="%Y-%m-%d %H:%i"; |
---|
| 150 | scheduler.init('scheduler_here',new {date},"week"); |
---|
| 151 | scheduler.parse({events_json},"json"); |
---|
| 152 | resize(); |
---|
| 153 | |
---|
| 154 | } |
---|
| 155 | |
---|
| 156 | function callViewEvent(id) //double click on events title bar |
---|
| 157 | { |
---|
| 158 | var ev = scheduler.getEvent(id); |
---|
| 159 | var id_mod = ev.id; |
---|
| 160 | if(ev.recur!=false) id_mod = ev.id.split('rc',1)[0]+"&date="+ev.recur; |
---|
| 161 | window.location="index.php?menuaction=calendar.uicalendar.view&cal_id="+id_mod; |
---|
| 162 | } |
---|
| 163 | |
---|
| 164 | </script> |
---|
| 165 | |
---|
| 166 | |
---|
| 167 | <!-- END day --> |
---|