active_frontend 14.0.87 → 14.0.88

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: b28de99318462909f3d47a0b2719b808658cb9c8
4
- data.tar.gz: 976ec697f10a9cc8e87c39ab1774996bf0cd22ed
3
+ metadata.gz: db36a7ee6e93cb8cacc10edae02d000435576e88
4
+ data.tar.gz: 9658e88de35459fbada021e46a6470d7e994dd45
5
5
  SHA512:
6
- metadata.gz: 8c01b6f5db25fd242897c14ef2cf7fd1b0083268ba01928fd0f6485735849f0848e7ca5bac2efa89e84e43f05350b197e5eebe6110f30b325029637a45b75611
7
- data.tar.gz: fde4aa404eb58243c2b87a67fb27cb77eae2d98a9893eaca72ef79b2c920e266d6f84a3989b56461cb621cc3154f382f713ea771c9d35154935dfcc166836dda
6
+ metadata.gz: 9eae717c55f03cdc11455c56b084a4b57128f640005c443ffcb678aded353aa5d287253eb34e150d005edc096becbc7b19e0721ded90a0681024aee6cc7a470b
7
+ data.tar.gz: 92d2882dd8e457a4ada1b7d26502d615133680a4f4d3b34587c259cc0b8534a9556848fcf9b4cacdbbe70149af1926c56bc1379890ebd5d61edf384fcd0e4e3d
@@ -1,3 +1,3 @@
1
1
  module ActiveFrontend
2
- VERSION = '14.0.87'.freeze
2
+ VERSION = '14.0.88'.freeze
3
3
  end
@@ -29,24 +29,43 @@
29
29
  drawEmptyCells: true,
30
30
  rawNumberOnHover: true,
31
31
  initialIntervalNumber: 1,
32
- percentagePercision: 1,
32
+ percentagePercision: 0,
33
33
  classPrefix: 'cohort-',
34
+ useShortMonthNames: true,
34
35
 
35
36
  formatHeaderLabel: function(i) {
36
37
  return (this.initialIntervalNumber - 1 + i).toString();
37
38
  },
38
39
  formatDailyLabel: function(date, i) {
40
+ var name;
41
+
39
42
  date.setDate(date.getDate() + i);
40
- return this.monthNames[date.getMonth()] + ' ' + date.getDate() + ', ' + getYear(date);
43
+
44
+ if (this.useShortMonthNames === true) {
45
+ name = this.shortMonthNames[date.getMonth()];
46
+ } else {
47
+ name = this.monthNames[date.getMonth()];
48
+ }
49
+
50
+ return name + ' ' + date.getDate() + ', ' + getYear(date);
41
51
  },
42
52
  formatWeeklyLabel: function(date, i) {
43
53
  date.setDate(date.getDate() + i * 7);
44
- return this.labels.weekOf + ' ' + this.shortMonthNames[date.getMonth()] + ' ' +
45
- date.getDate() + ', ' + getYear(date);
54
+ return this.labels.weekOf + ' ' + i + ' ' + this.shortMonthNames[date.getMonth()] +
55
+ ' ' + getYear(date);
46
56
  },
47
57
  formatMonthlyLabel: function(date, i) {
58
+ var name;
59
+
48
60
  date.setMonth(date.getMonth() + i);
49
- return this.monthNames[date.getMonth()] + ' ' + getYear(date);
61
+
62
+ if (this.useShortMonthNames === true) {
63
+ name = this.shortMonthNames[date.getMonth()];
64
+ } else {
65
+ name = this.monthNames[date.getMonth()];
66
+ }
67
+
68
+ return name + ' ' + getYear(date);
50
69
  },
51
70
  formatYearlyLabel: function(date, i) {
52
71
  return date.getYear() + 1900 + i;
@@ -86,7 +105,7 @@
86
105
  } else if (isNumber(value) && base > 0) {
87
106
  return (value / base * 100).toFixed(cohortDefaults.percentagePercision);
88
107
  } else if (isNumber(value)) {
89
- return '0.00';
108
+ return '0';
90
109
  }
91
110
  }
92
111
 
@@ -49,7 +49,7 @@
49
49
  .cohort-percentage {
50
50
  &::after {
51
51
  content: '%';
52
- margin-left: 2px;
52
+ margin-left: 1px;
53
53
  }
54
54
  }
55
55
  .cohort-label,
@@ -60,7 +60,7 @@
60
60
  }
61
61
  .cohort-label {
62
62
  text-align: left !important;
63
- width: 140px;
63
+ width: 100px;
64
64
  }
65
65
  .cohort-total {
66
66
  border-right-width: 3px;
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.87
4
+ version: 14.0.88
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-05-06 00:00:00.000000000 Z
11
+ date: 2017-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -328,7 +328,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
328
328
  version: '0'
329
329
  requirements: []
330
330
  rubyforge_project:
331
- rubygems_version: 2.6.11
331
+ rubygems_version: 2.6.12
332
332
  signing_key:
333
333
  specification_version: 4
334
334
  summary: ActiveFrontend Responsive Web Framework