fullcalendar-rails 2.0.1.0 → 2.0.2.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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b0ae3ec2d5afa8adf8aed5c04a8c244ef4437c6
|
4
|
+
data.tar.gz: c3067afd6f042586f32724aa0ce94d552ddbcfb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdf65c537286e3467ab9a8fd3acfaf040c599d93eda4f4ef4936884e261003a680e837420b64231b70279a5636da0673191af13e1375c90bf3c8dcc8f2ce459f
|
7
|
+
data.tar.gz: 43d5914f669c28d683f2e7307b46761049af0641e08ec0a570bf1c55fc0d145a3a5ff6a21dc890341473518e8bf6113950914c9a3fc0683693a8f97cdf963070
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* FullCalendar v2.0.
|
2
|
+
* FullCalendar v2.0.2
|
3
3
|
* Docs & License: http://arshaw.com/fullcalendar/
|
4
4
|
* (c) 2013 Adam Shaw
|
5
5
|
*/
|
@@ -168,7 +168,7 @@ var rtlDefaults = {
|
|
168
168
|
|
169
169
|
;;
|
170
170
|
|
171
|
-
var fc = $.fullCalendar = { version: "2.0.
|
171
|
+
var fc = $.fullCalendar = { version: "2.0.2" };
|
172
172
|
var fcViews = fc.views = {};
|
173
173
|
|
174
174
|
|
@@ -1336,11 +1336,21 @@ function EventManager(options) { // assumed to be a calendar
|
|
1336
1336
|
|
1337
1337
|
function fetchEventSource(source, fetchID) {
|
1338
1338
|
_fetchEventSource(source, function(events) {
|
1339
|
+
var isArraySource = $.isArray(source.events);
|
1340
|
+
var i;
|
1341
|
+
var event;
|
1342
|
+
|
1339
1343
|
if (fetchID == currentFetchID) {
|
1340
1344
|
|
1341
1345
|
if (events) {
|
1342
|
-
for (
|
1343
|
-
|
1346
|
+
for (i=0; i<events.length; i++) {
|
1347
|
+
event = events[i];
|
1348
|
+
|
1349
|
+
// event array sources have already been convert to Event Objects
|
1350
|
+
if (!isArraySource) {
|
1351
|
+
event = buildEvent(event, source);
|
1352
|
+
}
|
1353
|
+
|
1344
1354
|
if (event) {
|
1345
1355
|
cache.push(event);
|
1346
1356
|
}
|
@@ -1474,6 +1484,7 @@ function EventManager(options) { // assumed to be a calendar
|
|
1474
1484
|
function addEventSource(sourceInput) {
|
1475
1485
|
var source = buildEventSource(sourceInput);
|
1476
1486
|
if (source) {
|
1487
|
+
sources.push(source);
|
1477
1488
|
pendingSourceCnt++;
|
1478
1489
|
fetchEventSource(source, currentFetchID); // will eventually call reportEvents
|
1479
1490
|
}
|
@@ -1501,6 +1512,14 @@ function EventManager(options) { // assumed to be a calendar
|
|
1501
1512
|
}
|
1502
1513
|
|
1503
1514
|
if (source) {
|
1515
|
+
|
1516
|
+
// for array sources, we convert to standard Event Objects up front
|
1517
|
+
if ($.isArray(source.events)) {
|
1518
|
+
source.events = $.map(source.events, function(eventInput) {
|
1519
|
+
return buildEvent(eventInput, source);
|
1520
|
+
});
|
1521
|
+
}
|
1522
|
+
|
1504
1523
|
for (i=0; i<normalizers.length; i++) {
|
1505
1524
|
normalizers[i].call(t, source);
|
1506
1525
|
}
|
@@ -1599,30 +1618,31 @@ function EventManager(options) { // assumed to be a calendar
|
|
1599
1618
|
|
1600
1619
|
|
1601
1620
|
function removeEvents(filter) {
|
1621
|
+
var eventID;
|
1602
1622
|
var i;
|
1603
|
-
|
1604
|
-
|
1605
|
-
//
|
1606
|
-
|
1607
|
-
|
1608
|
-
|
1609
|
-
|
1610
|
-
|
1611
|
-
|
1612
|
-
|
1613
|
-
|
1614
|
-
|
1615
|
-
|
1616
|
-
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1620
|
-
|
1621
|
-
|
1622
|
-
|
1623
|
-
}
|
1623
|
+
|
1624
|
+
if (filter == null) { // null or undefined. remove all events
|
1625
|
+
filter = function() { return true; }; // will always match
|
1626
|
+
}
|
1627
|
+
else if (!$.isFunction(filter)) { // an event ID
|
1628
|
+
eventID = filter + '';
|
1629
|
+
filter = function(event) {
|
1630
|
+
return event._id == eventID;
|
1631
|
+
};
|
1632
|
+
}
|
1633
|
+
|
1634
|
+
// Purge event(s) from our local cache
|
1635
|
+
cache = $.grep(cache, filter, true); // inverse=true
|
1636
|
+
|
1637
|
+
// Remove events from array sources.
|
1638
|
+
// This works because they have been converted to official Event Objects up front.
|
1639
|
+
// (and as a result, event._id has been calculated).
|
1640
|
+
for (i=0; i<sources.length; i++) {
|
1641
|
+
if ($.isArray(sources[i].events)) {
|
1642
|
+
sources[i].events = $.grep(sources[i].events, filter, true);
|
1624
1643
|
}
|
1625
1644
|
}
|
1645
|
+
|
1626
1646
|
reportEvents(cache);
|
1627
1647
|
}
|
1628
1648
|
|
@@ -1631,7 +1651,7 @@ function EventManager(options) { // assumed to be a calendar
|
|
1631
1651
|
if ($.isFunction(filter)) {
|
1632
1652
|
return $.grep(cache, filter);
|
1633
1653
|
}
|
1634
|
-
else if (filter) { // an event ID
|
1654
|
+
else if (filter != null) { // not null, not undefined. an event ID
|
1635
1655
|
filter += '';
|
1636
1656
|
return $.grep(cache, function(e) {
|
1637
1657
|
return e._id == filter;
|