cm-admin 1.4.8 → 1.5.0

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: 739e610f8a75252258bd23ad714ba42235f099b2966450609d811a4a87ad8f6b
4
- data.tar.gz: cb48e10324ba8876d10299e5f80ac34ed623a7c35ea768415587c81f87e42fb1
3
+ metadata.gz: 05e22c2322e5dada38d27e45852884ee430d88ddc8977470148558f27b4e2c68
4
+ data.tar.gz: 367177c2663be7f2efc5802f97228bdae67646ffa9cd38ee9cf6a011dfe6919e
5
5
  SHA512:
6
- metadata.gz: 4106dee29b565d27cea6ea4f10d3775d8d3cfbb8cb2e22b9dfcfab0f23eae421f74602b516053e7ce1d84e6a742173e1780475a28196ca3dd23948503f0e1ae2
7
- data.tar.gz: f0c32a23b1c364d2b5028f71be1e4ab4105f9316ef2585f68eeb11a814ed519548885fcd2292be7f1fb892e17eb151a82df25080b51cbf212678506a668880c1
6
+ metadata.gz: ecd9f3390b5591fda9b2096c0e0b0c29ce8f337aca166d9fb4c062dd5c6248171fab707db3dbaacada448f6b7a8d38223294dab660ee10c3ee425295db1856dd
7
+ data.tar.gz: 297546816171bdcd42c1d4a2d9306554d824ba723e7520cc534c59522bce4e1bd6f15cad3b2a2ba2ff5c5f73d53ef7e4e2153a787bae9b325c2435da0d1e7f08
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cm-admin (1.4.8)
4
+ cm-admin (1.5.0)
5
5
  caxlsx_rails
6
6
  cocoon (~> 1.2.15)
7
7
  csv-importer (~> 0.8.2)
@@ -128,7 +128,7 @@ GEM
128
128
  net-pop
129
129
  net-smtp
130
130
  marcel (1.0.4)
131
- method_source (1.0.0)
131
+ method_source (1.1.0)
132
132
  mini_mime (1.1.5)
133
133
  minitest (5.18.1)
134
134
  net-imap (0.4.10)
@@ -138,10 +138,12 @@ GEM
138
138
  net-protocol
139
139
  net-protocol (0.2.2)
140
140
  timeout
141
- net-smtp (0.4.0.1)
141
+ net-smtp (0.5.0)
142
142
  net-protocol
143
143
  nio4r (2.7.1)
144
- nokogiri (1.16.3-arm64-darwin)
144
+ nokogiri (1.16.4-arm64-darwin)
145
+ racc (~> 1.4)
146
+ nokogiri (1.16.4-x86_64-linux)
145
147
  racc (~> 1.4)
146
148
  pagy (4.11.0)
147
149
  parallel (1.22.1)
