fullcalendar-rails 2.6.0.0 → 2.6.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fullcalendar-rails/version.rb +1 -1
- data/vendor/assets/javascripts/fullcalendar.js +79 -74
- data/vendor/assets/javascripts/fullcalendar/gcal.js +1 -1
- data/vendor/assets/stylesheets/fullcalendar.css +1 -1
- data/vendor/assets/stylesheets/fullcalendar.print.css +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8b6f7ceba490bcaee40675f5231556b0b58eb58
|
4
|
+
data.tar.gz: ce31a06b8322051b0927702b710d10988261e9a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a08956c7cbd276bf35e0ea4d098e6f85eb66e36b87469c3852f61fd4e75bda3f6f2be7d46d85dbf9164506078c9677cc6314518ddbe25a5a361b89af20d3bfc
|
7
|
+
data.tar.gz: fb4f8fcce54c9388d955d7b1f6f2299a7a5821ba0df39b1a8c6be83b15884e3a1e85ea49f5726c043debe4deecc268c7d8cd95d1261e0f3509c94738b18806ef
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* FullCalendar v2.6.
|
2
|
+
* FullCalendar v2.6.1
|
3
3
|
* Docs & License: http://fullcalendar.io/
|
4
4
|
* (c) 2015 Adam Shaw
|
5
5
|
*/
|
@@ -19,8 +19,8 @@
|
|
19
19
|
;;
|
20
20
|
|
21
21
|
var FC = $.fullCalendar = {
|
22
|
-
version: "2.6.
|
23
|
-
internalApiVersion:
|
22
|
+
version: "2.6.1",
|
23
|
+
internalApiVersion: 3
|
24
24
|
};
|
25
25
|
var fcViews = FC.views = {};
|
26
26
|
|
@@ -2064,6 +2064,14 @@ var CoordCache = FC.CoordCache = Class.extend({
|
|
2064
2064
|
},
|
2065
2065
|
|
2066
2066
|
|
2067
|
+
// When called, if coord caches aren't built, builds them
|
2068
|
+
ensureBuilt: function() {
|
2069
|
+
if (!this.origin) {
|
2070
|
+
this.build();
|
2071
|
+
}
|
2072
|
+
},
|
2073
|
+
|
2074
|
+
|
2067
2075
|
// Compute and return what the elements' bounding rectangle is, from the user's perspective.
|
2068
2076
|
// Right now, only returns a rectangle if constrained by an overflow:scroll element.
|
2069
2077
|
queryBoundingRect: function() {
|
@@ -2116,6 +2124,8 @@ var CoordCache = FC.CoordCache = Class.extend({
|
|
2116
2124
|
// Given a left offset (from document left), returns the index of the el that it horizontally intersects.
|
2117
2125
|
// If no intersection is made, or outside of the boundingRect, returns undefined.
|
2118
2126
|
getHorizontalIndex: function(leftOffset) {
|
2127
|
+
this.ensureBuilt();
|
2128
|
+
|
2119
2129
|
var boundingRect = this.boundingRect;
|
2120
2130
|
var lefts = this.lefts;
|
2121
2131
|
var rights = this.rights;
|
@@ -2135,6 +2145,8 @@ var CoordCache = FC.CoordCache = Class.extend({
|
|
2135
2145
|
// Given a top offset (from document top), returns the index of the el that it vertically intersects.
|
2136
2146
|
// If no intersection is made, or outside of the boundingRect, returns undefined.
|
2137
2147
|
getVerticalIndex: function(topOffset) {
|
2148
|
+
this.ensureBuilt();
|
2149
|
+
|
2138
2150
|
var boundingRect = this.boundingRect;
|
2139
2151
|
var tops = this.tops;
|
2140
2152
|
var bottoms = this.bottoms;
|
@@ -2153,12 +2165,14 @@ var CoordCache = FC.CoordCache = Class.extend({
|
|
2153
2165
|
|
2154
2166
|
// Gets the left offset (from document left) of the element at the given index
|
2155
2167
|
getLeftOffset: function(leftIndex) {
|
2168
|
+
this.ensureBuilt();
|
2156
2169
|
return this.lefts[leftIndex];
|
2157
2170
|
},
|
2158
2171
|
|
2159
2172
|
|
2160
2173
|
// Gets the left position (from offsetParent left) of the element at the given index
|
2161
2174
|
getLeftPosition: function(leftIndex) {
|
2175
|
+
this.ensureBuilt();
|
2162
2176
|
return this.lefts[leftIndex] - this.origin.left;
|
2163
2177
|
},
|
2164
2178
|
|
@@ -2166,6 +2180,7 @@ var CoordCache = FC.CoordCache = Class.extend({
|
|
2166
2180
|
// Gets the right offset (from document left) of the element at the given index.
|
2167
2181
|
// This value is NOT relative to the document's right edge, like the CSS concept of "right" would be.
|
2168
2182
|
getRightOffset: function(leftIndex) {
|
2183
|
+
this.ensureBuilt();
|
2169
2184
|
return this.rights[leftIndex];
|
2170
2185
|
},
|
2171
2186
|
|
@@ -2173,30 +2188,35 @@ var CoordCache = FC.CoordCache = Class.extend({
|
|
2173
2188
|
// Gets the right position (from offsetParent left) of the element at the given index.
|
2174
2189
|
// This value is NOT relative to the offsetParent's right edge, like the CSS concept of "right" would be.
|
2175
2190
|
getRightPosition: function(leftIndex) {
|
2191
|
+
this.ensureBuilt();
|
2176
2192
|
return this.rights[leftIndex] - this.origin.left;
|
2177
2193
|
},
|
2178
2194
|
|
2179
2195
|
|
2180
2196
|
// Gets the width of the element at the given index
|
2181
2197
|
getWidth: function(leftIndex) {
|
2198
|
+
this.ensureBuilt();
|
2182
2199
|
return this.rights[leftIndex] - this.lefts[leftIndex];
|
2183
2200
|
},
|
2184
2201
|
|
2185
2202
|
|
2186
2203
|
// Gets the top offset (from document top) of the element at the given index
|
2187
2204
|
getTopOffset: function(topIndex) {
|
2205
|
+
this.ensureBuilt();
|
2188
2206
|
return this.tops[topIndex];
|
2189
2207
|
},
|
2190
2208
|
|
2191
2209
|
|
2192
2210
|
// Gets the top position (from offsetParent top) of the element at the given position
|
2193
2211
|
getTopPosition: function(topIndex) {
|
2212
|
+
this.ensureBuilt();
|
2194
2213
|
return this.tops[topIndex] - this.origin.top;
|
2195
2214
|
},
|
2196
2215
|
|
2197
2216
|
// Gets the bottom offset (from the document top) of the element at the given index.
|
2198
2217
|
// This value is NOT relative to the offsetParent's bottom edge, like the CSS concept of "bottom" would be.
|
2199
2218
|
getBottomOffset: function(topIndex) {
|
2219
|
+
this.ensureBuilt();
|
2200
2220
|
return this.bottoms[topIndex];
|
2201
2221
|
},
|
2202
2222
|
|
@@ -2204,12 +2224,14 @@ var CoordCache = FC.CoordCache = Class.extend({
|
|
2204
2224
|
// Gets the bottom position (from the offsetParent top) of the element at the given index.
|
2205
2225
|
// This value is NOT relative to the offsetParent's bottom edge, like the CSS concept of "bottom" would be.
|
2206
2226
|
getBottomPosition: function(topIndex) {
|
2227
|
+
this.ensureBuilt();
|
2207
2228
|
return this.bottoms[topIndex] - this.origin.top;
|
2208
2229
|
},
|
2209
2230
|
|
2210
2231
|
|
2211
2232
|
// Gets the height of the element at the given index
|
2212
2233
|
getHeight: function(topIndex) {
|
2234
|
+
this.ensureBuilt();
|
2213
2235
|
return this.bottoms[topIndex] - this.tops[topIndex];
|
2214
2236
|
}
|
2215
2237
|
|
@@ -3727,20 +3749,9 @@ Grid.mixin({
|
|
3727
3749
|
|
3728
3750
|
// Generates a semicolon-separated CSS string to be used for the default rendering of a background event.
|
3729
3751
|
// Called by the fill system.
|
3730
|
-
// TODO: consolidate with getEventSkinCss?
|
3731
3752
|
bgEventSegCss: function(seg) {
|
3732
|
-
var view = this.view;
|
3733
|
-
var event = seg.event;
|
3734
|
-
var source = event.source || {};
|
3735
|
-
|
3736
3753
|
return {
|
3737
|
-
'background-color':
|
3738
|
-
event.backgroundColor ||
|
3739
|
-
event.color ||
|
3740
|
-
source.backgroundColor ||
|
3741
|
-
source.color ||
|
3742
|
-
view.opt('eventBackgroundColor') ||
|
3743
|
-
view.opt('eventColor')
|
3754
|
+
'background-color': this.getSegSkinCss(seg)['background-color']
|
3744
3755
|
};
|
3745
3756
|
},
|
3746
3757
|
|
@@ -4323,7 +4334,8 @@ Grid.mixin({
|
|
4323
4334
|
|
4324
4335
|
|
4325
4336
|
// Utility for generating event skin-related CSS properties
|
4326
|
-
|
4337
|
+
getSegSkinCss: function(seg) {
|
4338
|
+
var event = seg.event;
|
4327
4339
|
var view = this.view;
|
4328
4340
|
var source = event.source || {};
|
4329
4341
|
var eventColor = event.color;
|
@@ -5546,7 +5558,7 @@ DayGrid.mixin({
|
|
5546
5558
|
var isResizableFromEnd = !disableResizing && event.allDay &&
|
5547
5559
|
seg.isEnd && view.isEventResizableFromEnd(event);
|
5548
5560
|
var classes = this.getSegClasses(seg, isDraggable, isResizableFromStart || isResizableFromEnd);
|
5549
|
-
var skinCss = cssToStr(this.
|
5561
|
+
var skinCss = cssToStr(this.getSegSkinCss(seg));
|
5550
5562
|
var timeHtml = '';
|
5551
5563
|
var timeText;
|
5552
5564
|
var titleHtml;
|
@@ -6902,7 +6914,7 @@ TimeGrid.mixin({
|
|
6902
6914
|
var isResizableFromStart = !disableResizing && seg.isStart && view.isEventResizableFromStart(event);
|
6903
6915
|
var isResizableFromEnd = !disableResizing && seg.isEnd && view.isEventResizableFromEnd(event);
|
6904
6916
|
var classes = this.getSegClasses(seg, isDraggable, isResizableFromStart || isResizableFromEnd);
|
6905
|
-
var skinCss = cssToStr(this.
|
6917
|
+
var skinCss = cssToStr(this.getSegSkinCss(seg));
|
6906
6918
|
var timeText;
|
6907
6919
|
var fullTimeText; // more verbose time text. for the print stylesheet
|
6908
6920
|
var startTimeText; // just the start time text
|
@@ -7313,9 +7325,12 @@ var View = FC.View = Class.extend({
|
|
7313
7325
|
// document handlers, bound to `this` object
|
7314
7326
|
documentMousedownProxy: null, // TODO: doesn't work with touch
|
7315
7327
|
|
7316
|
-
//
|
7317
|
-
|
7318
|
-
|
7328
|
+
// now indicator
|
7329
|
+
isNowIndicatorRendered: null,
|
7330
|
+
initialNowDate: null, // result first getNow call
|
7331
|
+
initialNowQueriedMs: null, // ms time the getNow was called
|
7332
|
+
nowIndicatorTimeoutID: null, // for refresh timing of now indicator
|
7333
|
+
nowIndicatorIntervalID: null, // "
|
7319
7334
|
|
7320
7335
|
|
7321
7336
|
constructor: function(calendar, type, options, intervalDuration) {
|
@@ -7585,22 +7600,6 @@ var View = FC.View = Class.extend({
|
|
7585
7600
|
},
|
7586
7601
|
|
7587
7602
|
|
7588
|
-
// If the view has already been displayed, tears it down and displays it again.
|
7589
|
-
// Will re-render the events if necessary, which display/clear DO NOT do.
|
7590
|
-
// TODO: make behavior more consistent.
|
7591
|
-
redisplay: function() {
|
7592
|
-
if (this.isSkeletonRendered) {
|
7593
|
-
var wasEventsRendered = this.isEventsRendered;
|
7594
|
-
this.clearEvents(); // won't trigger handlers if events never rendered
|
7595
|
-
this.clearView();
|
7596
|
-
this.displayView();
|
7597
|
-
if (wasEventsRendered) { // only render and trigger handlers if events previously rendered
|
7598
|
-
this.displayEvents(this.calendar.getEventCache());
|
7599
|
-
}
|
7600
|
-
}
|
7601
|
-
},
|
7602
|
-
|
7603
|
-
|
7604
7603
|
// Displays the view's non-event content, such as date-related content or anything required by events.
|
7605
7604
|
// Renders the view's non-content skeleton if necessary.
|
7606
7605
|
// Can be asynchronous and return a promise.
|
@@ -7618,10 +7617,7 @@ var View = FC.View = Class.extend({
|
|
7618
7617
|
this.renderDates();
|
7619
7618
|
this.updateSize();
|
7620
7619
|
this.renderBusinessHours(); // might need coordinates, so should go after updateSize()
|
7621
|
-
|
7622
|
-
if (this.opt('nowIndicator')) {
|
7623
|
-
this.startNowIndicator();
|
7624
|
-
}
|
7620
|
+
this.startNowIndicator();
|
7625
7621
|
},
|
7626
7622
|
|
7627
7623
|
|
@@ -7723,34 +7719,42 @@ var View = FC.View = Class.extend({
|
|
7723
7719
|
// TODO: somehow do this for the current whole day's background too
|
7724
7720
|
startNowIndicator: function() {
|
7725
7721
|
var _this = this;
|
7726
|
-
var unit
|
7727
|
-
var
|
7728
|
-
var initialNowQueried; // ms time of then getNow was called
|
7722
|
+
var unit;
|
7723
|
+
var update;
|
7729
7724
|
var delay; // ms wait value
|
7730
7725
|
|
7731
|
-
|
7732
|
-
|
7733
|
-
|
7734
|
-
|
7735
|
-
|
7736
|
-
|
7737
|
-
|
7726
|
+
if (this.opt('nowIndicator')) {
|
7727
|
+
unit = this.getNowIndicatorUnit();
|
7728
|
+
if (unit) {
|
7729
|
+
update = proxy(this, 'updateNowIndicator'); // bind to `this`
|
7730
|
+
|
7731
|
+
this.initialNowDate = this.calendar.getNow();
|
7732
|
+
this.initialNowQueriedMs = +new Date();
|
7733
|
+
this.renderNowIndicator(this.initialNowDate);
|
7734
|
+
this.isNowIndicatorRendered = true;
|
7735
|
+
|
7736
|
+
// wait until the beginning of the next interval
|
7737
|
+
delay = this.initialNowDate.clone().startOf(unit).add(1, unit) - this.initialNowDate;
|
7738
|
+
this.nowIndicatorTimeoutID = setTimeout(function() {
|
7739
|
+
_this.nowIndicatorTimeoutID = null;
|
7740
|
+
update();
|
7741
|
+
delay = +moment.duration(1, unit);
|
7742
|
+
delay = Math.max(100, delay); // prevent too frequent
|
7743
|
+
_this.nowIndicatorIntervalID = setInterval(update, delay); // update every interval
|
7744
|
+
}, delay);
|
7745
|
+
}
|
7738
7746
|
}
|
7747
|
+
},
|
7739
7748
|
|
7740
|
-
if (unit) {
|
7741
|
-
initialNow = this.calendar.getNow();
|
7742
|
-
initialNowQueried = +new Date();
|
7743
|
-
this.renderNowIndicator(initialNow);
|
7744
7749
|
|
7745
|
-
|
7746
|
-
|
7747
|
-
|
7748
|
-
|
7749
|
-
|
7750
|
-
|
7751
|
-
|
7752
|
-
|
7753
|
-
}, delay);
|
7750
|
+
// rerenders the now indicator, computing the new current time from the amount of time that has passed
|
7751
|
+
// since the initial getNow call.
|
7752
|
+
updateNowIndicator: function() {
|
7753
|
+
if (this.isNowIndicatorRendered) {
|
7754
|
+
this.unrenderNowIndicator();
|
7755
|
+
this.renderNowIndicator(
|
7756
|
+
this.initialNowDate.clone().add(new Date() - this.initialNowQueriedMs) // add ms
|
7757
|
+
);
|
7754
7758
|
}
|
7755
7759
|
},
|
7756
7760
|
|
@@ -7758,19 +7762,19 @@ var View = FC.View = Class.extend({
|
|
7758
7762
|
// Immediately unrenders the view's current time indicator and stops any re-rendering timers.
|
7759
7763
|
// Won't cause side effects if indicator isn't rendered.
|
7760
7764
|
stopNowIndicator: function() {
|
7761
|
-
|
7765
|
+
if (this.isNowIndicatorRendered) {
|
7762
7766
|
|
7763
|
-
|
7764
|
-
|
7765
|
-
|
7766
|
-
|
7767
|
-
|
7768
|
-
|
7769
|
-
|
7770
|
-
|
7767
|
+
if (this.nowIndicatorTimeoutID) {
|
7768
|
+
clearTimeout(this.nowIndicatorTimeoutID);
|
7769
|
+
this.nowIndicatorTimeoutID = null;
|
7770
|
+
}
|
7771
|
+
if (this.nowIndicatorIntervalID) {
|
7772
|
+
clearTimeout(this.nowIndicatorIntervalID);
|
7773
|
+
this.nowIndicatorIntervalID = null;
|
7774
|
+
}
|
7771
7775
|
|
7772
|
-
if (cleared) { // is the indicator currently display?
|
7773
7776
|
this.unrenderNowIndicator();
|
7777
|
+
this.isNowIndicatorRendered = false;
|
7774
7778
|
}
|
7775
7779
|
},
|
7776
7780
|
|
@@ -7808,6 +7812,7 @@ var View = FC.View = Class.extend({
|
|
7808
7812
|
|
7809
7813
|
this.updateHeight(isResize);
|
7810
7814
|
this.updateWidth(isResize);
|
7815
|
+
this.updateNowIndicator();
|
7811
7816
|
|
7812
7817
|
if (isResize) {
|
7813
7818
|
this.setScroll(scrollState);
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fullcalendar-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bokmann
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-03-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jquery-rails
|
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
167
|
version: '0'
|
168
168
|
requirements: []
|
169
169
|
rubyforge_project:
|
170
|
-
rubygems_version: 2.
|
170
|
+
rubygems_version: 2.4.8
|
171
171
|
signing_key:
|
172
172
|
specification_version: 4
|
173
173
|
summary: A simple asset pipeline bundling for Ruby on Rails of the FullCalendar jQuery
|