Subversion-Projekte lars-tiefland.cienc

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
5 lars 1
<!DOCTYPE html>
2
<html>
3
 
4
    <head>
5
        <meta charset='utf-8' />
6
        <link rel='stylesheet' href='../lib/cupertino/jquery-ui.min.css' />
7
        <link href='../fullcalendar.css' rel='stylesheet' />
8
        <link href='../fullcalendar.print.css' rel='stylesheet' media='print' />
9
        <script src='../lib/moment.min.js'></script>
10
        <script src='../lib/jquery.min.js'></script>
11
        <script src='../fullcalendar.min.js'></script>
12
        <script src='../lang-all.js'></script>
13
        <script>
14
            $(document).ready(function()
15
            {
16
                var currentLangCode = 'en';
17
                // build the language selector's options
18
                $.each($.fullCalendar.langs, function(langCode)
19
                {
20
                    $('#lang-selector').append($('<option/>').attr('value', langCode).prop('selected', langCode == currentLangCode).text(langCode));
21
                });
22
                // rerender the calendar when the selected option changes
23
                $('#lang-selector').on('change', function()
24
                {
25
                    if (this.value)
26
                    {
27
                        currentLangCode = this.value;
28
                        $('#calendar').fullCalendar('destroy');
29
                        renderCalendar();
30
                    }
31
                });
32
 
33
                function renderCalendar()
34
                {
35
                    $('#calendar').fullCalendar(
36
                    {
37
                        header:
38
                        {
39
                            left: 'prev,next today',
40
                            center: 'title',
41
                            right: 'month,agendaWeek,agendaDay'
42
                        },
43
                        defaultDate: '2015-02-12',
44
                        lang: currentLangCode,
45
                        buttonIcons: false, // show the prev/next text
46
                        weekNumbers: true,
47
                        editable: true,
48
                        eventLimit: true, // allow "more" link when too many events
49
                        events: [
50
                        {
51
                            title: 'All Day Event',
52
                            start: '2015-02-01'
53
                        },
54
                        {
55
                            title: 'Long Event',
56
                            start: '2015-02-07',
57
                            end: '2015-02-10'
58
                        },
59
                        {
60
                            id: 999,
61
                            title: 'Repeating Event',
62
                            start: '2015-02-09T16:00:00'
63
                        },
64
                        {
65
                            id: 999,
66
                            title: 'Repeating Event',
67
                            start: '2015-02-16T16:00:00'
68
                        },
69
                        {
70
                            title: 'Conference',
71
                            start: '2015-02-11',
72
                            end: '2015-02-13'
73
                        },
74
                        {
75
                            title: 'Meeting',
76
                            start: '2015-02-12T10:30:00',
77
                            end: '2015-02-12T12:30:00'
78
                        },
79
                        {
80
                            title: 'Lunch',
81
                            start: '2015-02-12T12:00:00'
82
                        },
83
                        {
84
                            title: 'Meeting',
85
                            start: '2015-02-12T14:30:00'
86
                        },
87
                        {
88
                            title: 'Happy Hour',
89
                            start: '2015-02-12T17:30:00'
90
                        },
91
                        {
92
                            title: 'Dinner',
93
                            start: '2015-02-12T20:00:00'
94
                        },
95
                        {
96
                            title: 'Birthday Party',
97
                            start: '2015-02-13T07:00:00'
98
                        },
99
                        {
100
                            title: 'Click for Google',
101
                            url: 'http://google.com/',
102
                            start: '2015-02-28'
103
                        }]
104
                    });
105
                }
106
                renderCalendar();
107
            });
108
        </script>
109
        <style>
110
            body {
111
                margin: 0;
112
                padding: 0;
113
                font-family: "Lucida Grande", Helvetica, Arial, Verdana, sans-serif;
114
                font-size: 14px;
115
            }
116
 
117
            #top {
118
                background: #eee;
119
                border-bottom: 1px solid #ddd;
120
                padding: 0 10px;
121
                line-height: 40px;
122
                font-size: 12px;
123
            }
124
 
125
            #calendar {
126
                max-width: 900px;
127
                margin: 40px auto;
128
                padding: 0 10px;
129
            }
130
        </style>
131
    </head>
132
 
133
    <body>
134
        <div id='top'> Language:
135
            <select id='lang-selector'></select>
136
        </div>
137
        <div id='calendar'></div>
138
    </body>
139
 
140
</html>