source: branches/2.2.0.1/calendar/js/dhtmlx/samples/03_extensions/22_multiselect_initial_loading.html @ 4001

Revision 4001, 3.2 KB checked in by rafaelraymundo, 13 years ago (diff)

Ticket #1615 - Componente novo para agenda......................................

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<head>
4        <meta http-equiv="Content-type" content="text/html; charset=utf-8">
5        <title></title>
6
7        <script src="../../codebase/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script>
8        <script src="../../codebase/ext/dhtmlxscheduler_multiselect.js" type="text/javascript" charset="utf-8"></script>
9        <link rel="stylesheet" href="../../codebase/dhtmlxscheduler.css" type="text/css" title="no title" charset="utf-8">
10       
11<style type="text/css" media="screen">
12        html, body{
13                margin:0px;
14                padding:0px;
15                height:100%;
16                overflow:hidden;
17        }       
18       
19        .dhx_multi_select_userselect input {
20                vertical-align: middle;
21        }
22        .dhx_multi_select_fruitselect input {
23                vertical-align: middle;
24        }
25
26</style>
27
28<script type="text/javascript" charset="utf-8">
29        function init() {
30               
31                scheduler.config.xml_date="%Y-%m-%d %H:%i";
32                scheduler.config.prevent_cache = true;
33                scheduler.config.first_hour=4;
34                scheduler.config.details_on_create=true;
35                scheduler.config.details_on_dblclick=true;
36
37
38                scheduler.templates.event_text = function(start, end, event) {
39                        var result = event.text+"<br/>Users: ";
40                       
41                        var users=[];
42                        if (event.user_id){
43                                users = event.user_id.split(",");
44                                for (var i=0; i < users.length; i++)
45                                        users[i] = scheduler.getLabel("user_id",users[i])
46                        }
47                        result += users.join(",");
48                       
49                        return result;
50                }
51
52               
53                scheduler.init('scheduler_here',new Date(2009,10,2),"week");
54                scheduler.load("php/events_multiselect_static.php");
55                var dp = new dataProcessor("php/events_multiselect_static.php");
56                dp.init(scheduler);
57
58                scheduler.locale.labels.section_userselect = "Users";
59                scheduler.locale.labels.section_fruitselect = "Fruits";
60                scheduler.locale.labels.section_description = "Name";
61                scheduler.locale.labels.section_location = "Location";
62
63                scheduler.config.lightbox.sections=[   
64                        { name:"description", height:50, map_to:"text", type:"textarea", focus:true },
65                        { name:"userselect", height:22, map_to:"user_id", type:"multiselect", options: scheduler.serverList("user_id"), script_url: 'php/events_multiselect_options.php', vertical:"false"  },
66                        { name:"fruitselect", height:100, map_to:"fruit_id", type:"multiselect", options: scheduler.serverList("fruit_id"), script_url: 'php/events_multiselect_options.php', vertical:"true" },
67                        { name:"location", height:43, type:"textarea", map_to:"details" },
68                        { name:"time", height:72, type:"time", map_to:"auto"}   
69                ]
70        }
71</script>
72</head>
73
74<body onload="init();">
75        <div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>
76                <div class="dhx_cal_navline">
77                        <div class="dhx_cal_prev_button">&nbsp;</div>
78                        <div class="dhx_cal_next_button">&nbsp;</div>
79                        <div class="dhx_cal_today_button"></div>
80                        <div class="dhx_cal_date"></div>
81                        <div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div>
82                        <div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div>
83                        <div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div>
84                </div>
85                <div class="dhx_cal_header">
86                </div>
87                <div class="dhx_cal_data">
88                </div>         
89        </div>
90</body>
Note: See TracBrowser for help on using the repository browser.