ama_layout 11.4.0 → 11.5.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce403ae88f2c85275f43e1bd3bb07f7c936573928deb76e34114c4c6a14adaa7
|
4
|
+
data.tar.gz: 289905a9d60f38e96d21c4b93486f6b1ce7decef3d1b441ace5244b07c652a45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1f3309b20ed355bc384787f6ec68840433eb362e26d9a00f9e3c88a289363fdddfc6e46eed2513264dcd91dcc8d7e57c7eae9f4161db8bf02a5343ae8054303
|
7
|
+
data.tar.gz: 252aa2096926f2617d9790595475874f02de2fa2a9e6b1da0823160a5ae43e65bb76ce9523083e1a20e43424ef0dc41fb76c94a097af353803cd0c33c47df722
|
@@ -54,20 +54,32 @@ class AMALayout.EmailSuggestion
|
|
54
54
|
domains: @domains
|
55
55
|
secondLevelDomains: @secondLevelDomains
|
56
56
|
suggested: (element, suggestion) =>
|
57
|
+
event = @buildEvent()
|
57
58
|
text = @suggestionMarkup suggestion.address, suggestion.domain
|
58
59
|
if !$('.email_hint').length
|
59
|
-
$("<div class='email_hint'>#{text}</div>").insertAfter(element).
|
60
|
+
$("<div class='email_hint'>#{text}</div>").insertAfter(element).show()
|
60
61
|
else
|
61
62
|
$('.email_hint').html text
|
63
|
+
window.dispatchEvent(event)
|
62
64
|
empty: (element) ->
|
65
|
+
event = @buildEvent()
|
63
66
|
$('.email_hint').html ''
|
67
|
+
window.dispatchEvent(event)
|
64
68
|
|
65
69
|
$(document).on 'click', '.email_hint .suggestion a.email_domain', (e) =>
|
66
70
|
@trackUsage()
|
71
|
+
event = @buildEvent()
|
67
72
|
email_hint = $(e.originalEvent.target).parents('.email_hint')
|
68
73
|
email = $(email_hint).prevAll('input[type=email]:last')
|
69
74
|
$(email).val $('.suggestion').first().text()
|
70
75
|
$('.email_hint').remove()
|
76
|
+
window.dispatchEvent(event)
|
77
|
+
|
78
|
+
buildEvent: () ->
|
79
|
+
if typeof(Event) is 'function'
|
80
|
+
new Event('mailcheck')
|
81
|
+
else
|
82
|
+
document.createEvent('Event').initEvent('mailcheck', true, true)
|
71
83
|
|
72
84
|
suggestionMarkup: (address, domain) ->
|
73
85
|
"Did you mean " +
|
data/lib/ama_layout/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ama_layout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 11.
|
4
|
+
version: 11.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Darko Dosenovic
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2021-
|
16
|
+
date: 2021-04-16 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: breadcrumbs_on_rails
|