active_frontend 14.0.49 → 14.0.50

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f51f3c438a087fe494899e67fb5300312c0005b4
4
- data.tar.gz: 2fef5bfc75ead00d10d039e955626731fe7c5af2
3
+ metadata.gz: 3f3c27babe77ad6c82d8da16e65f282f7a643373
4
+ data.tar.gz: 972a5e3506c2b63ff0d71450e3ebe92685f000d9
5
5
  SHA512:
6
- metadata.gz: 134777e68db196faeb3e1374eacebde29d5a8ad2b3b90264ca39ab60e54932f5706ebba8727f2928a620baeef99fbfffd1a3b11a1438ad495274830b3b162cce
7
- data.tar.gz: 9d3237b831d1c0248c90a900d9c3d6afbb5f24805b68004c2c726a2a6df31c87935cdb424e0b4cd8dc17557983862c7e5d34653b6816cdd4ac93be1ba5ff109f
6
+ metadata.gz: 767c0268c3399ceb6595d05ef49b9db04f4b91c9470e53faaa68f20666256a3caf11553cf54d3ae3b2caf1007cdecf2194ee6cb133897eb230b48416f16c900d
7
+ data.tar.gz: 5397f80a94133a76642a8c0d14f3f343c0793e971c5e6dde4326ec92505849f3fdb1153c96a729d3765ce629e2b06e92beb04e42e692d188981af028d8d52912
@@ -1,3 +1,3 @@
1
1
  module ActiveFrontend
2
- VERSION = '14.0.49'.freeze
2
+ VERSION = '14.0.50'.freeze
3
3
  end
@@ -38,6 +38,8 @@
38
38
  Choicepicker.prototype.constructor = Choicepicker;
39
39
 
40
40
  Choicepicker.prototype.init = function () {
41
+ if (!this.hasOptions()) return;
42
+
41
43
  this.setWidget();
42
44
  this.setVal();
43
45
 
@@ -51,6 +53,8 @@
51
53
  Choicepicker.prototype.clickWidget = function (e) {
52
54
  e.stopPropagation();
53
55
 
56
+ if (!this.hasOptions()) return;
57
+
54
58
  this.setVal();
55
59
  };
56
60
 
@@ -164,9 +168,17 @@
164
168
  return label + ' (+' + count + ')';
165
169
  };
166
170
 
171
+ Choicepicker.prototype.optionsCount = function () {
172
+ return Object.keys(this.options.options).length;
173
+ };
174
+
175
+ Choicepicker.prototype.hasOptions = function () {
176
+ return this.optionsCount() !== 0;
177
+ };
178
+
167
179
  Choicepicker.prototype.setSelectionsLabel = function () {
168
180
  var _self = this;
169
- var total = Object.keys(this.options.options).length;
181
+ var total = this.optionsCount();
170
182
  var count = 0;
171
183
  var label = '';
172
184
 
@@ -63,7 +63,7 @@ textarea {
63
63
  input:not([type='submit']),
64
64
  select,
65
65
  textarea {
66
- box-shadow: inset 0 -2px 0 0 darkish-color(light-haze);
66
+ box-shadow: inset 0 2px 0 0 darkish-color(light-haze);
67
67
 
68
68
  &[disabled] {
69
69
  @include text-fill-color(color(gray));
@@ -74,12 +74,12 @@ textarea {
74
74
 
75
75
  &.dark {
76
76
  background: color(light-black);
77
- box-shadow: inset 0 -2px 0 0 dark-color(light-black);
77
+ box-shadow: inset 0 2px 0 0 dark-color(light-black);
78
78
 
79
79
  &[disabled] { background: color(black); }
80
80
  }
81
81
  &.light {
82
- box-shadow: inset 0 -2px 0 0 darker-color(light-haze);
82
+ box-shadow: inset 0 2px 0 0 darker-color(light-haze);
83
83
 
84
84
  &[disabled] { background: color(light-haze); }
85
85
  }
@@ -320,7 +320,7 @@ textarea {
320
320
  border: 1px solid;
321
321
  border-color: color(dark-haze);
322
322
  border-radius: border-radius(b);
323
- box-shadow: inset 0 -2px 0 0 darkish-color(light-haze);
323
+ box-shadow: inset 0 2px 0 0 darkish-color(light-haze);
324
324
  display: inline-block;
325
325
  height: 18px;
326
326
  line-height: 18px;
@@ -376,7 +376,7 @@ textarea {
376
376
  &.dark {
377
377
  label {
378
378
  background: color(light-black);
379
- box-shadow: inset 0 -2px 0 0 dark-color(light-black);
379
+ box-shadow: inset 0 2px 0 0 dark-color(light-black);
380
380
 
381
381
  &:hover { background: color(dark-black); }
382
382
  }
@@ -384,7 +384,7 @@ textarea {
384
384
  &.light {
385
385
  label {
386
386
  background: color(light-haze);
387
- box-shadow: inset 0 -2px 0 0 darker-color(light-haze);
387
+ box-shadow: inset 0 2px 0 0 darker-color(light-haze);
388
388
 
389
389
  &:hover { background: color(dark-haze); }
390
390
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_frontend
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.0.49
4
+ version: 14.0.50
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez