zipcode-rack 1.1.0 → 1.2.0

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: 5897d5b4ced03a593f32fb730321c58153d0f018
4
- data.tar.gz: 38b9ecbf5fbe8bd6fa9c4533b6affdbe34a83516
3
+ metadata.gz: 9bebd4bab6dc70d16762e2b0485ed9993bdd3330
4
+ data.tar.gz: 6c5a0b39b7a881955fcd75bf8ba44bea42198a0d
5
5
  SHA512:
6
- metadata.gz: 717bda60af4d256a9d4f1f4511522b491f4e1b6d6a3464e4936ad725acea36edd710d02bd28d103593cd348e3af896b1302025c125b0cc7ca6bcde22dfd7b8f8
7
- data.tar.gz: d5b564297165788bd246d6a17bb05d1a9ec85fac5f1188108e95f8b5bc3d37c0e9d122b5c0ba1d9185de0088f5b9bebb8e5d13972b853dc192331cba5a6fa71e
6
+ metadata.gz: df2fc8b878f6a4a2aaefa8b4535c50b2094b3720879466f6354e17d886690a229e92ba0be3c6fe6e8a192a8912401b2fa832d791f1df9c18ca8868202a22f41b
7
+ data.tar.gz: 0742635ab688b3b7b9657d96b05b093fac732062b1926b0132929845113b70bc1aa613da1738ea91d636a02be19999246a6e7b119ddec966a4f426418caba2b5
@@ -117,7 +117,7 @@
117
117
  }
118
118
 
119
119
  function assignDropdown(input, dropdown) {
120
- document.querySelector('body').appendChild(dropdown);
120
+ input.parentNode.insertBefore(dropdown, input.nextSibling);
121
121
  input.dropdown = dropdown;
122
122
  input.addEventListener('blur', function() {
123
123
  if (!isHovered(input.dropdown)) { removeDropdown(input); }
@@ -312,7 +312,7 @@
312
312
  }
313
313
 
314
314
  function polyfillDocument() {
315
- var elements = document.querySelectorAll('input[type=zip-city]');
315
+ var elements = document.querySelectorAll('input[type=zip-city], input[type=text].zip-city');
316
316
  for (var i = 0; i < elements.length; i++) {
317
317
  polyfill(elements[i]);
318
318
  }
@@ -323,7 +323,7 @@
323
323
  mutations.forEach(function (mutation) {
324
324
  for (var i = 0; i < mutation.addedNodes.length; i++) {
325
325
  var node = mutation.addedNodes[i];
326
- if (node.nodeName === 'INPUT' && node.getAttribute('type') === 'zip-city') {
326
+ if (node.nodeName === 'INPUT' && (node.getAttribute('type') === 'zip-city' || (node.getAttribute('type') === 'text' && node.classList.contains('zip-city')))) {
327
327
  polyfill(node);
328
328
  }
329
329
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zipcode-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Loic Nageleisen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-07 00:00:00.000000000 Z
11
+ date: 2015-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grape