source: branches/2.2.0.1/calendar/js/dhtmlx/samples/03_extensions/14_readonly_event.html @ 4001

Revision 4001, 2.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</head>
7        <script src="../../codebase/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script>
8        <link rel="stylesheet" href="../../codebase/dhtmlxscheduler.css" type="text/css" title="no title" charset="utf-8">
9       
10        <script src="../../codebase/ext/dhtmlxscheduler_readonly.js" type="text/javascript" charset="utf-8"></script>
11        <link rel="stylesheet" href="../../codebase/ext/dhtmlxscheduler_ext.css" type="text/css" media="screen" title="no title" charset="utf-8">
12       
13<style type="text/css" media="screen">
14        html, body{
15                margin:0px;
16                padding:0px;
17                height:100%;
18                overflow:hidden;
19        }       
20</style>
21
22<script type="text/javascript" charset="utf-8">
23        function init() {
24               
25                scheduler.config.xml_date="%Y-%m-%d %H:%i";
26                scheduler.config.api_date="%Y-%m-%d %H:%i";
27                scheduler.config.details_on_dblclick = true;
28                scheduler.init('scheduler_here',new Date(2009,10,1),"month");
29               
30               
31                function block_readonly(id){
32                        if (!id) return true;
33                        return !this.getEvent(id).readonly;
34                }
35                scheduler.attachEvent("onBeforeDrag",block_readonly)
36                scheduler.attachEvent("onClick",block_readonly)
37
38                scheduler.addEvent({
39                        id:1,
40                        start_date:"2009-11-5",
41                        end_date:"2009-11-15",
42                        text:"editable (dbl-click)"
43                });
44               
45                scheduler.addEvent({
46                        id:2,
47                        start_date:"2009-11-20",
48                        end_date:"2009-11-25",
49                        text:"readonly (dbl-click)",
50                        readonly:true
51                });
52               
53        }
54</script>
55
56<body onload="init();">
57        <div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>
58                <div class="dhx_cal_navline">
59                        <div class="dhx_cal_prev_button">&nbsp;</div>
60                        <div class="dhx_cal_next_button">&nbsp;</div>
61                        <div class="dhx_cal_today_button"></div>
62                        <div class="dhx_cal_date"></div>
63                        <div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div>
64                        <div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div>
65                        <div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div>
66                </div>
67                <div class="dhx_cal_header">
68                </div>
69                <div class="dhx_cal_data">
70                </div>         
71        </div>
72</body>
Note: See TracBrowser for help on using the repository browser.