source: branches/2.2.0.1/calendar/templates/default/new_week.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 src="calendar/js/dhtmlx/sources/ext/ext_new_week.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='height:700px;margin-left:50px;margin-right:50px;float:left;'>
36<div class='calendar_month_identifier' style='background-color:white;padding-bottom:2px;text-align:center'>{title}</div>
37<div class='calendar_user_identifier' style='background-color:white;padding-bottom:2px;text-align:center'>:&nbsp;{user}&nbsp;:</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">&nbsp;</div>
42                        <div class="dhx_cal_next_button">&nbsp;</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{minical}
56
57<div class='calendar_month_identifier' style='clear:left;margin-left:50px;margin-right:50px;text-align:center'>&nbsp;</div>
58<body onload="resize();loadScheduler();"></body>
59
60<script>
61
62    function loadScheduler()
63    {
64
65
66        scheduler.showLightbox = function(id)
67        {
68
69            var ev = scheduler.getEvent(id);
70            var bgYea = ev.start_date.getFullYear().toString();
71            var bgMon = (ev.start_date.getMonth() + 1).toString();
72
73            if (bgMon.length < 2)
74            {
75                bgMon = '0' + bgMon;
76            }
77
78            var bgDay = ev.start_date.getDate().toString();
79
80            if (bgDay.length < 2)
81            {
82                bgDay = '0' + bgDay;
83            }
84
85            var bgHou = ev.start_date.getHours();
86            var bgMin = ev.start_date.getMinutes();
87
88            window.location="index.php?menuaction=calendar.uicalendar.add&date=" + bgYea + bgMon + bgDay + "&hour=" + bgHou + "&minute=" + bgMin;
89
90        }
91        //inicializa o calendário
92        scheduler.xy.scale_height=0;
93        scheduler.xy.nav_height=0;
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        scheduler.config.multi_day = true;
109        scheduler.config.xml_date="%Y-%m-%d %H:%i";
110        scheduler.init('scheduler_here',new {date},"week");
111        scheduler.parse({events_json},"json");
112        resize();
113
114    }
115
116    function callViewEvent(id) //double click on events title bar
117    {
118        var ev = scheduler.getEvent(id);
119        var id_mod = ev.id;
120        if(ev.recur!=false) id_mod = ev.id.split('rc',1)[0]+"&date="+ev.recur;
121        window.location="index.php?menuaction=calendar.uicalendar.view&cal_id="+id_mod;
122    }
123
124</script>
125
126
127<!-- END day -->
Note: See TracBrowser for help on using the repository browser.