source: branches/2.2.0.1/calendar/templates/default/new_month.tpl @ 4098

Revision 4098, 4.6 KB checked in by brunocosta, 13 years ago (diff)

Ticket #1745 - Ajustes na interface das novas visões semanal e mensal da agenda.

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/sources/ext/ext_pdf.js"></script>
6<script src="calendar/js/dhtmlx/sources/locale_pt.js"></script>
7<script>
8
9    resize = function(){
10
11        var clientWidth = ((window.innerWidth ? window.innerWidth : document.body.offsetWidth));
12        var conteiner = document.getElementById('conteiner');
13        conteiner.style.width=clientWidth-374+'px'
14    }
15
16
17     function resize(){
18
19        var clientWidth = ((window.innerWidth ? window.innerWidth : document.body.offsetWidth));
20       var conteiner = document.getElementById('conteiner');
21        conteiner.style.width=clientWidth-374+'px'
22    }
23
24
25
26    window.onresize = resize;
27
28</script>
29
30<link rel="stylesheet" href="calendar/js/dhtmlx/codebase/dhtmlxscheduler.css" type="text/css" charset="utf-8">
31
32
33
34<div  id='conteiner' class="th" style='width:100px; height:650px;margin-left:50px;margin-right:50px;float:left;'>
35<div class='calendar_month_identifier' style='background-color:white;padding-bottom:2px;text-align:center'>{title}</div>
36<div class='calendar_user_identifier' style='background-color:white;padding-bottom:2px;text-align:center'>:&nbsp;{user}&nbsp;:</div>
37<div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:95%; border-left: 1px dotted #586A7E;'>
38                <div class="dhx_cal_navline" style="display: none;">
39                        <div class="dhx_cal_prev_button">&nbsp;</div>
40                        <div class="dhx_cal_next_button">&nbsp;</div>
41                        <div class="dhx_cal_today_button"></div>
42                        <div class="dhx_cal_date"></div>
43                        <div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div>
44                        <div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div>
45                        <div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div>
46                </div>
47                <div class="dhx_cal_header">
48                </div>
49                <div class="dhx_cal_data">
50                </div>
51        </div>
52</div>
53
54{minical}
55<div class='calendar_month_identifier' style='clear:left;margin-left:50px;margin-right:50px;text-align:center'>&nbsp;</div>
56<body onload="resize();loadScheduler();"></body>
57
58<script>
59
60    function loadScheduler()
61    {
62
63        //inicializa o calendário
64        scheduler.showLightbox = function(id)
65        {
66
67            var ev = scheduler.getEvent(id);
68
69            var bgYea = ev.start_date.getFullYear().toString();
70            var bgMon = (ev.start_date.getMonth() + 1).toString();
71
72            if (bgMon.length < 2)
73            {
74                bgMon = '0' + bgMon;
75            }
76
77            var bgDay = ev.start_date.getDate().toString();
78
79            if (bgDay.length < 2)
80            {
81                bgDay = '0' + bgDay;
82            }
83
84            var bgHou = ev.start_date.getHours();
85            var bgMin = ev.start_date.getMinutes();
86
87            window.location="index.php?menuaction=calendar.uicalendar.add&date=" + bgYea + bgMon + bgDay + "&hour=" + bgHou + "&minute=" + bgMin;
88
89        }
90        scheduler.xy.nav_height=0;
91        //scheduler.config.hour_size_px = 84;
92        scheduler.config.scroll_hour = 8;
93        scheduler.config.time_step = 30; //- {numeric} minimal date size step in minutes;
94        scheduler.config.start_on_monday = true; //{boolean} if true week starts from Monday ( if false, week start from Sunday);
95        scheduler.config.drag_resize = false;//- {boolean} allows resizing events by dnd;
96        scheduler.config.drag_move = false;//- {boolean} allows moving events by dnd;
97        scheduler.config.drag_create = false;// - {boolean} allows creating new events by dnd;
98        scheduler.config.dblclick_create = true;//- {boolean} allows creating new events by double click;
99        scheduler.config.edit_on_create = true;//- {boolean} shows form on new event creation;
100        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);
101        scheduler.config.details_on_dblclick = true;// - {boolean} uses extended form on event double-click (double-click on existing event).
102        scheduler.attachEvent("onClick",function(){ return false;});
103        scheduler.attachEvent("onDblClick",function(id){
104                                var ev = scheduler.getEvent(id);
105                                var id_mod = ev.id;
106                                if(ev.recur!=false) id_mod = ev.id.split('rc',1)[0]+"&date="+ev.recur;
107                                window.location="index.php?menuaction=calendar.uicalendar.view&cal_id="+id_mod;});
108
109        scheduler.config.xml_date="%Y-%m-%d %H:%i";
110        scheduler.init('scheduler_here',new {date},"month");
111        scheduler.parse({events_json},"json");
112
113    }
114
115    function callViewEvent(id) //double click on events title bar
116    {
117        var ev = scheduler.getEvent(id);
118        var id_mod = ev.id;
119        if(ev.recur!=false) id_mod = ev.id.split('rc',1)[0]+"&date="+ev.recur;
120        window.location="index.php?menuaction=calendar.uicalendar.view&cal_id="+id_mod;
121    }
122
123</script>
124
125
126
127
128<!-- END day -->
Note: See TracBrowser for help on using the repository browser.