active_frontend 14.0.73 → 14.0.74

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: 3fcdb61070de9ca3f8c1176616a2478a49d899af
4
- data.tar.gz: b034b4e96c8a0a27cae8cc2c9f67e2074a963d52
3
+ metadata.gz: e2390d980325e6debb5b0901a7bf22059d8227a8
4
+ data.tar.gz: c21a5e9359fc102b8cdfee24c676b3d27856e690
5
5
  SHA512:
6
- metadata.gz: 104579dcdef02bf720451896dfdfca08a0b61fded7f2d13539a3e392c8fcf03d0868ac145e17e9b942de4fa76d94e7133dc9ae3a48d2a090ea4a6081ef26e27d
7
- data.tar.gz: 4fa8e723d7d44bc353d2c08e1317c4ca71d5cbd3cba9a4ba3b3473e3741c332f6cc1ddab5d2cfa5b867eb2a1f79244bf22c27881729b2931e27889bcc93097cf
6
+ metadata.gz: 0f477ace1a823d73915d152cf5d0e74e20e8f6a0cdcf9c85a1f1ddc30e909cb5bc245da0e40c95a97012c23035b2547c708db839e00c444b6834e7ab6d49b628
7
+ data.tar.gz: b27ed70a643d1e201d529ae8039439ff2454d08a293eb25b8d0bb05766727b45f8b8068849eac864d6a87d94cf0d5026174bb9ff3ed1ec5e5556468d5aa38e3f
@@ -1,3 +1,3 @@
1
1
  module ActiveFrontend
2
- VERSION = '14.0.73'.freeze
2
+ VERSION = '14.0.74'.freeze
3
3
  end
@@ -78,7 +78,7 @@
78
78
  var _self = this;
79
79
  var menu = $(this.options.menu);
80
80
 
81
- if (this.options.fuzzySearch) {
81
+ if (this.options.fuzzySearch && this.hasFuzzyAmount()) {
82
82
  menu.attr('data-toggle', 'list')
83
83
  .attr('data-input', '#' + this.$fuzzyId)
84
84
  .find('span')
@@ -189,6 +189,14 @@
189
189
  return $('<label for="' + selector + '">');
190
190
  };
191
191
 
192
+ Choicepicker.prototype.hasFuzzyAmount = function () {
193
+ if (this.options.type === 'radio') {
194
+ return this.options.choices.length > 4;
195
+ } else {
196
+ return this.options.choices.length > 3;
197
+ }
198
+ };
199
+
192
200
  Choicepicker.prototype.fuzzyTemplate = function () {
193
201
  var container = $('<div class="form-input form-size-s">');
194
202
  var textbox = $('<input type="text" placeholder="' + this.options.text.placeholder + '" id="' + this.$fuzzyId + '" autofocus>');
@@ -7,7 +7,14 @@
7
7
  var Datepicker = function (element, options) {
8
8
  this.$element = $(element);
9
9
  this.$element.data('datepicker', this);
10
- this.options = $.extend({}, Datepicker.DEFAULTS, options);
10
+ this.settings = {
11
+ endDate: this.$element.data('end-date'),
12
+ forceParse: this.$element.data('force-parse'),
13
+ format: this.$element.data('format'),
14
+ multidate: this.$element.data('multidate'),
15
+ startDate: this.$element.data('start-date')
16
+ };
17
+ this.options = $.extend({}, Datepicker.DEFAULTS, this.settings, options);
11
18
 
12
19
  this.$allowUpdate = true;
13
20
 
@@ -21,8 +21,8 @@
21
21
  seconds: false,
22
22
  step: 5,
23
23
  text: {
24
- am: 'AM',
25
- pm: 'PM'
24
+ am: 'am',
25
+ pm: 'pm'
26
26
  },
27
27
  time: 'current'
28
28
  };
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.73
4
+ version: 14.0.74
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-02-27 00:00:00.000000000 Z
11
+ date: 2017-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails