ama_layout 2.2.6 → 2.2.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,30 @@
1
+ var $email = $('[type="email"]');
2
+ var $hint = $("*#email_hint");
3
+
4
+ $email.on('blur', function() {
5
+ $(this).mailcheck({
6
+ suggested: function(element, suggestion) {
7
+ var text = "Did you mean <span class='suggestion'>" +
8
+ "<span class='address'>" + suggestion.address + "</span>" +
9
+ "@<a href='#' class='email_domain'>" + suggestion.domain +
10
+ "</a></span>?";
11
+
12
+ element.parent().siblings("#email_hint").html(text).fadeIn(150);
13
+ },
14
+ empty: function(element) {
15
+ element.parent().siblings("#email_hint").html("");
16
+ }
17
+ });
18
+ });
19
+
20
+ $hint.on('click', '.email_domain', function() {
21
+ email_hint = $(this).parents("#email_hint");
22
+ email = $(email_hint).siblings(".input.email").find("[type='email']")
23
+
24
+ $(email).val($(".suggestion").first().text());
25
+
26
+ $(email_hint).fadeOut(200, function() {
27
+ $(this).empty();
28
+ });
29
+ return false;
30
+ });
@@ -8,3 +8,4 @@
8
8
  //= require ./sticky-footer
9
9
  //= require ./foundation-namespace
10
10
  //= require ./sidebar
11
+ //= require ./mailcheck
@@ -0,0 +1 @@
1
+ /*! mailcheck v1.1.1 @licence MIT */var Mailcheck={domainThreshold:2,secondLevelThreshold:2,topLevelThreshold:2,defaultDomains:["msn.com","bellsouth.net","telus.net","comcast.net","optusnet.com.au","earthlink.net","qq.com","sky.com","icloud.com","mac.com","sympatico.ca","googlemail.com","att.net","xtra.co.nz","web.de","cox.net","gmail.com","ymail.com","aim.com","rogers.com","verizon.net","rocketmail.com","google.com","optonline.net","sbcglobal.net","aol.com","me.com","btinternet.com","charter.net","shaw.ca"],defaultSecondLevelDomains:["yahoo","hotmail","mail","live","outlook","gmx"],defaultTopLevelDomains:["com","com.au","com.tw","ca","co.nz","co.uk","de","fr","it","ru","net","org","edu","gov","jp","nl","kr","se","eu","ie","co.il","us","at","be","dk","hk","es","gr","ch","no","cz","in","net","net.au","info","biz","mil","co.jp","sg","hu"],run:function(a){a.domains=a.domains||Mailcheck.defaultDomains,a.secondLevelDomains=a.secondLevelDomains||Mailcheck.defaultSecondLevelDomains,a.topLevelDomains=a.topLevelDomains||Mailcheck.defaultTopLevelDomains,a.distanceFunction=a.distanceFunction||Mailcheck.sift3Distance;var b=function(a){return a},c=a.suggested||b,d=a.empty||b,e=Mailcheck.suggest(Mailcheck.encodeEmail(a.email),a.domains,a.secondLevelDomains,a.topLevelDomains,a.distanceFunction);return e?c(e):d()},suggest:function(a,b,c,d,e){a=a.toLowerCase();var f=this.splitEmail(a);if(c&&d&&-1!==c.indexOf(f.secondLevelDomain)&&-1!==d.indexOf(f.topLevelDomain))return!1;var g=this.findClosestDomain(f.domain,b,e,this.domainThreshold);if(g)return g==f.domain?!1:{address:f.address,domain:g,full:f.address+"@"+g};var h=this.findClosestDomain(f.secondLevelDomain,c,e,this.secondLevelThreshold),i=this.findClosestDomain(f.topLevelDomain,d,e,this.topLevelThreshold);if(f.domain){var g=f.domain,j=!1;if(h&&h!=f.secondLevelDomain&&(g=g.replace(f.secondLevelDomain,h),j=!0),i&&i!=f.topLevelDomain&&(g=g.replace(new RegExp(f.topLevelDomain+"$"),i),j=!0),1==j)return{address:f.address,domain:g,full:f.address+"@"+g}}return!1},findClosestDomain:function(a,b,c,d){d=d||this.topLevelThreshold;var e,f=99,g=null;if(!a||!b)return!1;c||(c=this.sift3Distance);for(var h=0;h<b.length;h++){if(a===b[h])return a;e=c(a,b[h]),f>e&&(f=e,g=b[h])}return d>=f&&null!==g?g:!1},sift3Distance:function(a,b){if(null==a||0===a.length)return null==b||0===b.length?0:b.length;if(null==b||0===b.length)return a.length;for(var c=0,d=0,e=0,f=0,g=5;c+d<a.length&&c+e<b.length;){if(a.charAt(c+d)==b.charAt(c+e))f++;else{d=0,e=0;for(var h=0;g>h;h++){if(c+h<a.length&&a.charAt(c+h)==b.charAt(c)){d=h;break}if(c+h<b.length&&a.charAt(c)==b.charAt(c+h)){e=h;break}}}c++}return(a.length+b.length)/2-f},splitEmail:function(a){var b=a.trim().split("@");if(b.length<2)return!1;for(var c=0;c<b.length;c++)if(""===b[c])return!1;var d=b.pop(),e=d.split("."),f="",g="";if(0==e.length)return!1;if(1==e.length)g=e[0];else{f=e[0];for(var c=1;c<e.length;c++)g+=e[c]+".";g=g.substring(0,g.length-1)}return{topLevelDomain:g,secondLevelDomain:f,domain:d,address:b.join("@")}},encodeEmail:function(a){var b=encodeURI(a);return b=b.replace("%20"," ").replace("%25","%").replace("%5E","^").replace("%60","`").replace("%7B","{").replace("%7C","|").replace("%7D","}")}};"undefined"!=typeof module&&module.exports&&(module.exports=Mailcheck),"function"==typeof define&&define.amd&&define("mailcheck",[],function(){return Mailcheck}),"undefined"!=typeof window&&window.jQuery&&!function(a){a.fn.mailcheck=function(a){var b=this;if(a.suggested){var c=a.suggested;a.suggested=function(a){c(b,a)}}if(a.empty){var d=a.empty;a.empty=function(){d.call(null,b)}}a.email=this.val(),Mailcheck.run(a)}}(jQuery);
@@ -189,6 +189,19 @@ small.error{
189
189
  margin-top: $base-margin*8;
190
190
  }
191
191
 
192
+ #email_hint{
193
+ color: $brand-red;
194
+ display: none;
195
+ font-size: 0.875em;
196
+ margin: -$base-padding*2 0 $base-padding*2;
197
+ }
198
+
199
+ .email_domain{
200
+ color: $brand-blue-insurance;
201
+ font-weight: bold;
202
+ text-decoration: underline;
203
+ }
204
+
192
205
  /* ------------- Moneris ------------- */
193
206
  #monerisFrameSurround iframe,
194
207
  #monerisFrameSurround object,
@@ -1,3 +1,3 @@
1
1
  module AmaLayout
2
- VERSION = "2.2.6"
2
+ VERSION = "2.2.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ama_layout
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.6
4
+ version: 2.2.7
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Michael van den Beuken
@@ -17,11 +18,12 @@ authors:
17
18
  autorequire:
18
19
  bindir: bin
19
20
  cert_chain: []
20
- date: 2016-01-06 00:00:00.000000000 Z
21
+ date: 2016-01-18 00:00:00.000000000 Z
21
22
  dependencies:
22
23
  - !ruby/object:Gem::Dependency
23
24
  name: foundation-rails
24
25
  requirement: !ruby/object:Gem::Requirement
26
+ none: false
25
27
  requirements:
26
28
  - - '='
27
29
  - !ruby/object:Gem::Version
@@ -29,6 +31,7 @@ dependencies:
29
31
  type: :runtime
30
32
  prerelease: false
31
33
  version_requirements: !ruby/object:Gem::Requirement
34
+ none: false
32
35
  requirements:
33
36
  - - '='
34
37
  - !ruby/object:Gem::Version
@@ -36,34 +39,39 @@ dependencies:
36
39
  - !ruby/object:Gem::Dependency
37
40
  name: rails
38
41
  requirement: !ruby/object:Gem::Requirement
42
+ none: false
39
43
  requirements:
40
- - - "~>"
44
+ - - ~>
41
45
  - !ruby/object:Gem::Version
42
46
  version: '4.2'
43
47
  type: :runtime
44
48
  prerelease: false
45
49
  version_requirements: !ruby/object:Gem::Requirement
50
+ none: false
46
51
  requirements:
47
- - - "~>"
52
+ - - ~>
48
53
  - !ruby/object:Gem::Version
49
54
  version: '4.2'
50
55
  - !ruby/object:Gem::Dependency
51
56
  name: sass-rails
52
57
  requirement: !ruby/object:Gem::Requirement
58
+ none: false
53
59
  requirements:
54
- - - "~>"
60
+ - - ~>
55
61
  - !ruby/object:Gem::Version
56
62
  version: '5.0'
57
63
  type: :runtime
58
64
  prerelease: false
59
65
  version_requirements: !ruby/object:Gem::Requirement
66
+ none: false
60
67
  requirements:
61
- - - "~>"
68
+ - - ~>
62
69
  - !ruby/object:Gem::Version
63
70
  version: '5.0'
64
71
  - !ruby/object:Gem::Dependency
65
72
  name: font-awesome-sass
66
73
  requirement: !ruby/object:Gem::Requirement
74
+ none: false
67
75
  requirements:
68
76
  - - '='
69
77
  - !ruby/object:Gem::Version
@@ -71,6 +79,7 @@ dependencies:
71
79
  type: :runtime
72
80
  prerelease: false
73
81
  version_requirements: !ruby/object:Gem::Requirement
82
+ none: false
74
83
  requirements:
75
84
  - - '='
76
85
  - !ruby/object:Gem::Version
@@ -78,130 +87,148 @@ dependencies:
78
87
  - !ruby/object:Gem::Dependency
79
88
  name: draper
80
89
  requirement: !ruby/object:Gem::Requirement
90
+ none: false
81
91
  requirements:
82
- - - "~>"
92
+ - - ~>
83
93
  - !ruby/object:Gem::Version
84
94
  version: '2.1'
85
95
  type: :runtime
86
96
  prerelease: false
87
97
  version_requirements: !ruby/object:Gem::Requirement
98
+ none: false
88
99
  requirements:
89
- - - "~>"
100
+ - - ~>
90
101
  - !ruby/object:Gem::Version
91
102
  version: '2.1'
92
103
  - !ruby/object:Gem::Dependency
93
104
  name: bundler
94
105
  requirement: !ruby/object:Gem::Requirement
106
+ none: false
95
107
  requirements:
96
- - - "~>"
108
+ - - ~>
97
109
  - !ruby/object:Gem::Version
98
110
  version: '1.7'
99
111
  type: :development
100
112
  prerelease: false
101
113
  version_requirements: !ruby/object:Gem::Requirement
114
+ none: false
102
115
  requirements:
103
- - - "~>"
116
+ - - ~>
104
117
  - !ruby/object:Gem::Version
105
118
  version: '1.7'
106
119
  - !ruby/object:Gem::Dependency
107
120
  name: rake
108
121
  requirement: !ruby/object:Gem::Requirement
122
+ none: false
109
123
  requirements:
110
- - - "~>"
124
+ - - ~>
111
125
  - !ruby/object:Gem::Version
112
126
  version: '10.0'
113
127
  type: :development
114
128
  prerelease: false
115
129
  version_requirements: !ruby/object:Gem::Requirement
130
+ none: false
116
131
  requirements:
117
- - - "~>"
132
+ - - ~>
118
133
  - !ruby/object:Gem::Version
119
134
  version: '10.0'
120
135
  - !ruby/object:Gem::Dependency
121
136
  name: rspec-rails
122
137
  requirement: !ruby/object:Gem::Requirement
138
+ none: false
123
139
  requirements:
124
- - - ">="
140
+ - - ! '>='
125
141
  - !ruby/object:Gem::Version
126
142
  version: '0'
127
143
  type: :development
128
144
  prerelease: false
129
145
  version_requirements: !ruby/object:Gem::Requirement
146
+ none: false
130
147
  requirements:
131
- - - ">="
148
+ - - ! '>='
132
149
  - !ruby/object:Gem::Version
133
150
  version: '0'
134
151
  - !ruby/object:Gem::Dependency
135
152
  name: factory_girl
136
153
  requirement: !ruby/object:Gem::Requirement
154
+ none: false
137
155
  requirements:
138
- - - ">="
156
+ - - ! '>='
139
157
  - !ruby/object:Gem::Version
140
158
  version: '0'
141
159
  type: :development
142
160
  prerelease: false
143
161
  version_requirements: !ruby/object:Gem::Requirement
162
+ none: false
144
163
  requirements:
145
- - - ">="
164
+ - - ! '>='
146
165
  - !ruby/object:Gem::Version
147
166
  version: '0'
148
167
  - !ruby/object:Gem::Dependency
149
168
  name: simplecov
150
169
  requirement: !ruby/object:Gem::Requirement
170
+ none: false
151
171
  requirements:
152
- - - ">="
172
+ - - ! '>='
153
173
  - !ruby/object:Gem::Version
154
174
  version: '0'
155
175
  type: :development
156
176
  prerelease: false
157
177
  version_requirements: !ruby/object:Gem::Requirement
178
+ none: false
158
179
  requirements:
159
- - - ">="
180
+ - - ! '>='
160
181
  - !ruby/object:Gem::Version
161
182
  version: '0'
162
183
  - !ruby/object:Gem::Dependency
163
184
  name: pry
164
185
  requirement: !ruby/object:Gem::Requirement
186
+ none: false
165
187
  requirements:
166
- - - ">="
188
+ - - ! '>='
167
189
  - !ruby/object:Gem::Version
168
190
  version: '0'
169
191
  type: :development
170
192
  prerelease: false
171
193
  version_requirements: !ruby/object:Gem::Requirement
194
+ none: false
172
195
  requirements:
173
- - - ">="
196
+ - - ! '>='
174
197
  - !ruby/object:Gem::Version
175
198
  version: '0'
176
199
  - !ruby/object:Gem::Dependency
177
200
  name: combustion
178
201
  requirement: !ruby/object:Gem::Requirement
202
+ none: false
179
203
  requirements:
180
- - - ">="
204
+ - - ! '>='
181
205
  - !ruby/object:Gem::Version
182
206
  version: '0'
183
207
  type: :development
184
208
  prerelease: false
185
209
  version_requirements: !ruby/object:Gem::Requirement
210
+ none: false
186
211
  requirements:
187
- - - ">="
212
+ - - ! '>='
188
213
  - !ruby/object:Gem::Version
189
214
  version: '0'
190
215
  - !ruby/object:Gem::Dependency
191
216
  name: sqlite3
192
217
  requirement: !ruby/object:Gem::Requirement
218
+ none: false
193
219
  requirements:
194
- - - ">="
220
+ - - ! '>='
195
221
  - !ruby/object:Gem::Version
196
222
  version: '0'
197
223
  type: :development
198
224
  prerelease: false
199
225
  version_requirements: !ruby/object:Gem::Requirement
226
+ none: false
200
227
  requirements:
201
- - - ">="
228
+ - - ! '>='
202
229
  - !ruby/object:Gem::Version
203
230
  version: '0'
204
- description: ".ama.ab.ca site layouts"
231
+ description: .ama.ab.ca site layouts
205
232
  email:
206
233
  - michael.beuken@gmail.com
207
234
  - ruben.a.estevez@gmail.com
@@ -217,10 +244,10 @@ executables: []
217
244
  extensions: []
218
245
  extra_rdoc_files: []
219
246
  files:
220
- - ".gitignore"
221
- - ".rspec"
222
- - ".simplecov"
223
- - ".travis.yml"
247
+ - .gitignore
248
+ - .rspec
249
+ - .simplecov
250
+ - .travis.yml
224
251
  - Gemfile
225
252
  - LICENSE.txt
226
253
  - README.md
@@ -230,11 +257,13 @@ files:
230
257
  - app/assets/images/alberta-blur.jpg
231
258
  - app/assets/images/footer-racetrack-big.png
232
259
  - app/assets/javascripts/ama_layout/ama_layout_namespace.js.coffee
260
+ - app/assets/javascripts/ama_layout/autocorrect_email.js
233
261
  - app/assets/javascripts/ama_layout/desktop/drop_down.js.coffee
234
262
  - app/assets/javascripts/ama_layout/desktop/foundation-namespace.coffee
235
263
  - app/assets/javascripts/ama_layout/desktop/foundation-ready.js.coffee
236
264
  - app/assets/javascripts/ama_layout/desktop/header_menu.coffee
237
265
  - app/assets/javascripts/ama_layout/desktop/index.js
266
+ - app/assets/javascripts/ama_layout/desktop/mailcheck.js
238
267
  - app/assets/javascripts/ama_layout/desktop/ready.js.coffee
239
268
  - app/assets/javascripts/ama_layout/desktop/sidebar.coffee
240
269
  - app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee
@@ -319,27 +348,34 @@ files:
319
348
  homepage: ''
320
349
  licenses:
321
350
  - MIT
322
- metadata: {}
323
351
  post_install_message:
324
352
  rdoc_options: []
325
353
  require_paths:
326
354
  - lib
327
355
  required_ruby_version: !ruby/object:Gem::Requirement
356
+ none: false
328
357
  requirements:
329
- - - ">="
358
+ - - ! '>='
330
359
  - !ruby/object:Gem::Version
331
360
  version: '0'
361
+ segments:
362
+ - 0
363
+ hash: 1037492924169957887
332
364
  required_rubygems_version: !ruby/object:Gem::Requirement
365
+ none: false
333
366
  requirements:
334
- - - ">="
367
+ - - ! '>='
335
368
  - !ruby/object:Gem::Version
336
369
  version: '0'
370
+ segments:
371
+ - 0
372
+ hash: 1037492924169957887
337
373
  requirements: []
338
374
  rubyforge_project:
339
- rubygems_version: 2.4.5.1
375
+ rubygems_version: 1.8.23
340
376
  signing_key:
341
- specification_version: 4
342
- summary: ".ama.ab.ca site layouts"
377
+ specification_version: 3
378
+ summary: .ama.ab.ca site layouts
343
379
  test_files:
344
380
  - spec/ama_layout/decorators/moneris_decorator_spec.rb
345
381
  - spec/ama_layout/decorators/navigation_decorator_spec.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: ebe5a64a1e7fd41e420a5efeab531cab9a719b10
4
- data.tar.gz: e903b272932aeb50ab3dca70db5f61cdb8fab54d
5
- SHA512:
6
- metadata.gz: b61813e83ee8f0e2877557f6771ee10c745da24c049b0c836f65ce0a31b5e20b1479270f7e670a79e8fff591d98368a7fab5c6b6fe257800d1358ec29699dfd3
7
- data.tar.gz: 75e3fcfa13981c61181eefcb919c67db0e6cb6bf7d37406ac2674643067bcc481e5974c62a7381d1a31a0569be8d3d7b3ad44f8c8dded0ce722bf896e2c98b42