cm-admin 1.0.5 → 1.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: faecf51ddd1a7dd895ec281a4beb4b4a88e8efe63918b41cac512f72ec27c460
4
- data.tar.gz: d1e94c3ec4bc95e8bc4bc3a42572d62606019dec522cc172135e2201ccd63f63
3
+ metadata.gz: cafa2525f536777ecf8b3307495183e0d9fcf943437221d855a9896428b848f9
4
+ data.tar.gz: 61ac21f29c6ba46c46306e556418ee1982a72a07ced8870795b4d462fff24e70
5
5
  SHA512:
6
- metadata.gz: 93f0cc6ef4e82a7aa47c776fcf1bc4ce9eba0f3f728eac78c9ee6f28d6cf887e8189cdb800bf67af8aa85a93ce0ace51d36cc65f243e0e946f59f061cf97656d
7
- data.tar.gz: 9472785aa3b6c2648be151f9d188d2084748cd35fbdadab91a9d53045eea06129bb09ec3e28e63ba371829988c0307720821862d467d9d008d1056e6033300af
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.5)
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.5)
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.20.0)
121
+ loofah (2.21.3)
122
122
  crass (~> 1.0.2)
123
- nokogiri (>= 1.5.9)
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.14.3-arm64-darwin)
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.1)
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.7)
245
+ zeitwerk (2.6.8)
246
246
 
247
247
  PLATFORMS
248
248
  arm64-darwin-20
@@ -1,37 +1,36 @@
1
- $(document).on('turbolinks:load', function () {
2
- $(document).on('click', '.form_submit', function(e) {
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
- window.scrollTo(top);
11
- submit.push(true);
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').toggle('hidden')
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
 
@@ -72,7 +72,7 @@ a {
72
72
  position: sticky;
73
73
  top: 0;
74
74
  background-color: $white;
75
- z-index: 4;
75
+ z-index: 5;
76
76
  }
77
77
 
78
78
  .scrollable {
@@ -8,7 +8,7 @@
8
8
  height: 100%;
9
9
  background-color: #252525;
10
10
  // overflow: hidden;
11
- z-index: 2;
11
+ z-index: 3;
12
12
 
13
13
  &__logo-header {
14
14
  display: flex;
@@ -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
- = link_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
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}"
@@ -1,3 +1,3 @@
1
1
  module CmAdmin
2
- VERSION = '1.0.5'
2
+ VERSION = '1.0.7'
3
3
  end
@@ -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
- link_to custom_action_title(custom_action), @model.ar_model.table_name + '/' + custom_action.path, class: 'secondary-btn ml-2', method: custom_action.verb
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
- link_to custom_action_title(custom_action), custom_action.path.gsub(':id', params[:id]), class: 'secondary-btn ml-2', method: custom_action.verb
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.5
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-02 00:00:00.000000000 Z
13
+ date: 2023-05-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails