ama_layout 2.6.0 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/ama_layout/{ama_layout_namespace.js.coffee → ama_layout_namespace.coffee} +0 -0
- data/app/assets/javascripts/ama_layout/desktop/{drop_down.js.coffee → drop_down.coffee} +0 -0
- data/app/assets/javascripts/ama_layout/desktop/{foundation-ready.js.coffee → foundation-ready.coffee} +0 -0
- data/app/assets/javascripts/ama_layout/desktop/index.js +1 -2
- data/app/assets/javascripts/ama_layout/desktop/{ready.js.coffee → ready.coffee} +0 -0
- data/app/assets/javascripts/ama_layout/desktop/{toggle_menu.js.coffee → toggle_menu.coffee} +0 -0
- data/app/assets/javascripts/ama_layout/mailcheck/email_suggestion.coffee +81 -0
- data/app/assets/javascripts/ama_layout/mailcheck/index.js +3 -0
- data/app/assets/javascripts/ama_layout/{mailcheck.js → mailcheck/mailcheck.js} +0 -0
- data/app/assets/javascripts/ama_layout/mailcheck/ready.coffee +2 -0
- data/app/assets/javascripts/ama_layout/mobile/index.js +1 -2
- data/app/assets/javascripts/ama_layout/mobile/{mobile_menu.js.coffee → mobile_menu.coffee} +0 -0
- data/app/assets/javascripts/ama_layout/mobile/{ready.js.coffee → ready.coffee} +0 -0
- data/lib/ama_layout/version.rb +1 -1
- metadata +14 -12
- data/app/assets/javascripts/ama_layout/autocorrect_email.js.coffee +0 -76
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 416273c0d7ade6a4e92f736aa10970b6b9c9224c
|
4
|
+
data.tar.gz: ee0dc5ad4a928099a577d4cb21222964317da30a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c63ef60ae4218f5012c0bb72672546ef7ac9af548bfa7cafde5657f38c957023cf0514767a4ac91c984eeecae23e4d70c0fd8a1e0add6b37f6b55ed2a1a8fb08
|
7
|
+
data.tar.gz: a87bd42dfcc7228d3ab24a86c009818e91a3a486e8f3509159df148d428d34a9c5d613e2b609e68cb1c1023559120d0a5906b58daef11b590fc8384923794d55
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,81 @@
|
|
1
|
+
class AMALayout.EmailSuggestion
|
2
|
+
constructor: () ->
|
3
|
+
@domains = [
|
4
|
+
'msn.com'
|
5
|
+
'bellsouth.net'
|
6
|
+
'telus.net'
|
7
|
+
'telusplanet.net'
|
8
|
+
'comcast.net'
|
9
|
+
'optusnet.com.au'
|
10
|
+
'earthlink.net'
|
11
|
+
'qq.com'
|
12
|
+
'sky.com'
|
13
|
+
'icloud.com'
|
14
|
+
'mac.com'
|
15
|
+
'sympatico.ca'
|
16
|
+
'googlemail.com'
|
17
|
+
'att.net'
|
18
|
+
'xtra.co.nz'
|
19
|
+
'web.de'
|
20
|
+
'cox.net'
|
21
|
+
'gmail.com'
|
22
|
+
'ymail.com'
|
23
|
+
'aim.com'
|
24
|
+
'rogers.com'
|
25
|
+
'verizon.net'
|
26
|
+
'rocketmail.com'
|
27
|
+
'google.com'
|
28
|
+
'optonline.net'
|
29
|
+
'sbcglobal.net'
|
30
|
+
'aol.com'
|
31
|
+
'me.com'
|
32
|
+
'btinternet.com'
|
33
|
+
'charter.net'
|
34
|
+
'shaw.ca'
|
35
|
+
'xplore.com'
|
36
|
+
'abnorth.com'
|
37
|
+
'pentnet.net'
|
38
|
+
'canadasurf.net'
|
39
|
+
'ama.ab.ca'
|
40
|
+
]
|
41
|
+
@secondLevelDomains = [
|
42
|
+
'yahoo'
|
43
|
+
'hotmail'
|
44
|
+
'mail'
|
45
|
+
'live'
|
46
|
+
'outlook'
|
47
|
+
]
|
48
|
+
@setupEvents()
|
49
|
+
|
50
|
+
setupEvents: ->
|
51
|
+
$('[type="email"]').on 'blur', (e) =>
|
52
|
+
$(e.originalEvent.target).mailcheck
|
53
|
+
domains: @domains
|
54
|
+
secondLevelDomains: @secondLevelDomains
|
55
|
+
suggested: (element, suggestion) =>
|
56
|
+
text = @suggestionMarkup suggestion.address, suggestion.domain
|
57
|
+
if !$('.email_hint').length
|
58
|
+
$("<div class='email_hint'>#{text}</div>").insertAfter(element).fadeIn 150
|
59
|
+
else
|
60
|
+
$('.email_hint').html text
|
61
|
+
empty: (element) ->
|
62
|
+
$('.email_hint').html ''
|
63
|
+
|
64
|
+
$(document).on 'click', '.email_hint .suggestion a.email_domain', (e) =>
|
65
|
+
@trackUsage()
|
66
|
+
email_hint = $(e.originalEvent.target).parents('.email_hint')
|
67
|
+
email = $(email_hint).prevAll('input[type=email]:last')
|
68
|
+
$(email).val $('.suggestion').first().text()
|
69
|
+
$('.email_hint').remove()
|
70
|
+
|
71
|
+
suggestionMarkup: (address, domain) ->
|
72
|
+
"Did you mean " +
|
73
|
+
"<span class='suggestion'>" +
|
74
|
+
"<span class='address'>#{address}</span>" +
|
75
|
+
"@<a href='#' class='email_domain'>#{domain}</a>" +
|
76
|
+
"</span>?"
|
77
|
+
|
78
|
+
trackUsage: () ->
|
79
|
+
if window.dataLayer
|
80
|
+
domain = $('.email_domain').text()
|
81
|
+
dataLayer.push({ "event" : "email-pick-#{domain}" })
|
File without changes
|
File without changes
|
File without changes
|
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: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael van den Beuken
|
@@ -18,7 +18,7 @@ authors:
|
|
18
18
|
autorequire:
|
19
19
|
bindir: bin
|
20
20
|
cert_chain: []
|
21
|
-
date: 2016-04-
|
21
|
+
date: 2016-04-06 00:00:00.000000000 Z
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
24
|
name: foundation-rails
|
@@ -247,21 +247,23 @@ files:
|
|
247
247
|
- app/assets/images/cc-type-mc.png
|
248
248
|
- app/assets/images/cc-type-visa.png
|
249
249
|
- app/assets/images/footer-racetrack-big.png
|
250
|
-
- app/assets/javascripts/ama_layout/ama_layout_namespace.
|
251
|
-
- app/assets/javascripts/ama_layout/
|
252
|
-
- app/assets/javascripts/ama_layout/desktop/drop_down.js.coffee
|
250
|
+
- app/assets/javascripts/ama_layout/ama_layout_namespace.coffee
|
251
|
+
- app/assets/javascripts/ama_layout/desktop/drop_down.coffee
|
253
252
|
- app/assets/javascripts/ama_layout/desktop/foundation-namespace.coffee
|
254
|
-
- app/assets/javascripts/ama_layout/desktop/foundation-ready.
|
253
|
+
- app/assets/javascripts/ama_layout/desktop/foundation-ready.coffee
|
255
254
|
- app/assets/javascripts/ama_layout/desktop/header_menu.coffee
|
256
255
|
- app/assets/javascripts/ama_layout/desktop/index.js
|
257
|
-
- app/assets/javascripts/ama_layout/desktop/ready.
|
256
|
+
- app/assets/javascripts/ama_layout/desktop/ready.coffee
|
258
257
|
- app/assets/javascripts/ama_layout/desktop/sidebar.coffee
|
259
258
|
- app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee
|
260
|
-
- app/assets/javascripts/ama_layout/desktop/toggle_menu.
|
261
|
-
- app/assets/javascripts/ama_layout/mailcheck.
|
259
|
+
- app/assets/javascripts/ama_layout/desktop/toggle_menu.coffee
|
260
|
+
- app/assets/javascripts/ama_layout/mailcheck/email_suggestion.coffee
|
261
|
+
- app/assets/javascripts/ama_layout/mailcheck/index.js
|
262
|
+
- app/assets/javascripts/ama_layout/mailcheck/mailcheck.js
|
263
|
+
- app/assets/javascripts/ama_layout/mailcheck/ready.coffee
|
262
264
|
- app/assets/javascripts/ama_layout/mobile/index.js
|
263
|
-
- app/assets/javascripts/ama_layout/mobile/mobile_menu.
|
264
|
-
- app/assets/javascripts/ama_layout/mobile/ready.
|
265
|
+
- app/assets/javascripts/ama_layout/mobile/mobile_menu.coffee
|
266
|
+
- app/assets/javascripts/ama_layout/mobile/ready.coffee
|
265
267
|
- app/assets/javascripts/ama_layout/mobile/tablesaw.stackonly.js
|
266
268
|
- app/assets/stylesheets/ama_layout/application.scss
|
267
269
|
- app/assets/stylesheets/ama_layout/foundation_and_overrides.scss
|
@@ -363,7 +365,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
363
365
|
version: '0'
|
364
366
|
requirements: []
|
365
367
|
rubyforge_project:
|
366
|
-
rubygems_version: 2.
|
368
|
+
rubygems_version: 2.2.0
|
367
369
|
signing_key:
|
368
370
|
specification_version: 4
|
369
371
|
summary: ".ama.ab.ca site layouts"
|
@@ -1,76 +0,0 @@
|
|
1
|
-
window.onload = ->
|
2
|
-
domains = [
|
3
|
-
'msn.com'
|
4
|
-
'bellsouth.net'
|
5
|
-
'telus.net'
|
6
|
-
'telusplanet.net'
|
7
|
-
'comcast.net'
|
8
|
-
'optusnet.com.au'
|
9
|
-
'earthlink.net'
|
10
|
-
'qq.com'
|
11
|
-
'sky.com'
|
12
|
-
'icloud.com'
|
13
|
-
'mac.com'
|
14
|
-
'sympatico.ca'
|
15
|
-
'googlemail.com'
|
16
|
-
'att.net'
|
17
|
-
'xtra.co.nz'
|
18
|
-
'web.de'
|
19
|
-
'cox.net'
|
20
|
-
'gmail.com'
|
21
|
-
'ymail.com'
|
22
|
-
'aim.com'
|
23
|
-
'rogers.com'
|
24
|
-
'verizon.net'
|
25
|
-
'rocketmail.com'
|
26
|
-
'google.com'
|
27
|
-
'optonline.net'
|
28
|
-
'sbcglobal.net'
|
29
|
-
'aol.com'
|
30
|
-
'me.com'
|
31
|
-
'btinternet.com'
|
32
|
-
'charter.net'
|
33
|
-
'shaw.ca'
|
34
|
-
'xplore.com'
|
35
|
-
'abnorth.com'
|
36
|
-
'pentnet.net'
|
37
|
-
'canadasurf.net'
|
38
|
-
'ama.ab.ca'
|
39
|
-
]
|
40
|
-
|
41
|
-
secondLevelDomains = [
|
42
|
-
'yahoo'
|
43
|
-
'hotmail'
|
44
|
-
'mail'
|
45
|
-
'live'
|
46
|
-
'outlook'
|
47
|
-
]
|
48
|
-
|
49
|
-
$email = $('[type="email"]')
|
50
|
-
$email.on 'blur', ->
|
51
|
-
$(this).mailcheck
|
52
|
-
domains: domains
|
53
|
-
secondLevelDomains: secondLevelDomains
|
54
|
-
suggested: (element, suggestion) ->
|
55
|
-
text = 'Did you mean ' +
|
56
|
-
'<span class="suggestion">' +
|
57
|
-
'<span class="address">' + suggestion.address + '</span>' +
|
58
|
-
'@<a href="#" class="email_domain">' + suggestion.domain + '</a>' +
|
59
|
-
'</span>?'
|
60
|
-
if !$('.email_hint').length
|
61
|
-
$('<div class="email_hint">' + text + '</div>').insertAfter(element).fadeIn 150
|
62
|
-
else
|
63
|
-
$('.email_hint').html text
|
64
|
-
return
|
65
|
-
empty: (element) ->
|
66
|
-
$('.email_hint').html ''
|
67
|
-
return
|
68
|
-
return
|
69
|
-
|
70
|
-
$(document).on 'click', '.email_hint .suggestion a.email_domain', ->
|
71
|
-
email_hint = $(this).parents('.email_hint')
|
72
|
-
email = $(email_hint).prevAll('input[type=email]:last')
|
73
|
-
$(email).val $('.suggestion').first().text()
|
74
|
-
$('.email_hint').remove()
|
75
|
-
false
|
76
|
-
return
|