visual_condition_builder 2.2.3 → 2.2.4

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: e9f9e0d8ee4df073f8d9990a02ae1cc81ba82710
4
- data.tar.gz: b0d329906f496879da52abb3c48e01701dda103b
3
+ metadata.gz: 8bb92da7c999bd2b2bd3dcef761b7c186f93067d
4
+ data.tar.gz: 49575f596563c4e5e723181e1d78b021d443f57b
5
5
  SHA512:
6
- metadata.gz: 0661cce42b7b0fd8063aee630f16fe2d2be3db8cf6e4f3f6fdf0eb25ffa22e24a70cd24b3f0ac6d8eb72d6eaabeea9a03a5c05333a8e3a5741674bea22aab61e
7
- data.tar.gz: 73b8c91be684b5786bd634317d8ba219649e72dc87ca8e7fdc4db7852f7a43989680394853998e18bac9f7c6c73c7b6c5b83e1c0342efe0cfac4d6e5d9ba05f3
6
+ metadata.gz: cba3a111d82ce69f3042c3836c396f655c2e1922d61e29011fd096975d01b27217290dd3e52192eedb7160d198ac74c61ff51d21e5abe7ab3ce104c13fbf06a4
7
+ data.tar.gz: b79a8272464e5d31f472aa9117e4be3e8f913b77ca2c2b740ed9d80fae388446541eac4f27e509be6f58395cc5edbe2c833f4ea40ab20cfd39bf8d355914fa00
@@ -195,10 +195,11 @@
195
195
  $element.find('.group-conditions').each(function (i, groupConditions) {
196
196
  var field_name = getFieldValue(groupConditions);
197
197
  var operator = getOperator(groupConditions);
198
+ var operatorObj = getOperatorFromField(operator, field_name);
198
199
  var value = getValue(groupConditions);
199
200
  var showValue = getValueElement(groupConditions).is(':visible');
200
201
 
201
- if (!is_blank(field_name) && !is_blank(operator) && showValue && !is_blank(value)) {
202
+ if (!is_blank(field_name) && !is_blank(operator) && showValue && (operatorObj.no_value || !is_blank(value))) {
202
203
  data.push([field_name, operator, value]);
203
204
  } else if (!is_blank(field_name) && !is_blank(operator) && !showValue) { //FIELD AND OPERATOR
204
205
  data.push([field_name, operator]);
@@ -236,7 +237,7 @@
236
237
  if (jQuery.isArray(field_name_or_operators)) {
237
238
  var operators = field_name_or_operators;
238
239
  } else {
239
- var fieldObj = getFieldByName(field_name);
240
+ var fieldObj = getFieldByName(field_name_or_operators);
240
241
  var operators = fieldObj.operators;
241
242
  }
242
243
  var f = $.map(operators, function (h, i) {
@@ -1,3 +1,3 @@
1
1
  module VisualConditionBuilder
2
- VERSION = "2.2.3"
2
+ VERSION = "2.2.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: visual_condition_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.3
4
+ version: 2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno Porto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-27 00:00:00.000000000 Z
11
+ date: 2017-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails