Ukázka kompletního kódu
Příklad HTML kódu s předdefinovanými JavaScript komponentami:
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
2
<html lang="en-US">
3
<head>
4
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
5
<title>
6
FlexBook Examples
7
</title>
8
9
<!-- FlexBook JavaScripts -->
10
<script src="https://www.flexbook.cz/jq/jquery.js"></script>
11
<script src="https://www.flexbook.cz/flbv2.js"></script>
12
13
<!-- Integrator's custom CSS -->
14
<link rel="stylesheet" type="text/css" href="example.css" />
15
</head>
16
<body>
17
<h1><a href="index.html">FlexBook Examples<a></h1>
18
<i> Simple examples of predefined FlexBook JavaScript components</i>
19
20
<h2>User Profile</h2>
21
<div id="flexbook_profile"></div>
22
<br>
23
24
<h2>List of all resources</h2>
25
<div id="flexbook_resource_list"></div>
26
27
<h2>List of all events</h2>
28
<div id="flexbook_event_list" style="overflow-y:scroll; height:250px;"></div>
29
<br>
30
31
<h2>List of events with tag 'package'</h2>
32
<div id="flexbook_event_list_packages"></div>
33
<br>
34
35
<h2>Resource detail of resource with ID 7</h2>
36
<div id="flexbook_resource_detail_1"></div>
37
38
<h2>Calendar of resource with ID 7</h2>
39
<div id="flexbook_resource_calendar_1"></div>
40
41
<h2>Calendar of resources with ID 577 and 578 focused to date 2016-11-02</h2>
42
<div id="flexbook_resource_calendar_2"></div>
43
44
<h2>Vertical calendar of resources with ID 577 and 578 focused to date 2016-11-02</h2>
45
<div id="flexbook_resource_calendar_3"></div>
46
47
<script>
48
flbInit('https://www.flexbook.cz/ajax.php',4, [
49
{
50
type: 'flbProfile',
51
placeHolder: 'flexbook_profile',
52
params: {
53
language: 'en',
54
buttons: ['login','logout','profile','password','reservation','registration','credit','sendPassword'],
55
checkAttributeMandatory: 1,
56
externalAccount: 1,
57
extraDiv: 1,
58
},
59
},
60
{
61
type: 'flbResourceList',
62
placeHolder: 'flexbook_resource_list',
63
},
64
{
65
type: 'flbEventList',
66
placeHolder: 'flexbook_event_list',
67
},
68
{
69
type: 'flbEventList',
70
placeHolder: 'flexbook_event_list_packages',
71
params: {
72
tag: ['package'],
73
}
74
},
75
{
76
type: 'flbResourceDetail',
77
placeHolder: 'flexbook_resource_detail_1',
78
params: {
79
resourceId: 7,
80
}
81
},
82
{
83
type: 'flbResourceCalendar',
84
placeHolder: 'flexbook_resource_calendar_1',
85
params: {
86
resourceId: 7,
87
render: ['reservation','occupied','event'],
88
renderText: ['legend','name','description','price'],
89
}
90
},
91
{
92
type: 'flbResourceCalendar',
93
placeHolder: 'flexbook_resource_calendar_2',
94
params: {
95
resourceId: [577,578],
96
dateStart: '2016-11-02',
97
resourceLabel: 'Stolky',
98
resourceWidth: 100,
99
slotWidth: 100,
100
}
101
},
102
{
103
type: 'flbResourceCalendar',
104
placeHolder: 'flexbook_resource_calendar_3',
105
params: {
106
resourceId: [7,535,10],
107
render: ['reservation','occupied','event'],
108
viewDirection : 'vertical',
109
}
110
},
111
]);
112
</script>
113
</body>
114
</html>
Copied!
Otestovaná verze HTML kódu s příklady FlexBookových JavaScript komponent je k dispozici na GitHubu v projektu flexbook-examples na adrese https://github.com/davidpasek/flexbook-examples
Funkční kód je vystaven na adrese http://flexbook.dpasek.com/
Last modified 3yr ago
Copy link