fullcalendar-rails 1.5.4.0 → 1.6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +1 -1
- data/lib/fullcalendar-rails/version.rb +1 -1
- data/vendor/assets/javascripts/fullcalendar.js +398 -240
- data/vendor/assets/javascripts/gcal.js +107 -0
- data/vendor/assets/stylesheets/fullcalendar.css +142 -181
- data/vendor/assets/stylesheets/fullcalendar.print.css +9 -38
- metadata +37 -54
@@ -0,0 +1,107 @@
|
|
1
|
+
/*!
|
2
|
+
* FullCalendar v1.6.1 Google Calendar Plugin
|
3
|
+
* Docs & License: http://arshaw.com/fullcalendar/
|
4
|
+
* (c) 2013 Adam Shaw
|
5
|
+
*/
|
6
|
+
|
7
|
+
(function($) {
|
8
|
+
|
9
|
+
|
10
|
+
var fc = $.fullCalendar;
|
11
|
+
var formatDate = fc.formatDate;
|
12
|
+
var parseISO8601 = fc.parseISO8601;
|
13
|
+
var addDays = fc.addDays;
|
14
|
+
var applyAll = fc.applyAll;
|
15
|
+
|
16
|
+
|
17
|
+
fc.sourceNormalizers.push(function(sourceOptions) {
|
18
|
+
if (sourceOptions.dataType == 'gcal' ||
|
19
|
+
sourceOptions.dataType === undefined &&
|
20
|
+
(sourceOptions.url || '').match(/^(http|https):\/\/www.google.com\/calendar\/feeds\//)) {
|
21
|
+
sourceOptions.dataType = 'gcal';
|
22
|
+
if (sourceOptions.editable === undefined) {
|
23
|
+
sourceOptions.editable = false;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
});
|
27
|
+
|
28
|
+
|
29
|
+
fc.sourceFetchers.push(function(sourceOptions, start, end) {
|
30
|
+
if (sourceOptions.dataType == 'gcal') {
|
31
|
+
return transformOptions(sourceOptions, start, end);
|
32
|
+
}
|
33
|
+
});
|
34
|
+
|
35
|
+
|
36
|
+
function transformOptions(sourceOptions, start, end) {
|
37
|
+
|
38
|
+
var success = sourceOptions.success;
|
39
|
+
var data = $.extend({}, sourceOptions.data || {}, {
|
40
|
+
'start-min': formatDate(start, 'u'),
|
41
|
+
'start-max': formatDate(end, 'u'),
|
42
|
+
'singleevents': true,
|
43
|
+
'max-results': 9999
|
44
|
+
});
|
45
|
+
|
46
|
+
var ctz = sourceOptions.currentTimezone;
|
47
|
+
if (ctz) {
|
48
|
+
data.ctz = ctz = ctz.replace(' ', '_');
|
49
|
+
}
|
50
|
+
|
51
|
+
return $.extend({}, sourceOptions, {
|
52
|
+
url: sourceOptions.url.replace(/\/basic$/, '/full') + '?alt=json-in-script&callback=?',
|
53
|
+
dataType: 'jsonp',
|
54
|
+
data: data,
|
55
|
+
startParam: false,
|
56
|
+
endParam: false,
|
57
|
+
success: function(data) {
|
58
|
+
var events = [];
|
59
|
+
if (data.feed.entry) {
|
60
|
+
$.each(data.feed.entry, function(i, entry) {
|
61
|
+
var startStr = entry['gd$when'][0]['startTime'];
|
62
|
+
var start = parseISO8601(startStr, true);
|
63
|
+
var end = parseISO8601(entry['gd$when'][0]['endTime'], true);
|
64
|
+
var allDay = startStr.indexOf('T') == -1;
|
65
|
+
var url;
|
66
|
+
$.each(entry.link, function(i, link) {
|
67
|
+
if (link.type == 'text/html') {
|
68
|
+
url = link.href;
|
69
|
+
if (ctz) {
|
70
|
+
url += (url.indexOf('?') == -1 ? '?' : '&') + 'ctz=' + ctz;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
});
|
74
|
+
if (allDay) {
|
75
|
+
addDays(end, -1); // make inclusive
|
76
|
+
}
|
77
|
+
events.push({
|
78
|
+
id: entry['gCal$uid']['value'],
|
79
|
+
title: entry['title']['$t'],
|
80
|
+
url: url,
|
81
|
+
start: start,
|
82
|
+
end: end,
|
83
|
+
allDay: allDay,
|
84
|
+
location: entry['gd$where'][0]['valueString'],
|
85
|
+
description: entry['content']['$t']
|
86
|
+
});
|
87
|
+
});
|
88
|
+
}
|
89
|
+
var args = [events].concat(Array.prototype.slice.call(arguments, 1));
|
90
|
+
var res = applyAll(success, this, args);
|
91
|
+
if ($.isArray(res)) {
|
92
|
+
return res;
|
93
|
+
}
|
94
|
+
return events;
|
95
|
+
}
|
96
|
+
});
|
97
|
+
|
98
|
+
}
|
99
|
+
|
100
|
+
|
101
|
+
// legacy
|
102
|
+
fc.gcalFeed = function(url, sourceOptions) {
|
103
|
+
return $.extend({}, sourceOptions, { url: url, dataType: 'gcal' });
|
104
|
+
};
|
105
|
+
|
106
|
+
|
107
|
+
})(jQuery);
|
@@ -1,12 +1,7 @@
|
|
1
|
-
|
2
|
-
* FullCalendar v1.
|
3
|
-
*
|
4
|
-
*
|
5
|
-
* Dual licensed under the MIT and GPL licenses, located in
|
6
|
-
* MIT-LICENSE.txt and GPL-LICENSE.txt respectively.
|
7
|
-
*
|
8
|
-
* Date: Tue Sep 4 23:38:33 2012 -0700
|
9
|
-
*
|
1
|
+
/*!
|
2
|
+
* FullCalendar v1.6.1 Stylesheet
|
3
|
+
* Docs & License: http://arshaw.com/fullcalendar/
|
4
|
+
* (c) 2013 Adam Shaw
|
10
5
|
*/
|
11
6
|
|
12
7
|
|
@@ -79,11 +74,8 @@ html .fc,
|
|
79
74
|
margin-right: -1px;
|
80
75
|
}
|
81
76
|
|
82
|
-
.fc-header .fc-corner-right
|
83
|
-
|
84
|
-
}
|
85
|
-
|
86
|
-
.fc-header .ui-corner-right {
|
77
|
+
.fc-header .fc-corner-right, /* non-theme */
|
78
|
+
.fc-header .ui-corner-right { /* theme */
|
87
79
|
margin-right: 0; /* back to normal */
|
88
80
|
}
|
89
81
|
|
@@ -124,17 +116,17 @@ html .fc,
|
|
124
116
|
|
125
117
|
.fc-widget-header, /* <th>, usually */
|
126
118
|
.fc-widget-content { /* <td>, usually */
|
127
|
-
border: 1px solid #
|
119
|
+
border: 1px solid #ddd;
|
128
120
|
}
|
129
121
|
|
130
122
|
.fc-state-highlight { /* <td> today cell */ /* TODO: add .fc-today to <th> */
|
131
|
-
background: #
|
123
|
+
background: #fcf8e3;
|
132
124
|
}
|
133
125
|
|
134
126
|
.fc-cell-overlay { /* semi-transparent rectangle while dragging */
|
135
|
-
background: #
|
136
|
-
opacity: .
|
137
|
-
filter: alpha(opacity=
|
127
|
+
background: #bce8f1;
|
128
|
+
opacity: .3;
|
129
|
+
filter: alpha(opacity=30); /* for IE */
|
138
130
|
}
|
139
131
|
|
140
132
|
|
@@ -145,43 +137,54 @@ html .fc,
|
|
145
137
|
.fc-button {
|
146
138
|
position: relative;
|
147
139
|
display: inline-block;
|
140
|
+
padding: 0 .6em;
|
141
|
+
overflow: hidden;
|
142
|
+
height: 1.9em;
|
143
|
+
line-height: 1.9em;
|
144
|
+
white-space: nowrap;
|
148
145
|
cursor: pointer;
|
149
146
|
}
|
150
147
|
|
151
148
|
.fc-state-default { /* non-theme */
|
152
|
-
border
|
153
|
-
border-width: 1px 0;
|
149
|
+
border: 1px solid;
|
154
150
|
}
|
155
|
-
|
156
|
-
.fc-
|
157
|
-
|
158
|
-
|
159
|
-
overflow: hidden;
|
151
|
+
|
152
|
+
.fc-state-default.fc-corner-left { /* non-theme */
|
153
|
+
border-top-left-radius: 4px;
|
154
|
+
border-bottom-left-radius: 4px;
|
160
155
|
}
|
161
|
-
|
162
|
-
.fc-state-default
|
163
|
-
border-
|
164
|
-
border-
|
156
|
+
|
157
|
+
.fc-state-default.fc-corner-right { /* non-theme */
|
158
|
+
border-top-right-radius: 4px;
|
159
|
+
border-bottom-right-radius: 4px;
|
165
160
|
}
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
161
|
+
|
162
|
+
/*
|
163
|
+
Our default prev/next buttons use HTML entities like ‹ › « »
|
164
|
+
and we'll try to make them look good cross-browser.
|
165
|
+
*/
|
166
|
+
|
167
|
+
.fc-text-arrow {
|
168
|
+
margin: 0 .1em;
|
169
|
+
font-size: 2em;
|
170
|
+
font-family: "Courier New", Courier, monospace;
|
171
|
+
vertical-align: baseline; /* for IE7 */
|
172
|
+
}
|
173
|
+
|
174
|
+
.fc-button-prev .fc-text-arrow,
|
175
|
+
.fc-button-next .fc-text-arrow { /* for ‹ › */
|
176
|
+
font-weight: bold;
|
174
177
|
}
|
175
178
|
|
176
179
|
/* icon (for jquery ui) */
|
177
180
|
|
178
|
-
.fc-button
|
181
|
+
.fc-button .fc-icon-wrap {
|
179
182
|
position: relative;
|
180
183
|
float: left;
|
181
184
|
top: 50%;
|
182
185
|
}
|
183
186
|
|
184
|
-
.fc-button
|
187
|
+
.fc-button .ui-icon {
|
185
188
|
position: relative;
|
186
189
|
float: left;
|
187
190
|
margin-top: -50%;
|
@@ -189,107 +192,89 @@ html .fc,
|
|
189
192
|
*top: -50%;
|
190
193
|
}
|
191
194
|
|
192
|
-
/*
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
border-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
opacity: .09;
|
211
|
-
filter: alpha(opacity=9);
|
212
|
-
}
|
213
|
-
|
214
|
-
/* button states (determines colors) */
|
215
|
-
|
216
|
-
.fc-state-default,
|
217
|
-
.fc-state-default .fc-button-inner {
|
218
|
-
border-style: solid;
|
219
|
-
border-color: #ccc #bbb #aaa;
|
220
|
-
background: #F3F3F3;
|
221
|
-
color: #000;
|
195
|
+
/*
|
196
|
+
button states
|
197
|
+
borrowed from twitter bootstrap (http://twitter.github.com/bootstrap/)
|
198
|
+
*/
|
199
|
+
|
200
|
+
.fc-state-default {
|
201
|
+
background-color: #f5f5f5;
|
202
|
+
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
|
203
|
+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
|
204
|
+
background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
|
205
|
+
background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
|
206
|
+
background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
|
207
|
+
background-repeat: repeat-x;
|
208
|
+
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
|
209
|
+
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
210
|
+
color: #333;
|
211
|
+
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
|
212
|
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
222
213
|
}
|
223
|
-
|
214
|
+
|
224
215
|
.fc-state-hover,
|
225
|
-
.fc-state-hover .fc-button-inner {
|
226
|
-
border-color: #999;
|
227
|
-
}
|
228
|
-
|
229
216
|
.fc-state-down,
|
230
|
-
.fc-state-down .fc-button-inner {
|
231
|
-
border-color: #555;
|
232
|
-
background: #777;
|
233
|
-
}
|
234
|
-
|
235
217
|
.fc-state-active,
|
236
|
-
.fc-state-
|
237
|
-
|
238
|
-
background: #
|
239
|
-
color: #fff;
|
218
|
+
.fc-state-disabled {
|
219
|
+
color: #333333;
|
220
|
+
background-color: #e6e6e6;
|
240
221
|
}
|
241
|
-
|
242
|
-
.fc-state-
|
243
|
-
|
244
|
-
|
245
|
-
|
222
|
+
|
223
|
+
.fc-state-hover {
|
224
|
+
color: #333333;
|
225
|
+
text-decoration: none;
|
226
|
+
background-position: 0 -15px;
|
227
|
+
-webkit-transition: background-position 0.1s linear;
|
228
|
+
-moz-transition: background-position 0.1s linear;
|
229
|
+
-o-transition: background-position 0.1s linear;
|
230
|
+
transition: background-position 0.1s linear;
|
246
231
|
}
|
247
|
-
|
232
|
+
|
233
|
+
.fc-state-down,
|
234
|
+
.fc-state-active {
|
235
|
+
background-color: #cccccc;
|
236
|
+
background-image: none;
|
237
|
+
outline: 0;
|
238
|
+
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
|
239
|
+
}
|
240
|
+
|
248
241
|
.fc-state-disabled {
|
249
242
|
cursor: default;
|
243
|
+
background-image: none;
|
244
|
+
opacity: 0.65;
|
245
|
+
filter: alpha(opacity=65);
|
246
|
+
box-shadow: none;
|
250
247
|
}
|
251
|
-
|
252
|
-
.fc-state-disabled .fc-button-effect {
|
253
|
-
display: none;
|
254
|
-
}
|
255
|
-
|
248
|
+
|
256
249
|
|
257
250
|
|
258
251
|
/* Global Event Styles
|
259
252
|
------------------------------------------------------------------------*/
|
260
253
|
|
261
254
|
.fc-event {
|
262
|
-
border
|
263
|
-
|
255
|
+
border: 1px solid #3a87ad; /* default BORDER color */
|
256
|
+
background-color: #3a87ad; /* default BACKGROUND color */
|
257
|
+
color: #fff; /* default TEXT color */
|
264
258
|
font-size: .85em;
|
265
259
|
cursor: default;
|
266
260
|
}
|
261
|
+
|
262
|
+
a.fc-event {
|
263
|
+
text-decoration: none;
|
264
|
+
}
|
267
265
|
|
268
266
|
a.fc-event,
|
269
267
|
.fc-event-draggable {
|
270
268
|
cursor: pointer;
|
271
269
|
}
|
272
270
|
|
273
|
-
a.fc-event {
|
274
|
-
text-decoration: none;
|
275
|
-
}
|
276
|
-
|
277
271
|
.fc-rtl .fc-event {
|
278
272
|
text-align: right;
|
279
273
|
}
|
280
|
-
|
281
|
-
.fc-event-skin {
|
282
|
-
border-color: #36c; /* default BORDER color */
|
283
|
-
background-color: #36c; /* default BACKGROUND color */
|
284
|
-
color: #fff; /* default TEXT color */
|
285
|
-
}
|
286
|
-
|
274
|
+
|
287
275
|
.fc-event-inner {
|
288
|
-
position: relative;
|
289
276
|
width: 100%;
|
290
277
|
height: 100%;
|
291
|
-
border-style: solid;
|
292
|
-
border-width: 0;
|
293
278
|
overflow: hidden;
|
294
279
|
}
|
295
280
|
|
@@ -298,7 +283,7 @@ a.fc-event {
|
|
298
283
|
padding: 0 1px;
|
299
284
|
}
|
300
285
|
|
301
|
-
.fc .ui-resizable-handle {
|
286
|
+
.fc .ui-resizable-handle {
|
302
287
|
display: block;
|
303
288
|
position: absolute;
|
304
289
|
z-index: 99999;
|
@@ -316,6 +301,20 @@ a.fc-event {
|
|
316
301
|
border-width: 1px 0;
|
317
302
|
margin-bottom: 1px;
|
318
303
|
}
|
304
|
+
|
305
|
+
.fc-ltr .fc-event-hori.fc-event-start,
|
306
|
+
.fc-rtl .fc-event-hori.fc-event-end {
|
307
|
+
border-left-width: 1px;
|
308
|
+
border-top-left-radius: 3px;
|
309
|
+
border-bottom-left-radius: 3px;
|
310
|
+
}
|
311
|
+
|
312
|
+
.fc-ltr .fc-event-hori.fc-event-end,
|
313
|
+
.fc-rtl .fc-event-hori.fc-event-start {
|
314
|
+
border-right-width: 1px;
|
315
|
+
border-top-right-radius: 3px;
|
316
|
+
border-bottom-right-radius: 3px;
|
317
|
+
}
|
319
318
|
|
320
319
|
/* resizable */
|
321
320
|
|
@@ -341,66 +340,6 @@ a.fc-event {
|
|
341
340
|
|
342
341
|
|
343
342
|
|
344
|
-
/* Fake Rounded Corners (for buttons and events)
|
345
|
-
------------------------------------------------------------*/
|
346
|
-
|
347
|
-
.fc-corner-left {
|
348
|
-
margin-left: 1px;
|
349
|
-
}
|
350
|
-
|
351
|
-
.fc-corner-left .fc-button-inner,
|
352
|
-
.fc-corner-left .fc-event-inner {
|
353
|
-
margin-left: -1px;
|
354
|
-
}
|
355
|
-
|
356
|
-
.fc-corner-right {
|
357
|
-
margin-right: 1px;
|
358
|
-
}
|
359
|
-
|
360
|
-
.fc-corner-right .fc-button-inner,
|
361
|
-
.fc-corner-right .fc-event-inner {
|
362
|
-
margin-right: -1px;
|
363
|
-
}
|
364
|
-
|
365
|
-
.fc-corner-top {
|
366
|
-
margin-top: 1px;
|
367
|
-
}
|
368
|
-
|
369
|
-
.fc-corner-top .fc-event-inner {
|
370
|
-
margin-top: -1px;
|
371
|
-
}
|
372
|
-
|
373
|
-
.fc-corner-bottom {
|
374
|
-
margin-bottom: 1px;
|
375
|
-
}
|
376
|
-
|
377
|
-
.fc-corner-bottom .fc-event-inner {
|
378
|
-
margin-bottom: -1px;
|
379
|
-
}
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
/* Fake Rounded Corners SPECIFICALLY FOR EVENTS
|
384
|
-
-----------------------------------------------------------------*/
|
385
|
-
|
386
|
-
.fc-corner-left .fc-event-inner {
|
387
|
-
border-left-width: 1px;
|
388
|
-
}
|
389
|
-
|
390
|
-
.fc-corner-right .fc-event-inner {
|
391
|
-
border-right-width: 1px;
|
392
|
-
}
|
393
|
-
|
394
|
-
.fc-corner-top .fc-event-inner {
|
395
|
-
border-top-width: 1px;
|
396
|
-
}
|
397
|
-
|
398
|
-
.fc-corner-bottom .fc-event-inner {
|
399
|
-
border-bottom-width: 1px;
|
400
|
-
}
|
401
|
-
|
402
|
-
|
403
|
-
|
404
343
|
/* Reusable Separate-border Table
|
405
344
|
------------------------------------------------------------*/
|
406
345
|
|
@@ -436,6 +375,15 @@ table.fc-border-separate {
|
|
436
375
|
.fc-grid th {
|
437
376
|
text-align: center;
|
438
377
|
}
|
378
|
+
|
379
|
+
.fc .fc-week-number {
|
380
|
+
width: 22px;
|
381
|
+
text-align: center;
|
382
|
+
}
|
383
|
+
|
384
|
+
.fc .fc-week-number div {
|
385
|
+
padding: 0 2px;
|
386
|
+
}
|
439
387
|
|
440
388
|
.fc-grid .fc-day-number {
|
441
389
|
float: right;
|
@@ -492,6 +440,10 @@ table.fc-border-separate {
|
|
492
440
|
white-space: nowrap;
|
493
441
|
font-weight: normal;
|
494
442
|
}
|
443
|
+
|
444
|
+
.fc-agenda .fc-week-number {
|
445
|
+
font-weight: bold;
|
446
|
+
}
|
495
447
|
|
496
448
|
.fc-agenda .fc-day-content {
|
497
449
|
padding: 2px 2px 1px;
|
@@ -566,19 +518,28 @@ table.fc-border-separate {
|
|
566
518
|
.fc-event-vert {
|
567
519
|
border-width: 0 1px;
|
568
520
|
}
|
569
|
-
|
570
|
-
.fc-event-vert
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
521
|
+
|
522
|
+
.fc-event-vert.fc-event-start {
|
523
|
+
border-top-width: 1px;
|
524
|
+
border-top-left-radius: 3px;
|
525
|
+
border-top-right-radius: 3px;
|
526
|
+
}
|
527
|
+
|
528
|
+
.fc-event-vert.fc-event-end {
|
529
|
+
border-bottom-width: 1px;
|
530
|
+
border-bottom-left-radius: 3px;
|
531
|
+
border-bottom-right-radius: 3px;
|
576
532
|
}
|
577
533
|
|
578
534
|
.fc-event-vert .fc-event-time {
|
579
535
|
white-space: nowrap;
|
580
536
|
font-size: 10px;
|
581
537
|
}
|
538
|
+
|
539
|
+
.fc-event-vert .fc-event-inner {
|
540
|
+
position: relative;
|
541
|
+
z-index: 2;
|
542
|
+
}
|
582
543
|
|
583
544
|
.fc-event-vert .fc-event-bg { /* makes the event lighter w/ a semi-transparent overlay */
|
584
545
|
position: absolute;
|
@@ -588,8 +549,8 @@ table.fc-border-separate {
|
|
588
549
|
width: 100%;
|
589
550
|
height: 100%;
|
590
551
|
background: #fff;
|
591
|
-
opacity: .
|
592
|
-
filter: alpha(opacity=
|
552
|
+
opacity: .25;
|
553
|
+
filter: alpha(opacity=25);
|
593
554
|
}
|
594
555
|
|
595
556
|
.fc .ui-draggable-dragging .fc-event-bg, /* TODO: something nicer like .fc-opacity */
|