symphonia 3.1.2 → 3.1.3
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: 105eba641523a94187734a87e9b1d682e9ed80beff86105f35377eb86b446a34
|
4
|
+
data.tar.gz: f37c975a83d07ea1854aa0750b7592ba4ff186938a8022151309d2edfc6821d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab57ebf8faf21000d80a4b61eb6d35c99a17b8d4d19cecae23fbff3f0f2efbb462fb8ab6f1e8a61979a97bdf08fc95a36b62f981c88d6a90b8ebf11872e0ae03
|
7
|
+
data.tar.gz: ee178877c8b84f924ff2e90e4597ba4765ff169e7838765c507cde943b79a0188051e7713855ad07b7ed539922e6c0ea74ba4db8dcd0aba57877252da7f6d5f6
|
@@ -30,8 +30,8 @@ module Symphonia
|
|
30
30
|
end
|
31
31
|
respond_to do |format|
|
32
32
|
if @user.valid? && verify_registration && @user.save(validate: false)
|
33
|
-
Notifier.activation_user(@user).
|
34
|
-
Notifier.user_registered(@user).
|
33
|
+
Notifier.activation_user(@user).deliver_later
|
34
|
+
Notifier.user_registered(@user).deliver_later
|
35
35
|
format.html { redirect_to '/', notice: t(:text_user_registered) }
|
36
36
|
format.json { render status: :created }
|
37
37
|
else
|
@@ -238,8 +238,8 @@ module Symphonia
|
|
238
238
|
javascript_tag("$(document).ready(function() {#{js.html_safe}})".html_safe)
|
239
239
|
end
|
240
240
|
|
241
|
-
def icon(fa, text = nil)
|
242
|
-
fa_icon(fa, text && { text: content_tag(:span, text, class: 'd-none d-sm-inline') } || {})
|
241
|
+
def icon(fa, text = nil, **options)
|
242
|
+
fa_icon(fa, (text && { text: content_tag(:span, text, class: 'd-none d-sm-inline') } || {}).merge(options))
|
243
243
|
end
|
244
244
|
|
245
245
|
def render_symphonia_dialog(*args, &block)
|
@@ -18,8 +18,6 @@ module Symphonia
|
|
18
18
|
# <%= f.primary unless request.xhr? %>
|
19
19
|
# <% end -%>
|
20
20
|
|
21
|
-
|
22
|
-
#
|
23
21
|
def render_modal(options = {}, &block)
|
24
22
|
opts = options.slice(:id, :title, :submit, :large)
|
25
23
|
opts[:submit] = t(:button_submit) unless opts.has_key?(:submit)
|
@@ -55,5 +53,37 @@ EOF
|
|
55
53
|
script.html_safe
|
56
54
|
end
|
57
55
|
|
56
|
+
# render link and JS script tag with function for create SymphoniaDialog
|
57
|
+
#
|
58
|
+
# @param [String] name can be label or HTML text
|
59
|
+
# @param [String] element_id same ID must have container with modal content
|
60
|
+
# @param [Hash] options standard `link_to` options and
|
61
|
+
# @option options [Hash] :modal contains options for SymphoniaDialog
|
62
|
+
#
|
63
|
+
# @example
|
64
|
+
# <%= link_to_modal icon("remove", t("button_reject")), "reject_dialog", modal: { title: t(:button_reject), submit: t(:button_reject) } %>
|
65
|
+
# <div id="reject_dialog" style="display:none">
|
66
|
+
# <%= symphonia_form_tag url: reject_organization_path(@organization), method: "patch" do |f| %>
|
67
|
+
# <%= f.text_area :message, label: Organization.human_attribute_name(:reject_message) %>
|
68
|
+
# <% end %>
|
69
|
+
# </div>
|
70
|
+
def link_to_modal(name, element_id, **options)
|
71
|
+
modal_options = options.delete(:modal)
|
72
|
+
function = "symphoniaModal#{name.hash.to_s.remove(/[^\d]/)}"
|
73
|
+
link_to(name, "javascript:#{function}()", options) + \
|
74
|
+
javascript_tag do
|
75
|
+
raw <<~EOF
|
76
|
+
function #{function}() {
|
77
|
+
if (!window.symphoniaModals)
|
78
|
+
window.symphoniaModals = {}
|
79
|
+
if (!window.symphoniaModals['#{element_id}']) {
|
80
|
+
window.symphoniaModals['#{element_id}'] = new SymphoniaDialog('#{element_id}', #{raw modal_options.to_json});
|
81
|
+
}
|
82
|
+
window.symphoniaModals['#{element_id}'].show()
|
83
|
+
}
|
84
|
+
EOF
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
58
88
|
end
|
59
|
-
end
|
89
|
+
end
|
data/lib/symphonia/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: symphonia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukas Pokorny
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|