combo_auto_box 0.0.10 → 0.0.11

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.
@@ -1,3 +1,3 @@
1
1
  module ComboAutoBox
2
- VERSION = '0.0.10'
2
+ VERSION = '0.0.11'
3
3
  end
@@ -26,12 +26,18 @@ var ComboAutoBox = {
26
26
  var previuosValue = '';
27
27
  $('#' + inputId).keydown(function(e) {
28
28
  if ((e.keyCode == 8) && (options.type == 'multiple') && ($('#' + inputId).val() == '')) {
29
+ var value = $('#' + container + ' > div.multiple > div.item:last > input').val();
30
+ var label = $('#' + container + ' > div.multiple > div.item:last').text();
29
31
  $('#' + container + ' > div.multiple > div.item:last').remove();
32
+ unselectData(value, label);
30
33
  }
31
34
 
32
35
  if ((e.keyCode == 8) && (options.type == 'searchable') && ($('#' + inputId).val() == '')) {
36
+ var label = $('#' + container + ' > div.searchable > div.item:last > input[name*="value"]').val();
37
+ var attribute = $('#' + container + ' > div.searchable > div.item:last > input[name*="name"]').val();
38
+ var condition = $('#' + container + ' > div.searchable > div.item:last > input[name*="p"]').val();
33
39
  $('#' + container + ' > div.searchable > div.item:last').remove();
34
- selectData('');
40
+ unselectData(attribute + "_" +condition, label);
35
41
  }
36
42
 
37
43
  });
@@ -323,7 +329,6 @@ var ComboAutoBox = {
323
329
 
324
330
  $('#' + id + ' > span').click(function() {
325
331
  $(this).parent().remove();
326
- selectData('');
327
332
  unselectData(selectedId, selectedData);
328
333
  });
329
334
  }
@@ -337,7 +342,6 @@ var ComboAutoBox = {
337
342
 
338
343
  $('#' + id + ' > span').click(function() {
339
344
  $(this).parent().remove();
340
- selectData('');
341
345
  unselectData(selectedId, selectedData);
342
346
  });
343
347
 
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.10
4
+ version: 0.0.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-31 00:00:00.000000000 Z
12
+ date: 2013-08-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport