combo_auto_box 0.0.9 → 0.0.10

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.9'
2
+ VERSION = '0.0.10'
3
3
  end
@@ -302,8 +302,8 @@ var ComboAutoBox = {
302
302
 
303
303
  $('#' + id + ' > span').click(function() {
304
304
  $(this).parent().remove();
305
+ unselectData(selectedId, selectedData);
305
306
  });
306
-
307
307
  }
308
308
  };
309
309
 
@@ -324,6 +324,7 @@ var ComboAutoBox = {
324
324
  $('#' + id + ' > span').click(function() {
325
325
  $(this).parent().remove();
326
326
  selectData('');
327
+ unselectData(selectedId, selectedData);
327
328
  });
328
329
  }
329
330
  };
@@ -337,6 +338,7 @@ var ComboAutoBox = {
337
338
  $('#' + id + ' > span').click(function() {
338
339
  $(this).parent().remove();
339
340
  selectData('');
341
+ unselectData(selectedId, selectedData);
340
342
  });
341
343
 
342
344
  }
@@ -412,6 +414,16 @@ var ComboAutoBox = {
412
414
  var selectData = function (selectedData) {
413
415
  if (options.complete != null) {
414
416
  options.complete(selectedData);
417
+ } else if (options.select != null) {
418
+ options.select(selectedData);
419
+ }
420
+
421
+ };
422
+
423
+ // on unselect data
424
+ var unselectData = function (selectedId, selectedData) {
425
+ if (options.unselect != null) {
426
+ options.unselect(selectedId, selectedData);
415
427
  }
416
428
  };
417
429
 
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.9
4
+ version: 0.0.10
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-27 00:00:00.000000000 Z
12
+ date: 2013-07-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport