source: sandbox/2.2.0.2/calendar/templates/default/day_cal.tpl @ 4323

Revision 4323, 7.9 KB checked in by airton, 13 years ago (diff)

Ticket #1820 - Colocar icones na visao semanal da agenda

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
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/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;">&nbsp;</div>
15            <div class="dhx_cal_next_button" style="display: none;">&nbsp;</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>
21 </div>
22        <div class="dhx_cal_header" style="visibility: hidden;">
23        </div>
24        <div class="dhx_cal_data">
25        </div>
26    </div>
27</div>
28
29<div style='clear:left;margin-left:50px;margin-right:50px;text-align:center'>
30<br />
31    {iprint}
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
34
35</div>
36
37<body onload="loadScheduler()"></body>
38
39<script>
40
41    function printMode(printType)
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
59    function loadScheduler()
60    {
61
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                                                                     };
74
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            {
116                imgs += '<img width="10px" height="10px" border="0" title="'+event.recurTitle+'" src="calendar/templates/{templateSet}/images/recur.png"/>';
117            }
118
119            if(event.participants == 1)
120            {
121                imgs += " " + '<img width="11px" height="10px" border="0" title="'+event.participants_title+'" src="calendar/templates/{templateSet}/images/multi_3.png"/>';
122            }
123            else
124            {
125                imgs += " " + '<img width="11px" height="10px" border="0" title="'+event.participants_title+'" src="calendar/templates/{templateSet}/images/single.png"/>';
126            }
127
128            if(event.attachments == 1)
129            {
130                imgs += " " + '<img width="10px" height="10px" border="0" title="'+event.attachmentsTitle+'" src="calendar/templates/{templateSet}/images/clip.png"/>';
131            }
132
133            if(event.isPublic == 0)
134            {
135                imgs += " " + '<img width="11px" height="10px" border="0" title="'+event.isPublicTitle+'" src="calendar/templates/{templateSet}/images/private.png"/>';
136            }
137
138            if(event.alarm == 1)
139            {
140                imgs += " " + '<img width="11px" height="10px" border="0" title="'+event.alarmTitle+'" src="calendar/templates/{templateSet}/images/alarm.png"/>';
141            }
142
143            if(event.title)
144            {
145                var eventTitle = (" - ") + event.title;
146            }
147            else
148            {
149                var eventTitle = "";
150            }
151
152            if(event.descOnTitle == 1)
153            {
154                var eventDescOnTitle = (" - ") + event.text;
155            }
156            else
157            {
158                var eventDescOnTitle = '';
159            }
160
161            return imgs + " " + scheduler.templates.hour_scale(start) + " " + scheduler.templates.hour_scale(end) + eventTitle + eventDescOnTitle;
162        }
163
164        scheduler.xy.scale_height=0;
165        scheduler.xy.nav_height=0;
166        scheduler.config.hour_size_px = {hour_size_px} ;
167        scheduler.config.scroll_hour = 8;
168        scheduler.config.time_step = 30; //- {numeric} minimal date size step in minutes;
169        scheduler.config.start_on_monday = true; //{boolean} if true week starts from Monday ( if false, week start from Sunday);
170        scheduler.config.first_hour = {hora_inicial};
171        scheduler.config.last_hour = {hora_final};
172        scheduler.config.drag_resize = false;//- {boolean} allows resizing events by dnd;
173        scheduler.config.drag_move = false;//- {boolean} allows moving events by dnd;
174        scheduler.config.drag_create = false;// - {boolean} allows creating new events by dnd;
175        scheduler.config.dblclick_create = true;//- {boolean} allows creating new events by double click;
176        scheduler.config.edit_on_create = true;//- {boolean} shows form on new event creation;
177        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);
178        scheduler.config.details_on_dblclick = true;// - {boolean} uses extended form on event double-click (double-click on existing event).
179        scheduler.attachEvent("onClick",function(){ return false;});
180        scheduler.attachEvent("onDblClick",function(id){
181                                var ev = scheduler.getEvent(id);
182                                var id_mod = ev.id;
183                                if(ev.recur!=false) id_mod = ev.id.split('rc',1)[0]+"&date="+ev.recur;
184                                window.location="index.php?menuaction=calendar.uicalendar.view&cal_id="+id_mod;});
185
186        scheduler.config.xml_date="%Y-%m-%d %H:%i";
187        scheduler.init('scheduler_here',new {date},"day");
188        scheduler.parse({events_json},"json");
189
190    }
191
192    function callViewEvent(id) //double click on events title bar
193    {
194        var ev = scheduler.getEvent(id);
195        var id_mod = ev.id;
196        if(ev.recur!=false) id_mod = ev.id.split('rc',1)[0]+"&date="+ev.recur;
197        window.location="index.php?menuaction=calendar.uicalendar.view&cal_id="+id_mod;
198    }
199
200</script>
201
202<!-- END day -->
203<!-- BEGIN day_event_off -->
204        <!--<font class="event-on">{event}</font>-->
205<!-- END day_event_off -->
206<!-- BEGIN day_time -->
207        <!--{time}-->
208     <!--<td class="time" nowrap>{open_link}{time}{close_link}</td>-->
209<!-- END day_time -->
210<!-- BEGIN day_row -->
211    <!--<font style="font-size: 8pt;">{event}</font>-->
212<!-- END day_row -->
213<!-- BEGIN day_event_on -->
214        <!--<font class="event-on">{event}</font>-->
215<!-- END day_event_on -->
216<!-- BEGIN day_event_holiday -->
217        <!--{event}-->
218<!-- END day_event_holiday -->
Note: See TracBrowser for help on using the repository browser.