combo_auto_box 0.0.36 → 0.0.37

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: b249fb6201160291353f801d56424060345f8b01
4
- data.tar.gz: fcdcec625e9868871d137db5466bddae01e4cc57
3
+ metadata.gz: c67fa564b4944481efe66c858f48aeae0badf2e9
4
+ data.tar.gz: 25236cc95db3a65da67f65774ca7e755b2074088
5
5
  SHA512:
6
- metadata.gz: 1edeca685cdb39ad87517f58ba4456b5f8ba0bd08296d357cc02b2ea099c7c25b563fdadc4c30c3a2f756c8fe3aff41196d6c3f82ab61697c224d831c2d75af7
7
- data.tar.gz: 6f7eb2fed8215c731f4589f93732e5c1ce937f7960e16a45f926e12239a3fcba3ce2d55958b90cffdb76f5f7fc08d6ef6232e63171e5ab81bf18226b5980e13f
6
+ metadata.gz: c5536945ee3be76e69ad50c2fa1735ef2a3a15c5b04317f7c36098941bbf9ceb5984373d4a56096a575c66f66aba69ceb867d2b266ca2ebfb0f6ff78367042e7
7
+ data.tar.gz: 97d45c3f7fe2f9c680d8b8b6e0711bff2bf85589a258e0c888f5ac1f5b72080cac705c1e1955048e9db1358c339a780e096bdec58e00ee23fe5d5429f61b6683
@@ -1,3 +1,3 @@
1
1
  module ComboAutoBox
2
- VERSION = '0.0.36'
2
+ VERSION = '0.0.37'
3
3
  end
@@ -672,7 +672,7 @@ var ComboAutoBox = {
672
672
  }
673
673
  fieldAttribute = '<input type="hidden" name="q[g]['+ predicate['attribute'] +'][c]['+ ransackId +'][a][0][name]" value="'+ predicate['attribute'] +'">';
674
674
  fieldCondition = '<input type="hidden" name="q[g]['+ predicate['attribute'] +'][c]['+ ransackId +'][p]" value="'+ predicate['condition'] +'">';
675
- fieldValue = '<input type="hidden" name="q[g]['+ predicate['attribute'] +'][c]['+ ransackId +'][v][0][value]" value="'+ getSearchableValue(selectedData) +'">';
675
+ fieldValue = '<input type="hidden" name="q[g]['+ predicate['attribute'] +'][c]['+ ransackId +'][v][0][value]" value="'+ htmlSafe(getSearchableValue(selectedData)) +'">';
676
676
  var id = generateAnId('item');
677
677
  $('#' + inputId).before('<div class="item" id="' + id + '">'+ htmlSafe(selectedData) +'<span class="remove_item" title="Remove Item">x</span>'+ fieldAttribute + fieldCondition + fieldValue +'</div>');
678
678
 
@@ -697,7 +697,7 @@ var ComboAutoBox = {
697
697
  var addSearchableItem = function (inputId, selectedId, selectedData) {
698
698
  if (selectedData != '') {
699
699
  var id = generateAnId('item');
700
- $('#' + inputId).before('<div class="item" id="' + id + '">'+ htmlSafe(selectedData) +'<span title="Remove Item">x</span><input type="hidden" name="'+ options.html.name +'['+ selectedId +'][]" value="'+ getSearchableValue(selectedData) +'"></div>');
700
+ $('#' + inputId).before('<div class="item" id="' + id + '">'+ htmlSafe(selectedData) +'<span title="Remove Item">x</span><input type="hidden" name="'+ options.html.name +'['+ selectedId +'][]" value="'+ htmlSafe(getSearchableValue(selectedData)) +'"></div>');
701
701
 
702
702
  $('#' + id + ' > span').click(function() {
703
703
  $(this).parent().remove();
@@ -747,12 +747,12 @@ var ComboAutoBox = {
747
747
  }
748
748
 
749
749
  var htmlSafe = function(html) {
750
- html = html.replace(/\&/, '&amp;');
751
- html = html.replace(/\</, '&lt;');
752
- html = html.replace(/\>/, '&gt;');
753
- html = html.replace(/\"/, '&quot;');
754
- html = html.replace(/\'/, '&#x27;');
755
- html = html.replace(/\//, '&#x2F;');
750
+ html = html.replace(/\&/g, '&amp;');
751
+ html = html.replace(/\</g, '&lt;');
752
+ html = html.replace(/\>/g, '&gt;');
753
+ html = html.replace(/\"/g, '&quot;');
754
+ html = html.replace(/\'/g, '&#x27;');
755
+ html = html.replace(/\//g, '&#x2F;');
756
756
 
757
757
  return html;
758
758
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: combo_auto_box
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.36
4
+ version: 0.0.37
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adilson Chacon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-12 00:00:00.000000000 Z
11
+ date: 2015-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec