effective_bootstrap 0.10.3 → 0.10.4
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: ce183f7b5ec8710057b26c596d126df576635f2f056c2b5f691c817aa043d49d
|
4
|
+
data.tar.gz: 2e4697f95f477939c744e6fd7e7e44426f15975b192fae10c7061baaab384096
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf040655168c88bfe628a87182d061147ecc7b82554e268fa9b1ac75cbbf2cdb911326642c730a568d60438762cb71da7fcdc57f2f46622bf40f99d8051d9392
|
7
|
+
data.tar.gz: 01ab704d07b028abc72d72311e6ac090bc68de56993c1be93d8b74945d8cccb560275d50ba71fcdfb798834cb99f07ee615f378c262236a284791bdf6f98fc78
|
@@ -0,0 +1,12 @@
|
|
1
|
+
// reveal_mail_to
|
2
|
+
$(document).on('click', '[data-mailto-rot13]', function(event) {
|
3
|
+
event.preventDefault();
|
4
|
+
|
5
|
+
var $link = $(event.currentTarget);
|
6
|
+
|
7
|
+
var email = $link.data('mailto-rot13').replace(/[a-zA-Z]/g, function(c) {
|
8
|
+
return String.fromCharCode((c <= 'Z' ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26);
|
9
|
+
});
|
10
|
+
|
11
|
+
$link.attr('href', 'mailto:' + email).html(email).removeAttr('data-mailto-rot13');
|
12
|
+
});
|
@@ -470,6 +470,11 @@ module EffectiveBootstrapHelper
|
|
470
470
|
# Let Kaminari override this method.
|
471
471
|
alias_method(:paginate, :bootstrap_paginate) unless (respond_to?(:paginate) || defined?(Kaminari))
|
472
472
|
|
473
|
+
def reveal_mail_to(email)
|
474
|
+
raise('expected an email') unless email.kind_of?(String) && email.include?('@')
|
475
|
+
link_to 'Click to reveal email', '#', 'data-mailto-rot13' => email.tr('A-Za-z', 'N-ZA-Mn-za-m')
|
476
|
+
end
|
477
|
+
|
473
478
|
# Tabs DSL
|
474
479
|
# Inserts both the tablist and the tabpanel
|
475
480
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_bootstrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -428,6 +428,7 @@ files:
|
|
428
428
|
- app/assets/javascripts/effective_bootstrap/form.js.coffee
|
429
429
|
- app/assets/javascripts/effective_bootstrap/logic.js.coffee
|
430
430
|
- app/assets/javascripts/effective_bootstrap/other.js.coffee
|
431
|
+
- app/assets/javascripts/effective_bootstrap/reveal_mail_to.js
|
431
432
|
- app/assets/javascripts/effective_bootstrap/tabs.js
|
432
433
|
- app/assets/javascripts/effective_bootstrap_editor.js
|
433
434
|
- app/assets/javascripts/effective_checks/initialize.js.coffee
|