@@ -1,8 +1,8 @@
1
- $(document).on('click', '.form_submit', function(e) {
1
+ $(document).on('click', '.form_submit', function (e) {
2
2
  e.preventDefault();
3
3
  var submit = [];
4
4
  var form_class = $(this).data('form-class');
5
- $("." + form_class + " input.required, ." + form_class + " textarea.required").each(function() {
5
+ $("." + form_class + " input.required, ." + form_class + " textarea.required").each(function () {
6
6
  $(this).removeClass('is-invalid');
7
7
  if ($(this).val().trim().length === 0) {
8
8
  $(this).addClass('is-invalid');
@@ -10,15 +10,15 @@ $(document).on('click', '.form_submit', function(e) {
10
10
  submit.push(true);
11
11
  }
12
12
  });
13
- $("." + form_class + " select.required").each(function() {
13
+ $("." + form_class + " select.required").each(function () {
14
14
  $(this).removeClass('is-invalid');
15
15
  if ($(this).val().trim().length === 0) {
16
- $(this).parent().find('.select2').addClass('is-invalid');
16
+ $(this).parent().find('select').addClass('is-invalid');
17
17
  $(this)[0].scrollIntoView(true);
18
18
  submit.push(true);
19
19
  }
20
20
  });
21
- $('.nested_input_validation').each(function() {
21
+ $('.nested_input_validation').each(function () {
22
22
  var class_name;
23
23
  class_name = $(this).data('class-name');
24
24
  $(this).parents(':nth(1)').find('.' + class_name).addClass('hidden');
@@ -42,8 +42,16 @@ document.addEventListener("turbo:load", function () {
42
42
  setup_select_2_ajax();
43
43
  });
44
44
 
45
- $(document).on('click', '.menu-item', function(e) {
46
- $('.profile-popup').toggleClass('hidden');
45
+ $(document).on('click', '[data-behaviour="toggle-profile-popup"]', function(e) {
46
+ e.stopPropagation();
47
+ $('[data-behaviour="profile-popup"]').toggleClass('hidden');
48
+ });
49
+
50
+ $(document).on('click', function(e) {
51
+ var popup = $('[data-behaviour="profile-popup"]');
52
+ if (!popup.is(e.target) && popup.has(e.target).length === 0) {
53
+ popup.addClass('hidden');
54
+ }
47
55
  });
48
56
 
49
57
  $(document).on('click', '.destroy-attachment', function(e) {
@@ -1,4 +1,4 @@
1
- @import '../helpers/index.scss';
1
+ @import "../helpers/index.scss";
2
2
 
3
3
  .auth {
4
4
  display: flex;
@@ -66,7 +66,8 @@
66
66
  &:focus {
67
67
  border-color: #66afe9 !important;
68
68
  outline: 0 !important;
69
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6) !important;
69
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),
70
+ 0 0 8px rgba(102, 175, 233, 0.6) !important;
70
71
  }
71
72
  }
72
73
  }
@@ -101,8 +102,9 @@
101
102
  height: 22px;
102
103
  margin-right: 8px;
103
104
  @include font($size: 10px, $color: $white, $weight: 900);
105
+ line-height: 24px;
104
106
  background-color: $brand-color;
105
- vertical-align: middle;
107
+ vertical-align: middle;
106
108
  border-radius: 50%;
107
109
  img {
108
110
  width: 22px;
@@ -188,4 +190,4 @@
188
190
  }
189
191
  }
190
192
  }
191
- }
193
+ }
@@ -3,7 +3,6 @@
3
3
 
4
4
  .entity-header {
5
5
  @extend .d-flex.justify-content-between.align-items-start.p-4;
6
- // min-height: 109px; // Height needs to be removed once all the layouts are revamped
7
6
  background-color: var(--bs-white);
8
7
  &__info {
9
8
  .breadcrumb {
@@ -1,4 +1,5 @@
1
1
  @import "../helpers/index.scss";
2
+ @import "../dependency/bootstrap/scss/bootstrap";
2
3
 
3
4
  .quick-search-modal {
4
5
  .modal-dialog {
@@ -11,12 +12,17 @@
11
12
  }
12
13
  }
13
14
  .quick-search-field {
15
+ @extend .input-group;
16
+ .search-input {
17
+ @extend .form-control;
18
+ }
14
19
  .clear-search {
15
20
  position: absolute;
16
21
  top: 8px;
17
22
  right: 16px;
18
23
  @include font($size: $t4-text, $color: $ink-lighter-clr);
19
24
  line-height: 22px;
25
+ z-index: 9;
20
26
  cursor: pointer;
21
27
  }
22
28
  }
@@ -172,8 +172,8 @@
172
172
  display: inline-flex;
173
173
  align-items: center;
174
174
  justify-content: center;
175
- width: 32px;
176
- height: 32px;
175
+ width: 22px;
176
+ height: 22px;
177
177
  @include font($size: $t3-text, $color: $white, $weight: 600);
178
178
  background-color: $brand-color;
179
179
  border-radius: $circle;
@@ -216,5 +216,3 @@
216
216
  }
217
217
  }
218
218
  }
219
-
220
-
@@ -13,10 +13,10 @@
13
13
  / span
14
14
  / i.fa.fa-angle-down
15
15
  - if flash[:alert].present?
16
- .alert.alert-danger role="alert"
16
+ .alert.alert-danger.me-4 role="alert"
17
17
  = flash[:alert].html_safe
18
18
  - elsif flash[:notice].present?
19
- .alert.alert-success
19
+ .alert.alert-success.me-4
20
20
  = flash[:notice].html_safe
21
21
 
22
22
  - bulk_actions = actions_filter(@model, @ar_object, :bulk_action)
@@ -4,8 +4,8 @@
4
4
  .breadcrumb
5
5
  = link_to "#{@model.name.titleize.pluralize} /", cm_admin.send(:"#{@model.name.underscore}_index_path"), class: 'text-reset'
6
6
  h4 = action_title
7
- - if @model.current_action.page_description
8
- p.mb-0.text-body-secondary = @model.current_action.page_description
7
+ / - if @model.current_action.page_description
8
+ / p.mb-0.text-body-secondary = @model.current_action.page_description
9
9
  .entity-header__actions
10
10
  - if @model.current_action.name == 'index'
11
11
  - if has_valid_policy(@ar_object, :exportable)
@@ -1,6 +1,6 @@
1
1
  - custom_action_with_modals = @model.available_actions.select{ |act| act if act.display_type == :modal && act.action_type == :custom }
2
2
  - bulk_action_with_modals = @model.available_actions.select{ |act| act if act.display_type == :modal && act.action_type == :bulk_action }
3
- - destroy_action = available_actions(@model, @ar_object, 'destroy')
3
+ - destroy_action = @ar_object ? available_actions(@model, @ar_object, 'destroy') : nil
4
4
  - if @associated_model
5
5
  - custom_action_with_modals += @associated_model.available_actions.select{ |act| act if act.display_type == :modal }
6
6
  - if @current_action&.name == 'index'
@@ -7,7 +7,7 @@
7
7
  .modal-body
8
8
  .custom-modal-body
9
9
  .modal-info data-section="bulk-action"
10
- | Are you sure you want to delete this #{@model.name.classify}
10
+ | Are you sure you want to delete this #{@model.name.classify}?
11
11
  .modal-footer
12
12
  = button_to cm_admin.send("#{@model.name.underscore}_destroy_path", ar_object), method: :delete, class: "btn btn-primary" do
13
13
  span
@@ -14,16 +14,16 @@
14
14
 
15
15
  - if defined?(user_full_name)
16
16
  .sidebar__footer
17
- .menu-item
17
+ .menu-item data-behaviour="toggle-profile-popup"
18
18
  .profile-name
19
19
  span.profile-avatar #{user_full_name.first.titleize}
20
20
  | #{user_full_name.titleize}
21
- .profile-popup.hidden
21
+ .profile-popup.hidden data-behaviour="profile-popup"
22
22
  .profile-info
23
23
  .profile-info__left
24
24
  p.name-text = user_full_name
25
25
  p.email-text = current_user.email
26
- .profile-info__right
26
+ .profile-info__right #{user_full_name.first.titleize}
27
27
  .auth-option
28
28
  = button_to destroy_user_session_path, method: :delete, class: 'auth-link', data: { turbo: :false }
29
29
  | Logout
@@ -3,13 +3,11 @@
3
3
  .modal-content
4
4
  .modal-body
5
5
  .quick-search-field
6
- .form-field
7
- .field-input-wrapper
8
- input#quick-search-input.search-input placeholder="Search" data-behaviour="quick-input-search" autocomplete="off"
9
- span.search-input-icon
10
- i.fa.fa-search
11
- span.clear-search.hidden
12
- i.fa.fa-times
6
+ span.input-group-text
7
+ i.fa.fa-search
8
+ input#quick-search-input.search-input placeholder="Search" data-behaviour="quick-input-search" autocomplete="off"
9
+ span.clear-search.hidden
10
+ i.fa.fa-times
13
11
  .search-results-container.list-area
14
12
  = navigation_links('quick_links')
15
13
  .results-action
@@ -1,3 +1,3 @@
1
1
  module CmAdmin
2
- VERSION = '1.4.8'
2
+ VERSION = '1.5.0'
3
3
  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.4.8
4
+ version: 1.5.0
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-04-03 00:00:00.000000000 Z
13
+ date: 2024-04-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: caxlsx_rails
@@ -498,7 +498,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
498
498
  - !ruby/object:Gem::Version
499
499
  version: '0'
500
500
  requirements: []
501
- rubygems_version: 3.2.3
501
+ rubygems_version: 3.5.4
502
502
  signing_key:
503
503
  specification_version: 4
504
504
  summary: CmAdmin is a robust gem designed to assist in creating admin panels for Rails