selectize-rails 0.8.0 → 0.8.1

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.
data/README.md CHANGED
@@ -41,6 +41,7 @@ See the [demo page of Brian Reavis](http://brianreavis.github.io/selectize.js/)
41
41
 
42
42
  | Version | Notes |
43
43
  | -------:| ----------------------------------------------------------- |
44
+ | 0.8.1 | Update to v0.8.1 of selectize.js |
44
45
  | 0.8.0 | Update to v0.8.0 of selectize.js |
45
46
  | 0.7.7 | Update to v0.7.7 of selectize.js |
46
47
  | 0.7.6 | Update to v0.7.6 of selectize.js |
@@ -1,5 +1,5 @@
1
1
  module Selectize
2
2
  module Rails
3
- VERSION = "0.8.0"
3
+ VERSION = "0.8.1"
4
4
  end
5
5
  end
@@ -583,7 +583,7 @@
583
583
  }));
584
584
 
585
585
  /**
586
- * selectize.js (v0.8.0)
586
+ * selectize.js (v0.8.1)
587
587
  * Copyright (c) 2013 Brian Reavis & contributors
588
588
  *
589
589
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
@@ -1217,6 +1217,13 @@
1217
1217
  self.ignoreHover = false;
1218
1218
  });
1219
1219
 
1220
+ // store original children and tab index so that they can be
1221
+ // restored when the destroy() method is called.
1222
+ this.revertSettings = {
1223
+ $children : self.$input.children().detach(),
1224
+ tabindex : self.$input.attr('tabindex')
1225
+ };
1226
+
1220
1227
  self.$input.attr('tabindex', -1).hide().after(self.$wrapper);
1221
1228
 
1222
1229
  if ($.isArray(settings.items)) {
@@ -2759,12 +2766,18 @@
2759
2766
  destroy: function() {
2760
2767
  var self = this;
2761
2768
  var eventNS = self.eventNS;
2769
+ var revertSettings = self.revertSettings;
2762
2770
 
2763
2771
  self.trigger('destroy');
2764
2772
  self.off();
2765
2773
  self.$wrapper.remove();
2766
2774
  self.$dropdown.remove();
2767
- self.$input.show();
2775
+
2776
+ self.$input
2777
+ .html('')
2778
+ .append(revertSettings.$children)
2779
+ .attr({tabindex: revertSettings.tabindex})
2780
+ .show();
2768
2781
 
2769
2782
  $(window).off(eventNS);
2770
2783
  $(document).off(eventNS);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * selectize.bootstrap2.css (v0.8.0) - Bootstrap 2 Theme
2
+ * selectize.bootstrap2.css (v0.8.1) - Bootstrap 2 Theme
3
3
  * Copyright (c) 2013 Brian Reavis & contributors
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
@@ -1,5 +1,5 @@
1
1
  /**
2
- * selectize.bootstrap3.css (v0.8.0) - Bootstrap 3 Theme
2
+ * selectize.bootstrap3.css (v0.8.1) - Bootstrap 3 Theme
3
3
  * Copyright (c) 2013 Brian Reavis & contributors
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
@@ -1,5 +1,5 @@
1
1
  /**
2
- * selectize.css (v0.8.0)
2
+ * selectize.css (v0.8.1)
3
3
  * Copyright (c) 2013 Brian Reavis & contributors
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
@@ -1,5 +1,5 @@
1
1
  /**
2
- * selectize.default.css (v0.8.0) - Default Theme
2
+ * selectize.default.css (v0.8.1) - Default Theme
3
3
  * Copyright (c) 2013 Brian Reavis & contributors
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
@@ -1,5 +1,5 @@
1
1
  /**
2
- * selectize.legacy.css (v0.8.0) - Default Theme
2
+ * selectize.legacy.css (v0.8.1) - Default Theme
3
3
  * Copyright (c) 2013 Brian Reavis & contributors
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selectize-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
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-10-14 00:00:00.000000000 Z
12
+ date: 2013-10-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler