active_frontend 14.0.96 → 14.0.97
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 +4 -4
- data/lib/active_frontend/version.rb +1 -1
- data/vendor/assets/javascripts/extensions/_cohort.js +57 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c3655e5651c57b16fb2515e2f41f302bd9ed8a8
|
4
|
+
data.tar.gz: 3d97eca3eccf4b8ba7e14d21746298da28832438
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 885358aaadf4d4895e1f1ff77532336dbacc57fc37fb12e8876bf8063b7fcfa1972750c18bb6f90816713bdb65624ef0493f23fb4d084cb13b02d259414fd9bb
|
7
|
+
data.tar.gz: 71e7cc89f1249ad51927c8855a8ce8c44c52ee4458dbc6944cf420e9696c367f93ce8ee54e1861ee3892c5ffae1547b3545bd40a95befc97f120257c4261c525
|
@@ -50,9 +50,62 @@
|
|
50
50
|
|
51
51
|
return name + ' ' + date.getDate();
|
52
52
|
},
|
53
|
+
formatQuarterlyLabel: function(date, i) {
|
54
|
+
var baseDate = date.getDate();
|
55
|
+
var name;
|
56
|
+
|
57
|
+
date.setDate(baseDate + (i * 3));
|
58
|
+
if (this.useShortMonthNames === true) {
|
59
|
+
name = this.shortMonthNames[date.getMonth()];
|
60
|
+
} else {
|
61
|
+
name = this.monthNames[date.getMonth()];
|
62
|
+
}
|
63
|
+
var alphaDate = name + ' ' + date.getDate();
|
64
|
+
|
65
|
+
date.setDate(baseDate + ((i * 3) + 2));
|
66
|
+
if (this.useShortMonthNames === true) {
|
67
|
+
name = this.shortMonthNames[date.getMonth()];
|
68
|
+
} else {
|
69
|
+
name = this.monthNames[date.getMonth()];
|
70
|
+
}
|
71
|
+
var omegaDate = name + ' ' + date.getDate();
|
72
|
+
|
73
|
+
return alphaDate + '-' + omegaDate;
|
74
|
+
},
|
53
75
|
formatWeeklyLabel: function(date, i) {
|
54
|
-
date.
|
55
|
-
|
76
|
+
var baseDate = date.getDate();
|
77
|
+
var morning = [0,3,6,9,12,15,18];
|
78
|
+
var noon = [1,4,7,10,13,16,19];
|
79
|
+
var night = [2,5,8,11,14,17,20];
|
80
|
+
var indexPosition;
|
81
|
+
var timerange;
|
82
|
+
var name;
|
83
|
+
|
84
|
+
indexPosition = morning.indexOf(i);
|
85
|
+
if (indexPosition > -1) {
|
86
|
+
date.setDate(baseDate + indexPosition);
|
87
|
+
timerange = '12A-8A';
|
88
|
+
}
|
89
|
+
|
90
|
+
indexPosition = noon.indexOf(i);
|
91
|
+
if (indexPosition > -1) {
|
92
|
+
date.setDate(baseDate + indexPosition);
|
93
|
+
timerange = '8A-4P';
|
94
|
+
}
|
95
|
+
|
96
|
+
indexPosition = night.indexOf(i);
|
97
|
+
if (indexPosition > -1) {
|
98
|
+
date.setDate(baseDate + indexPosition);
|
99
|
+
timerange = '4P-12A';
|
100
|
+
}
|
101
|
+
|
102
|
+
if (this.useShortMonthNames === true) {
|
103
|
+
name = this.shortMonthNames[date.getMonth()];
|
104
|
+
} else {
|
105
|
+
name = this.monthNames[date.getMonth()];
|
106
|
+
}
|
107
|
+
|
108
|
+
return name + ' ' + date.getDate() + ' ' + timerange;
|
56
109
|
},
|
57
110
|
formatMonthlyLabel: function(date, i) {
|
58
111
|
var name;
|
@@ -203,6 +256,8 @@
|
|
203
256
|
|
204
257
|
if (timeInterval === 'daily') {
|
205
258
|
formatFn = 'formatDailyLabel';
|
259
|
+
} else if (timeInterval === 'quarterly') {
|
260
|
+
formatFn = 'formatQuarterlyLabel';
|
206
261
|
} else if (timeInterval === 'weekly') {
|
207
262
|
formatFn = 'formatWeeklyLabel';
|
208
263
|
} else if (timeInterval === 'monthly') {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_frontend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 14.0.
|
4
|
+
version: 14.0.97
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Gomez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|