combo_auto_box 0.0.37 → 0.0.38

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: c67fa564b4944481efe66c858f48aeae0badf2e9
4
- data.tar.gz: 25236cc95db3a65da67f65774ca7e755b2074088
3
+ metadata.gz: e93a26a62db0959ed86c1f4bea0c72127b3a0938
4
+ data.tar.gz: bd3d7a44526cf937ecd371a12515f0e7d913565d
5
5
  SHA512:
6
- metadata.gz: c5536945ee3be76e69ad50c2fa1735ef2a3a15c5b04317f7c36098941bbf9ceb5984373d4a56096a575c66f66aba69ceb867d2b266ca2ebfb0f6ff78367042e7
7
- data.tar.gz: 97d45c3f7fe2f9c680d8b8b6e0711bff2bf85589a258e0c888f5ac1f5b72080cac705c1e1955048e9db1358c339a780e096bdec58e00ee23fe5d5429f61b6683
6
+ metadata.gz: 8e8fdbf1076f118360d91e0d981adfd2c24e0b7efb52bef6444276a94bb5348d920dcd5def5d504c716778594e604af714a98ff25d1a8879324ffb78e16168df
7
+ data.tar.gz: c2211df151aa567a6b6922182973aaf3928a7321792aa1ee97495c1223518aa7ceb4e4b31b50831bd156c03d74df99947d0a6562813dcbeee9395eae21c9c54a
@@ -1,3 +1,3 @@
1
1
  module ComboAutoBox
2
- VERSION = '0.0.37'
2
+ VERSION = '0.0.38'
3
3
  end
@@ -640,10 +640,10 @@ var ComboAutoBox = {
640
640
 
641
641
  // add multiple item
642
642
  var addMultipleItem = function (inputId, selectedId, selectedData) {
643
- var targetId = '#' + options.html.name.replace(/[\[\]]/g, '_') + selectedId;
644
- if ((selectedData != '') && ($(targetId).length == 0)) {
643
+ var targetId = (options.html.name + selectedId).replace(/[^A-Za-z0-9]/g, '_');
644
+ if ((selectedData != '') && ($('#' + targetId).length == 0)) {
645
645
  var id = generateAnId('item');
646
- $('#' + inputId).before('<div class="item" id="' + id + '">'+ htmlSafe(selectedData) +'<span class="remove_item" title="Remove Item">x</span><input type="hidden" name="'+ options.html.name +'[]" value="'+ selectedId +'" id=' + options.html.name.replace(/[\[\]]/g, '_') + selectedId + '></div>');
646
+ $('#' + inputId).before('<div class="item" id="' + id + '">'+ htmlSafe(selectedData) +'<span class="remove_item" title="Remove Item">x</span><input type="hidden" name="'+ options.html.name +'[]" value="'+ selectedId +'" id=' + targetId + '></div>');
647
647
 
648
648
  $('#' + id + ' > span').click(function() {
649
649
  $(this).parent().remove();
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.37
4
+ version: 0.0.38
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-21 00:00:00.000000000 Z
11
+ date: 2015-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec