-
Notifications
You must be signed in to change notification settings - Fork 89
/
index.html
289 lines (234 loc) · 12.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8">
<title>Bic_Calendar example</title>
<meta name="description" content="BIC Calendar es un simple calendari per marcar esdeveniments. Un plugin de jQuery i Twitter Bootstrap" />
<meta name="author" content="bic.cat">
<!-- Long live the font Ubuntu ! -->
<link href='http://fonts.googleapis.com/css?family=Ubuntu:400,500,700' rel='stylesheet' type='text/css'>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<script src="../js/bic_calendar.js"></script>
<link href="lib/css/bootstrap.css" rel="stylesheet">
<script src="lib/js/bootstrap.min.js"></script>
<link href="../css/bic_calendar.css" rel="stylesheet">
<script src="https://rawgithub.com/moment/moment/develop/min/moment-with-langs.min.js"></script>
<style>
body{
background: #f0f0f0;
padding-top: 20px;
background-image: url(lib/img/grid-18px-masked.png);
background-position: top;
background-repeat: repeat-x;
background-attachment: fixed;
}
body, div, col-sm-, p, a, h1, h2, h3, h3, h5, h5{
font-family: 'Ubuntu', sans-serif;
}
footer{
padding-top: 100px;
}
.pintam{
box-shadow: rgba(0,0,0,0.3) 0 1px 3px;
background: #f7f7f7;
border-radius: 5px;
}
.jumbotron{
box-shadow: 0 0 10px #ccc;
margin-top: 10px;
margin-bottom: 10px;
}
.atzucac{
padding: 20px;
}
.container{
max-width: 900px;
}
</style>
</head>
<body>
<a href="https://github.com/bichotll/bic_calendar"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
<div class="container">
<div class="row" >
<div class="col-sm-4" >
<script>
$(document).ready(function() {
var monthNames = ["Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Dicembre"];
var dayNames = ["L", "M", "M", "J", "V", "S", "D"];
var events = [
{
date: "28/12/2013",
title: 'SPORT & WELLNESS',
link: 'http://bic.cat',
linkTarget: '_blank',
color: '',
content: '<img src="http://gettingcontacts.com/upload/jornadas/sport-wellness_portada.png" ><br>06-11-2013 - 09:00 <br> Tecnocampus Mataró Auditori',
class: '',
displayMonthController: true,
displayYearController: true,
nMonths: 6
}
];
$('#calendari_lateral1').bic_calendar({
//list of events in array
events: events,
//enable select
enableSelect: true,
//enable multi-select
multiSelect: true,
//set day names
dayNames: dayNames,
//set month names
monthNames: monthNames,
//show dayNames
showDays: true,
//show month controller
displayMonthController: true,
//show year controller
displayYearController: true,
//set ajax call
reqAjax: {
type: 'get',
url: 'http://bic.cat/bic_calendar/index.php'
}
});
});
</script>
<div id="calendari_lateral1"></div>
</div>
<div class="col-sm-8" >
<script>
$(document).ready(function() {
document.addEventListener('bicCalendarSelect', function(e) {
moment.lang('es'); // default the language to English
var dateFirst = new moment(e.detail.dateFirst);
var dateLast = new moment(e.detail.dateLast);
$('#from-day').val(dateFirst.format('LL'));
$('#to-day').val(dateLast.format('LL'));
/*
* more about moment.js
* http://momentjs.com/docs/#/displaying/
*/
});
});
</script>
<h3>Example events select with <a href="http://momentjs.com/" >moment.js</a>:</h3>
<form class="form-horizontal" role="form">
<div class="form-group">
<label class="col-sm-2 control-label">from</label>
<input id="from-day" disabled >
</div>
<div class="form-group">
<label class="col-sm-2 control-label">to</label>
<input id="to-day" disabled >
</div>
</form>
</div>
</div>
<br>
<div class="row" >
<div class="col-sm-8 pintam" >
<div class="atzucac" >
<h3>Dependencias</h3>
<ul>
<li>~jQuery 1.7.2</li>
<li>~Twitter Bootstrap 3.0</li>
</ul>
<hr>
<h3>Options</h3>
<h5></h5>
<dl>
<dt>events (array of event object)</dt>
<dt>startWeekDay (int)</dt>
<dd>default: 0<br>
*1 for english format. Mind the dayNames.</dd>
<dt>dayNames (array)</dt>
<dd>default: ["l", "m", "x", "j", "v", "s", "d"]<br>
*Did you change the startWeekDay? Change the order of this days then.</dd>
<dt>monthNames (array)</dt>
<dd>default: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"]</dd>
<dt>showDays (boolean)</dt>
<dd>default: true</dd>
<dt>reqAjax (json array of event array)</dt>
<dd>
- reqAjax.type (string) {'get', 'post'}<br>
- reqAjax.url (string)
</dd>
<dt>enableSelect (boolean)</dt>
<dd>default: false</dd>
<dt>multiSelect (boolean)</dt>
<dd>default: false</dd>
<dt>displayMonthController (boolean)</dt>
<dd>default: true</dd>
<dt>displayYearController (boolean)</dt>
<dd>default: true</dd>
<dt>popoverOptions (<a href="http://twitter.github.com/bootstrap/javascript.html#popovers" target="_blank" >popover Twitter Bootstrap</a> object)</dt>
<dt>tooltipOptions (<a href="http://twitter.github.com/bootstrap/javascript.html#tooltips" target="_blank" >tooltip Twitter Bootstrap</a> object)</dt>
</dl>
<hr>
<h3>Event object</h3>
<dl>
<dt>date(string):</dt>
<dd>ex: "17/8/1989"</dd>
<dt>title (string)</dt>
<dd>ex: "Event Barberà"</dd>
<dt>link (string)</dt>
<dd>ex: "http://google.es"</dd>
<dt>color(string)</dt>
<dd>ex: "#333"</dd>
<dt>class (string)</dt>
<dd>ex: "activo congreso"</dd>
<dt>content (string)</dt>
<dd>ex: "Text for the content of popover...description of event...image..."</dd>
</dl>
<b>*</b> <i>if content is not defined it will be a tooltip</i>
<hr>
<h3>Event bicCalendarSelect</h3>
<h4>Response:</h4>
<dl>
<dt>detail.dateFirst</dt>
<dd>12/26/1989</dd>
<dt>detail.dateLast</dt>
<dd>12/12/1992</dd>
</dl>
<h4>Example code:</h4>
<pre>
document.addEventListener('bicCalendarSelect', function(e) {
moment.lang('es'); // default the language to English
var dateFirst = new moment(e.detail.dateFirst);
var dateLast = new moment(e.detail.dateLast);
$('#from-day').val(dateFirst.format('LL'));
$('#to-day').val(dateLast.format('LL'));
});
</pre>
<hr>
<h3>Showcase</h3>
<a href="http://gettingcontacts.com" target="_blank">http://gettingcontacts.com</a>
</div>
</div>
<div class="col-sm-4" >
<h1>BIC Calendar</h1><br>
<p>ca - BIC Calendar es un simple calendari per marcar esdeveniments. Un plugin de jQuery i Twitter Bootstrap.</p>
<p>en - BIC Calendar is a simple calendar to mark events, a jQuery plugin and Twitter Bootstrap.</p>
</div>
</div>
<footer>
<p>
<a href="http://bic.cat" >bic.cat</a>
</p>
</footer>
</div>
<!-- Piwik -->
<!--script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://bic.cat/piwik/" : "http://bic.cat/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 3);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script--><noscript><p><img src="http://bic.cat/piwik/piwik.php?idsite=3" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Tracking Code -->
</body>
</html>