cm-admin 1.0.5 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -7
- data/app/assets/javascripts/cm_admin/form_validation.js +34 -35
- data/app/assets/javascripts/cm_admin/shared_scaffolds.js +5 -1
- data/app/assets/stylesheets/cm_admin/base/scaffold.scss +1 -1
- data/app/assets/stylesheets/cm_admin/base/sidebar.scss +1 -1
- data/app/views/cm_admin/main/_actions_dropdown.html.slim +1 -1
- data/lib/cm_admin/version.rb +1 -1
- data/lib/cm_admin/view_helpers/page_info_helper.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cafa2525f536777ecf8b3307495183e0d9fcf943437221d855a9896428b848f9
|
4
|
+
data.tar.gz: 61ac21f29c6ba46c46306e556418ee1982a72a07ced8870795b4d462fff24e70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9963bef79936d74e35d893ab29dd472cd5d7eb562855bf766ea77b259e35cd5e2a0800911db1035ea1265c628bc25beaebc8f4f1bb3ebf8c5ba55c5277c8b04
|
7
|
+
data.tar.gz: 0c40a31d97908fdb9b440d337525fd9e13f594b1a4860eacbb7898d0e3a1ebd752e5559c72d0dc00c961e4f21c54743a8067628719cdc9fd456945ef2954924b
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cm-admin (1.0.
|
4
|
+
cm-admin (1.0.7)
|
5
5
|
caxlsx_rails
|
6
6
|
cocoon (~> 1.2.15)
|
7
7
|
csv-importer (~> 0.8.2)
|
@@ -113,14 +113,14 @@ GEM
|
|
113
113
|
i18n (1.11.0)
|
114
114
|
concurrent-ruby (~> 1.0)
|
115
115
|
ice_nine (0.11.2)
|
116
|
-
importmap-rails (1.1.
|
116
|
+
importmap-rails (1.1.6)
|
117
117
|
actionpack (>= 6.0.0)
|
118
118
|
railties (>= 6.0.0)
|
119
119
|
json (2.6.2)
|
120
120
|
local_time (2.1.0)
|
121
|
-
loofah (2.
|
121
|
+
loofah (2.21.3)
|
122
122
|
crass (~> 1.0.2)
|
123
|
-
nokogiri (>= 1.
|
123
|
+
nokogiri (>= 1.12.0)
|
124
124
|
mail (2.8.1)
|
125
125
|
mini_mime (>= 0.1.1)
|
126
126
|
net-imap
|
@@ -140,7 +140,7 @@ GEM
|
|
140
140
|
net-smtp (0.3.3)
|
141
141
|
net-protocol
|
142
142
|
nio4r (2.5.9)
|
143
|
-
nokogiri (1.
|
143
|
+
nokogiri (1.15.0-arm64-darwin)
|
144
144
|
racc (~> 1.4)
|
145
145
|
pagy (4.11.0)
|
146
146
|
parallel (1.22.1)
|
@@ -223,7 +223,7 @@ GEM
|
|
223
223
|
temple (>= 0.7.6, < 0.9)
|
224
224
|
tilt (>= 2.0.6, < 2.1)
|
225
225
|
temple (0.8.2)
|
226
|
-
thor (1.2.
|
226
|
+
thor (1.2.2)
|
227
227
|
thread_safe (0.3.6)
|
228
228
|
tilt (2.0.10)
|
229
229
|
timeout (0.3.2)
|
@@ -242,7 +242,7 @@ GEM
|
|
242
242
|
websocket-driver (0.7.5)
|
243
243
|
websocket-extensions (>= 0.1.0)
|
244
244
|
websocket-extensions (0.1.5)
|
245
|
-
zeitwerk (2.6.
|
245
|
+
zeitwerk (2.6.8)
|
246
246
|
|
247
247
|
PLATFORMS
|
248
248
|
arm64-darwin-20
|
@@ -1,37 +1,36 @@
|
|
1
|
-
$(document).on('
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
}
|
13
|
-
});
|
14
|
-
$("." + form_class + " select.required").each(function() {
|
15
|
-
$(this).removeClass('error');
|
16
|
-
if ($(this).val().trim().length === 0) {
|
17
|
-
$(this).parent().find('.select2').addClass('error');
|
18
|
-
window.scrollTo(top);
|
19
|
-
submit.push(true);
|
20
|
-
}
|
21
|
-
});
|
22
|
-
$('.nested_input_validation').each(function() {
|
23
|
-
var class_name;
|
24
|
-
class_name = $(this).data('class-name');
|
25
|
-
$(this).parents(':nth(1)').find('.' + class_name).addClass('hidden');
|
26
|
-
if ($(this).val().trim().length === 0) {
|
27
|
-
$(this).parents(':nth(1)').find('.' + class_name).removeClass('hidden');
|
28
|
-
window.scrollTo(top);
|
29
|
-
submit.push(true);
|
30
|
-
}
|
31
|
-
});
|
32
|
-
if (submit.length === 0) {
|
33
|
-
$('.' + form_class).submit();
|
34
|
-
return $('.form_submit').button('loading');
|
1
|
+
$(document).on('click', '.form_submit', function(e) {
|
2
|
+
console.log('Came here')
|
3
|
+
e.preventDefault();
|
4
|
+
var submit = [];
|
5
|
+
var form_class = $(this).data('form-class');
|
6
|
+
$("." + form_class + " input.required, ." + form_class + " textarea.required").each(function() {
|
7
|
+
$(this).removeClass('error');
|
8
|
+
if ($(this).val().trim().length === 0) {
|
9
|
+
$(this).addClass('error');
|
10
|
+
$(this)[0].scrollIntoView(true);
|
11
|
+
submit.push(true);
|
35
12
|
}
|
36
13
|
});
|
37
|
-
|
14
|
+
$("." + form_class + " select.required").each(function() {
|
15
|
+
$(this).removeClass('error');
|
16
|
+
if ($(this).val().trim().length === 0) {
|
17
|
+
$(this).parent().find('.select2').addClass('error');
|
18
|
+
$(this)[0].scrollIntoView(true);
|
19
|
+
submit.push(true);
|
20
|
+
}
|
21
|
+
});
|
22
|
+
$('.nested_input_validation').each(function() {
|
23
|
+
var class_name;
|
24
|
+
class_name = $(this).data('class-name');
|
25
|
+
$(this).parents(':nth(1)').find('.' + class_name).addClass('hidden');
|
26
|
+
if ($(this).val().trim().length === 0) {
|
27
|
+
$(this).parents(':nth(1)').find('.' + class_name).removeClass('hidden');
|
28
|
+
$(this)[0].scrollIntoView(true);
|
29
|
+
submit.push(true);
|
30
|
+
}
|
31
|
+
});
|
32
|
+
if (submit.length === 0) {
|
33
|
+
$('.' + form_class).submit();
|
34
|
+
return $('.form_submit').button('loading');
|
35
|
+
}
|
36
|
+
});
|
@@ -22,7 +22,11 @@ $(document).on('click', '.row-action-cell', function(e) {
|
|
22
22
|
$('.row-action-cell').removeClass('opacity-1')
|
23
23
|
$(this).addClass('opacity-1');
|
24
24
|
}
|
25
|
-
$(this).find('.table-export-popup').
|
25
|
+
if ($(this).find('.table-export-popup').hasClass('hidden')) {
|
26
|
+
return $(this).find('.table-export-popup').removeClass('hidden');
|
27
|
+
} else {
|
28
|
+
return $(this).find('.table-export-popup').addClass('hidden');
|
29
|
+
}
|
26
30
|
});
|
27
31
|
|
28
32
|
|
@@ -34,7 +34,7 @@
|
|
34
34
|
- if custom_action.display_if.call(ar_object)
|
35
35
|
- case custom_action.display_type
|
36
36
|
- when :button
|
37
|
-
=
|
37
|
+
= button_to cm_admin.send("#{cm_model.name.underscore}_index_path") + '/' + custom_action.path.gsub(':id', ar_object.id.to_s), method: custom_action.verb do
|
38
38
|
.popup-option
|
39
39
|
span
|
40
40
|
i class="#{custom_action.icon_name}"
|
data/lib/cm_admin/version.rb
CHANGED
@@ -73,9 +73,9 @@ module CmAdmin
|
|
73
73
|
|
74
74
|
def custom_action_button(custom_action, current_action_name)
|
75
75
|
if current_action_name == "index"
|
76
|
-
|
76
|
+
button_to custom_action_title(custom_action), @model.ar_model.table_name + '/' + custom_action.path, class: 'secondary-btn ml-2', method: custom_action.verb
|
77
77
|
elsif current_action_name == "show"
|
78
|
-
|
78
|
+
button_to custom_action_title(custom_action), custom_action.path.gsub(':id', params[:id]), class: 'secondary-btn ml-2', method: custom_action.verb
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cm-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sajinmp
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-05-
|
13
|
+
date: 2023-05-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|