friendly_extensions 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/helpers/friends_forms_helper.rb +11 -11
- data/app/helpers/friends_labeled_form_helper.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a01b9b85383134538a7ec1474614ed7452dd9571
|
4
|
+
data.tar.gz: 4618e189892061d3807000bcb43779350c332232
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c88031655536eb625f031e72d439c822fa1a61bdf05c999fd714460b4c18a2a924bf942351f8be1c03cdd57acbe2e682a1f512dce188220c18513569b9be1112
|
7
|
+
data.tar.gz: eab0686a96a99a286906b33f3bda04a4790e4271ab4b1ced7ef14bd2b7a5e3ad2eda7f48126ff090f5fefb7a62f2d54f50e0040ed30766404d044452fd80a53b
|
@@ -1,27 +1,27 @@
|
|
1
1
|
module FriendsFormsHelper
|
2
|
-
|
2
|
+
|
3
3
|
def fieldset(title, options = {}, &block)
|
4
4
|
if options[:if].nil? || options[:if] == true
|
5
5
|
data_string = " "
|
6
6
|
if options[:data]
|
7
7
|
options[:data].each {|d,v| data_string << "#{d}='v' "}
|
8
|
-
end
|
8
|
+
end
|
9
9
|
concat raw("<fieldset id='#{options[:id]}' #{data_string} class='shadow #{options[:mainclass]}' #{("style='height: %spx'" % options[:height]) if options[:height]} style='#{options[:mainstyle]}'>")
|
10
10
|
concat raw("<legend class='#{options[:class]}' style='#{options[:style]}'>#{title}</legend><div class='fieldset-content'>")
|
11
11
|
yield
|
12
12
|
concat raw("</div></fieldset>")
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
def tooltip_box(tooltip)
|
17
|
-
"<span class='label-tooltip' title='#{tooltip}'> </span>".html_safe
|
13
|
+
end
|
18
14
|
end
|
19
|
-
|
15
|
+
|
16
|
+
def tooltip_box(tooltip, options = {fallback: false})
|
17
|
+
"<span class='label-tooltip label-tooltip-fallback-#{options[:fallback]}' title='#{tooltip}'> </span>".html_safe
|
18
|
+
end
|
19
|
+
|
20
20
|
def tooltip_content_box(name, options = {}, &block)
|
21
21
|
options[:default_class] ||= "icon-clue"
|
22
22
|
html = "<div class='tooltip-box'><div class='tooltip-box-label #{options[:default_class]}'>"
|
23
23
|
html << "#{name}<div class='tooltip-box-content #{options[:css]} box rounded shadow'>#{capture(&block)}</div></div></div>"
|
24
24
|
concat(html.html_safe)
|
25
|
-
end
|
26
|
-
|
27
|
-
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
@@ -28,7 +28,9 @@ module FriendsLabeledFormHelper
|
|
28
28
|
end
|
29
29
|
|
30
30
|
# we dont want to see the empty boxes on production
|
31
|
-
|
31
|
+
if tt == i18n_str && !Rails.env.production?
|
32
|
+
label_text << tooltip_box(tt, fallback: true)
|
33
|
+
else
|
32
34
|
label_text << tooltip_box(tt)
|
33
35
|
end
|
34
36
|
end
|