combo_auto_box 0.0.43 → 0.0.44

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: 4f444e5cbe3ac0648bed00bd1f3ca60e71cd4b01
4
- data.tar.gz: 1f7df631a41667b9af72a167231caa759ff48743
3
+ metadata.gz: 612a5d45bcb22d376ee1bc0c58379d9a92646312
4
+ data.tar.gz: 0b01964616825348a48c43e09cb61a0ad452f3a4
5
5
  SHA512:
6
- metadata.gz: d9f772a423cabba75a7ccb6adf0847f3f8a37e2e53a9bf7bf3851dcb68e6c6d70e7a16b9105cb1c6abca676c355d2c1ea35821e0963aa6acf638201f504634a3
7
- data.tar.gz: 37988d24056b81e386a4a48b99ca49fad400de9aff7eb6fbbb790a7f1e03fb78e896e588afaa7f6a7169582d25446c2b795595231772f25952d8201a12974e0c
6
+ metadata.gz: e70674389c925b168dfaad3861a231524287dbfed0bb1f77eadaaf6d6adae8bd4d0d352e942a2aa940fe905b2831f77e163b8ab3a8b48c382cdc5fe565a69e27
7
+ data.tar.gz: 51851e48dcb94de8e37faa9500c0fe19ca241b7e5642f1ef7cedd2415a66d2076ab3fe42a189c30fe2920d33f0827d2d9e22947e75cee472edeaf0c761016971
@@ -1,3 +1,3 @@
1
1
  module ComboAutoBox
2
- VERSION = '0.0.43'
2
+ VERSION = '0.0.44'
3
3
  end
@@ -658,10 +658,11 @@ var ComboAutoBox = {
658
658
 
659
659
  // add multiple item
660
660
  var addMultipleItem = function (inputId, selectedId, selectedData) {
661
+ console.log(selectedId);
661
662
  var targetId = (options.html.name + selectedId).replace(/[^A-Za-z0-9]/g, '_');
662
663
  if ((selectedData != '') && ($('#' + targetId).length == 0)) {
663
664
  var id = generateAnId('item');
664
- $('#' + 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>');
665
+ $('#' + 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="'+ htmlSafe(selectedId.toString()) +'" id=' + targetId + '></div>');
665
666
 
666
667
  $('#' + id + ' > span').click(function() {
667
668
  $(this).parent().remove();
@@ -715,7 +716,7 @@ var ComboAutoBox = {
715
716
  var addSearchableItem = function (inputId, selectedId, selectedData) {
716
717
  if (selectedData != '') {
717
718
  var id = generateAnId('item');
718
- $('#' + 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>');
719
+ $('#' + inputId).before('<div class="item" id="' + id + '">'+ htmlSafe(selectedData) +'<span title="Remove Item">x</span><input type="hidden" name="'+ options.html.name +'['+ htmlSafe(selectedId.toString()) +'][]" value="'+ htmlSafe(getSearchableValue(selectedData)) +'"></div>');
719
720
 
720
721
  $('#' + id + ' > span').click(function() {
721
722
  $(this).parent().remove();
@@ -774,7 +775,7 @@ var ComboAutoBox = {
774
775
 
775
776
  return html;
776
777
  }
777
-
778
+
778
779
  // Bind click on div for multiple or searchble
779
780
  var bindContainerClick = function(inputId) {
780
781
  $('#' + container + ' > div.multiple').click(function() {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: combo_auto_box
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.43
4
+ version: 0.0.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adilson Chacon