cm-admin 1.5.2 → 1.5.4

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: 6f7069da141483288102690ee44cb4343f343822031103677ab598d0a5ccb0b1
4
- data.tar.gz: 50aa27e800231369711bd021dbe17f7ad456b76bc935acee234be6eb87f636b0
3
+ metadata.gz: e262894df324aafa74d958a22a83676c9f03072549786ff879896a52d27f0eac
4
+ data.tar.gz: ab5347b2432f6e7cd8e4afb8c2c6c98cef4f29b8473ef008c8a30354af4ec25c
5
5
  SHA512:
6
- metadata.gz: d6ed0804824162768e7edcd8156e58016760a038a1e4e018410b54caec4b197f7d79384e3c54383a5a977754a08b57818d86fdc2a41df596b0c2f74cb4a8bf57
7
- data.tar.gz: f06e7efe409134da48d7fd95b3e741fa191cff10ae50ab18da19270653c7fccd316ce893d7fd91c4277deecade00ee2424ad808dd88e9a69e02397b0acfe4351
6
+ metadata.gz: '0930b09997cd26896b00870d3c876659fea23fa0669537858d38953a3295361b01d2c326b0914b9249fc158c4943c693bc726fea36737293be8f50325f33a85f'
7
+ data.tar.gz: 1d11f6a2baeb4db02c4b413b8f6beb1e66e8e53e4312c2172b6466ee902a2487545d0f6242e6ad05be8ba7e3a14939a1c707c35294793eef30804dbe798cb8f8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cm-admin (1.5.2)
4
+ cm-admin (1.5.4)
5
5
  caxlsx_rails
6
6
  cocoon (~> 1.2.15)
7
7
  csv-importer (~> 0.8.2)
@@ -131,7 +131,7 @@ GEM
131
131
  method_source (1.1.0)
132
132
  mini_mime (1.1.5)
133
133
  minitest (5.18.1)
134
- net-imap (0.4.10)
134
+ net-imap (0.4.11)
135
135
  date
136
136
  net-protocol
137
137
  net-pop (0.1.2)
@@ -140,8 +140,8 @@ GEM
140
140
  timeout
141
141
  net-smtp (0.5.0)
142
142
  net-protocol
143
- nio4r (2.7.1)
144
- nokogiri (1.16.4-arm64-darwin)
143
+ nio4r (2.7.3)
144
+ nokogiri (1.16.5-arm64-darwin)
145
145
  racc (~> 1.4)
146
146
  pagy (4.11.0)
147
147
  parallel (1.22.1)
@@ -149,7 +149,7 @@ GEM
149
149
  ast (~> 2.4.1)
150
150
  pundit (2.2.0)
151
151
  activesupport (>= 3.0.0)
152
- racc (1.7.3)
152
+ racc (1.8.0)
153
153
  rack (2.2.7)
154
154
  rack-proxy (0.7.7)
155
155
  rack
@@ -245,7 +245,7 @@ GEM
245
245
  websocket-driver (0.7.6)
246
246
  websocket-extensions (>= 0.1.0)
247
247
  websocket-extensions (0.1.5)
248
- zeitwerk (2.6.13)
248
+ zeitwerk (2.6.14)
249
249
 
250
250
  PLATFORMS
251
251
  arm64-darwin-20
@@ -54,9 +54,10 @@ $(document).on('click', function(e) {
54
54
  }
55
55
  });
56
56
 
57
- $(document).on('click', '.destroy-attachment', function(e) {
58
- var ar_id = $(this).data('ar-id')
59
- $(this).addClass('hidden')
57
+ $(document).on('click', '.destroy-attachment button', function(e) {
58
+ e.preventDefault();
59
+ var ar_id = $(this).parent('.destroy-attachment').data('ar-id')
60
+ $(this).parent('.destroy-attachment').addClass('hidden')
60
61
  $(this).append('<input type="text" name="attachment_destroy_ids[]" value="' + ar_id + '"/>')
61
62
  })
62
63
 
@@ -65,12 +65,6 @@
65
65
  z-index: 2;
66
66
  background-color: $white;
67
67
  }
68
- th:nth-child(2) {
69
- position: sticky;
70
- left: 32px;
71
- z-index: 2;
72
- background-color: $white;
73
- }
74
68
  }
75
69
 
76
70
  tbody {
@@ -93,12 +87,6 @@
93
87
  z-index: 2;
94
88
  background-color: $white;
95
89
  }
96
- td:nth-child(2) {
97
- position: sticky;
98
- left: 32px;
99
- z-index: 2;
100
- background-color: $white;
101
- }
102
90
  }
103
91
 
104
92
  .check-box-space {
@@ -128,6 +116,37 @@
128
116
  }
129
117
  }
130
118
  }
119
+
120
+ [data-bulk-actions="present"] {
121
+ thead {
122
+ th:nth-child(1) {
123
+ position: sticky;
124
+ left: 0;
125
+ z-index: 2;
126
+ background-color: $white;
127
+ }
128
+ th:nth-child(2) {
129
+ position: sticky;
130
+ left: 32px;
131
+ z-index: 2;
132
+ background-color: $white;
133
+ }
134
+ }
135
+ tbody {
136
+ td:nth-child(1) {
137
+ position: sticky;
138
+ left: 0;
139
+ z-index: 2;
140
+ background-color: $white;
141
+ }
142
+ td:nth-child(2) {
143
+ position: sticky;
144
+ left: 32px;
145
+ z-index: 2;
146
+ background-color: $white;
147
+ }
148
+ }
149
+ }
131
150
  }
132
151
 
133
152
  // table-column-modal
@@ -2,7 +2,7 @@ module CmAdmin::FileImport
2
2
  extend ActiveSupport::Concern
3
3
  included do
4
4
  cm_admin do
5
- STATUS_TAG_COLOR = { in_progress: 'yellow-tag', success: 'success'}
5
+ STATUS_TAG_COLOR = { in_progress: 'active-two', success: 'completed', failed: 'danger' }
6
6
  actions only: [:index, :show]
7
7
  set_icon 'fa fa-file-upload'
8
8
  cm_index do
@@ -21,7 +21,7 @@ module CmAdmin::FileImport
21
21
  column :status, field_type: :tag, tag_class: STATUS_TAG_COLOR
22
22
  column :associated_model_name, header: 'Table name'
23
23
  column :added_by_name, header: 'Uploaded By'
24
-
24
+
25
25
  end
26
26
 
27
27
  cm_show page_title: :id do
@@ -43,4 +43,4 @@ module CmAdmin::FileImport
43
43
  end
44
44
  end
45
45
  end
46
- end
46
+ end
@@ -26,7 +26,7 @@
26
26
  - bulk_actions.each do |action|
27
27
  = custom_action_items(action, 'index')
28
28
  .table-wrapper
29
- table.index-table
29
+ table.index-table data-bulk-actions=(bulk_actions.present? && "present")
30
30
  thead.cm-table__header
31
31
  tr.header-row
32
32
  - if bulk_actions.present?
@@ -25,7 +25,7 @@
25
25
  - bulk_actions.each do |action|
26
26
  = custom_action_items(action, 'index')
27
27
  .table-wrapper
28
- table.index-table
28
+ table.index-table data-bulk-actions=(bulk_actions.present? && "present")
29
29
  thead
30
30
  tr
31
31
  - if bulk_actions.present?
@@ -1,3 +1,3 @@
1
1
  module CmAdmin
2
- VERSION = '1.5.2'
2
+ VERSION = '1.5.4'
3
3
  end
@@ -152,7 +152,7 @@ module CmAdmin
152
152
  concat attachment_with_icon(attachment)
153
153
  end
154
154
  else
155
- concat attachment_with_icon(attached) if attached
155
+ concat attachment_with_icon(attached) if attached.attached?
156
156
  end
157
157
  end
158
158
  end
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.5.2
4
+ version: 1.5.4
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: 2024-05-14 00:00:00.000000000 Z
13
+ date: 2024-05-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: caxlsx_rails