intl_phone_picker 1.0.0 → 1.0.1

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: a7243bb9eb0d4a22e623cc900e661df9287f7978
4
- data.tar.gz: c1c88ad99873f26d9f6c72609473c66e022fba4e
3
+ metadata.gz: 4e330cfb849c2e7623e3e4fd1c4ce7db13c9ad68
4
+ data.tar.gz: 6f11164d398aa8e49783882c7c91955e29d761ab
5
5
  SHA512:
6
- metadata.gz: 21df3768325f3918956183388079c660ed3a9ca1e1a6cb33787524647818b8946039746d2289d63cea98fde99e3ca0eee55fc4b1d16ab70c358d62b05fecc5eb
7
- data.tar.gz: b25099a6bb64ea027c5b690148c3b257154cf6d7cddb58cbf690047f7428ce7388212d48391bceb27d0bca81e01a1e0e162f60cc1dd2836f3158c458daf8ecb3
6
+ metadata.gz: 24ed6d256f9e06f1281af72ff2249cd33aabcc43c0c5778579d3bef5e4fd7a929c8b26392e020c8659a7e353481fa6bea2daee64d7a0504a29603eb7525af785
7
+ data.tar.gz: 3696e023ae9f13f4a405f9db383a5cc00d8d6e9660291ac011f3aee20c1717e85f9a8f56323598b9af0a5c1a5174418213aec3457f8454bf985d05917071b5d8
data/CHANGELOG.md CHANGED
@@ -49,3 +49,7 @@
49
49
  - Bump lib to version 10.0.0
50
50
  - Wait for document 'turbolinks ready' (Rails 5) event before applying script
51
51
  - Prevent from submit invalid phone number by default
52
+
53
+ # Version 1.0.1
54
+
55
+ - Fix Javascript event
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- intl_phone_picker (1.0.0)
4
+ intl_phone_picker (1.0.1)
5
5
  jquery-rails
6
6
  railties (>= 3.1)
7
7
  sass-rails
@@ -31,10 +31,10 @@ function synchronizeVisibleHiddenFields(visibleInput, hiddenInput) {
31
31
  })
32
32
 
33
33
  visibleInput.closest('form').on('submit', function(event) {
34
- updateHiddenPhoneField($(event.target), hiddenInput)
34
+ updateHiddenPhoneField(visibleInput, hiddenInput)
35
35
 
36
- if (toggleValidation($(event.target)) == false)
37
- e.preventDefault()
36
+ if (toggleValidation(visibleInput) == false)
37
+ event.preventDefault()
38
38
  })
39
39
  }
40
40
 
@@ -42,15 +42,15 @@ function updateHiddenPhoneField(visibleInput, hiddenInput) {
42
42
  hiddenInput.val(visibleInput.intlTelInput("getNumber"))
43
43
  }
44
44
 
45
- function toggleValidation(phone_input) {
46
- var isPhoneValid = phone_input.intlTelInput('isValidNumber')
45
+ function toggleValidation(phoneInput) {
46
+ var isPhoneValid = phoneInput.intlTelInput('isValidNumber');
47
47
 
48
48
  if (!isPhoneValid) {
49
- phone_input.closest('.form-group').addClass('has-danger')
50
- phone_input.addClass('form-control-danger')
49
+ phoneInput.closest('.form-group').addClass('has-danger')
50
+ phoneInput.addClass('form-control-danger')
51
51
  } else {
52
- phone_input.closest('.form-group').removeClass('has-danger')
53
- phone_input.removeClass('form-control-danger')
52
+ phoneInput.closest('.form-group').removeClass('has-danger')
53
+ phoneInput.removeClass('form-control-danger')
54
54
  }
55
55
 
56
56
  return (isPhoneValid)
@@ -1,3 +1,3 @@
1
1
  module IntlPhonePicker
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: intl_phone_picker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Fabien Dobat\n\n"