rails_base 0.60.0 → 0.61.0
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: f94ae56f9f525b93289e14773189cf437328e50ef8b2e4c7f374bc157730ddcc
|
4
|
+
data.tar.gz: 8bd40fe32d2bbb0e700e283cd0769121d385844bca3dd02dfd7e426bc32db057
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 168ac878736a648e77e471b420a3efa0fac9244fd3c0ae594d09737db68e8ebfb99fa8077e48b63813ddde04f7ad59ca0fd52556da1db192f0fc0b6217c6f90c
|
7
|
+
data.tar.gz: '091ca1be6b369f1d5a03677a6b115e69e1dd5d9cdd07032b648e9650a358999b07bf2a2d0c25a531b92048dc6e2d304ae265fd7459e8b9cb7cc8d3e7554994f5'
|
@@ -192,6 +192,16 @@
|
|
192
192
|
<% end %>
|
193
193
|
}
|
194
194
|
|
195
|
+
function _rails_base_toggle_base_footer(status){
|
196
|
+
if(status=='show') {
|
197
|
+
$('#base-footer').show()
|
198
|
+
} else if(status=='hide') {
|
199
|
+
$('#base-footer').hide()
|
200
|
+
} else {
|
201
|
+
$('#base-footer').toggle()
|
202
|
+
}
|
203
|
+
}
|
204
|
+
|
195
205
|
_rails_base_reload_base_footer();
|
196
206
|
|
197
207
|
<% unless defined?(@error_page) %>
|
@@ -0,0 +1,62 @@
|
|
1
|
+
|
2
|
+
<%
|
3
|
+
id = options.fetch(:id)
|
4
|
+
title = options.fetch(:title_id)
|
5
|
+
body = options.fetch(:body_id)
|
6
|
+
use_fa_icon = options[:fa_icon] != false
|
7
|
+
if use_fa_icon
|
8
|
+
fa_icon_open = options.dig(:fa_icon, :open) || 'fa-caret-right'
|
9
|
+
fa_icon_closed = options.dig(:fa_icon, :closed) || 'fa-caret-down'
|
10
|
+
fa_icon_only = options.dig(:fa_icon, :collapse_only) || false
|
11
|
+
fa_icon_span_class = "fa-icon-span-class-#{rand(100..100_000)}_id-#{id}"
|
12
|
+
fa_icon_span_id = "id-#{fa_icon_span_class}"
|
13
|
+
end
|
14
|
+
start_open = !(options[:default_closed] || false)
|
15
|
+
close_display = start_open ? 'inline' : 'none'
|
16
|
+
open_display = !start_open ? 'inline' : 'none'
|
17
|
+
id_transposed = "id_transposed_#{rand(100_000..999_999)}"
|
18
|
+
%>
|
19
|
+
|
20
|
+
<% if use_fa_icon %>
|
21
|
+
<span id="<%= fa_icon_span_id %>" class="float-md-left fa-icon-span <%= fa_icon_span_class %> ">
|
22
|
+
<i class="fa <%= fa_icon_open %> open" aria-hidden="true" style="display:<%= open_display %>"></i>
|
23
|
+
<i class="fa <%= fa_icon_closed %> closed" aria-hidden="true" style="display:<%= close_display %>"></i>
|
24
|
+
</span>
|
25
|
+
<% end %>
|
26
|
+
|
27
|
+
<script type="text/javascript">
|
28
|
+
$(`#<%= body %>`).addClass('collapse')
|
29
|
+
<% if start_open %>
|
30
|
+
$(`#<%= body %>`).addClass('show')
|
31
|
+
<% end %>
|
32
|
+
<% if use_fa_icon %>
|
33
|
+
// Initialize fa <%= id %>
|
34
|
+
$(`#<%= fa_icon_span_id %>`).prependTo(`#<%= title %>`);
|
35
|
+
<% end %>
|
36
|
+
|
37
|
+
<% if use_fa_icon && fa_icon_only %>
|
38
|
+
var <%= id_transposed %> = `#<%= fa_icon_span_id %>`
|
39
|
+
<% else %>
|
40
|
+
var <%= id_transposed %> = `#<%= title %>`
|
41
|
+
<% end %>
|
42
|
+
|
43
|
+
$(<%= id_transposed %>).click(function(event){
|
44
|
+
_rails_base_toggle_base_footer('hide')
|
45
|
+
$(`#<%= body %>`).collapse('toggle')
|
46
|
+
<% if use_fa_icon %>
|
47
|
+
$(`#<%= fa_icon_span_id %> .open`).toggle()
|
48
|
+
$(`#<%= fa_icon_span_id %> .closed`).toggle()
|
49
|
+
<% end %>
|
50
|
+
});
|
51
|
+
|
52
|
+
$(`#<%= body %>`).on('shown.bs.collapse', function () {
|
53
|
+
_rails_base_reload_base_footer();
|
54
|
+
_rails_base_toggle_base_footer('show')
|
55
|
+
})
|
56
|
+
|
57
|
+
$(`#<%= body %>`).on('hidden.bs.collapse', function () {
|
58
|
+
_rails_base_reload_base_footer();
|
59
|
+
_rails_base_toggle_base_footer('show')
|
60
|
+
})
|
61
|
+
|
62
|
+
</script>
|
data/lib/rails_base/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.61.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Taylor
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -531,6 +531,7 @@ files:
|
|
531
531
|
- app/views/rails_base/shared/_reset_password_form.html.erb
|
532
532
|
- app/views/rails_base/shared/_session_create_form.html.erb
|
533
533
|
- app/views/rails_base/shared/_session_timeout_modal.html.erb
|
534
|
+
- app/views/rails_base/shared/_standardized_collapse.html.erb
|
534
535
|
- app/views/rails_base/switch_user/_widget.html.erb
|
535
536
|
- app/views/rails_base/user_settings/_confirm_destroy_user.html.erb
|
536
537
|
- app/views/rails_base/user_settings/_destroy_user.html.erb
|