combo_auto_box 0.0.34 → 0.0.35

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: 81c3c4795c0140347fe82d2dd4042fa8babb8ce5
4
- data.tar.gz: d1c8c73eba8fccd315c1afdebe31af1f489be83b
3
+ metadata.gz: 164656ee6de0efedc3f19ae1292ca55d216a831a
4
+ data.tar.gz: e9f75345cdd03b61c3b3d62d61ec24c812e28417
5
5
  SHA512:
6
- metadata.gz: ab8eaf5549c8f726a7f9df6409f0d0e7f0d009de821615854d78a48120842e954440f16f09774ae7783ea9e14ca103e67d9e4ccf6c4b77a5cb80883bf5c845fc
7
- data.tar.gz: 76a1d67e604948896177bf31c8d6d0257394724ecf6f08011bfa9e4f8cf6fb83bd8da1768ded8f231e25dedd45211565f51f5fb7781df25730ff7a1ccf042a63
6
+ metadata.gz: cf4f5ea9df285b14ae7ac3f4c338079ea341f8423665bb6f2a935de55034fef483c27b2edfb1bc8b3da61cd3c258030a2add512903449ff6f29c1768faa89a5f
7
+ data.tar.gz: 1836818cec289be79af9a9e71c28a0f76d68a605fac471d2e6710498dfc2fd031c253d6969600a25a5a3116cab1ec35b692efc642b681ca5d43acef902ed31d7
@@ -1,3 +1,3 @@
1
1
  module ComboAutoBox
2
- VERSION = '0.0.34'
2
+ VERSION = '0.0.35'
3
3
  end
@@ -462,7 +462,7 @@ var ComboAutoBox = {
462
462
  '<ul></ul>' +
463
463
  '</div>' +
464
464
  '<div class="footer">' +
465
- '<a href="javascript:void(0)" class="selectAll">' + i18nSelectAll() + '</a>' +
465
+ '<a href="javascript:void(0)" class="selectAll">' + i18nSelectAll(options.lang) + '</a>' +
466
466
  '</div>' +
467
467
  '</div>').appendTo('#' + container);
468
468
 
@@ -511,7 +511,7 @@ var ComboAutoBox = {
511
511
  '<div class="modal-body">' +
512
512
  '<div class="list-group" style="overflow:auto;height:440px"></div>' +
513
513
  '</div>' +
514
- ((options.type == 'multiple') ? '<div class="modal-footer"><button type="button" class="selectAll btn btn-primary">' + i18nSelectAll() + '</button></div>' : '') +
514
+ ((options.type == 'multiple') ? '<div class="modal-footer"><button type="button" class="selectAll btn btn-primary">' + i18nSelectAll(options.lang) + '</button></div>' : '') +
515
515
  '</div>' +
516
516
  '</div>' +
517
517
  '</div>';
@@ -636,9 +636,10 @@ var ComboAutoBox = {
636
636
 
637
637
  // add multiple item
638
638
  var addMultipleItem = function (inputId, selectedId, selectedData) {
639
- if (selectedData != '') {
639
+ var targetId = '#' + options.html.name.replace(/[\[\]]/g, '_') + selectedId;
640
+ if ((selectedData != '') && ($(targetId).length == 0)) {
640
641
  var id = generateAnId('item');
641
- $('#' + 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 +'"></div>');
642
+ $('#' + 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>');
642
643
 
643
644
  $('#' + id + ' > span').click(function() {
644
645
  $(this).parent().remove();
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.34
4
+ version: 0.0.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adilson Chacon