cm-admin 2.4.2 → 2.4.3

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: 78f89e2eccee1468634aeeb827a6316ad2aab8b6159e1be81fedad7dcf4af917
4
- data.tar.gz: ce2f0dfc441128af6fac25e51eb64131b3e5aea68398b41af8f585d1529022c8
3
+ metadata.gz: 1811b7dc704a66a4f26ec20ee3ff1a72c1cd369d19cc968d60fcfb135eab8ded
4
+ data.tar.gz: d2b62571d0a3f3205615a604bcfdaa046590621478be3aebd37be2025dac130b
5
5
  SHA512:
6
- metadata.gz: '09855ccdcdec4dde56de8242614948af82513b56c38383e89149416b0e6e39ac0c0f58284410e9b536eb7dd89ccdcaa2f40b6933ecd76e506f7b478f02fc5ad3'
7
- data.tar.gz: 259d5867d373e63750f9af64ab874f1402f2a6dfe7b3cc839ac6a9cb7bb6f29f729d48f24b9537146fafe0951cfff6b1184fbd8a94cce441639ee17ddebceec6
6
+ metadata.gz: ee0549268bffe487c3eeabea14b127ea036b71ffbf18fbcdca944832c42558fb121f11cb4b4e7f5eb1baa9153614e588e92c21b295efce2511c06c7cfcd414a8
7
+ data.tar.gz: da4a8ab490c02decefe6597d8937da700762e91171af8859ee246e8cf769dab48356c292c750e26f111891496cf4100b865dd728cb750f7e979d0d90c10e9676
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cm-admin (2.4.2)
4
+ cm-admin (2.4.3)
5
5
  caxlsx_rails
6
6
  cocoon (~> 1.2.15)
7
7
  csv-importer (~> 0.8.2)
@@ -47,7 +47,8 @@ $(document).on("click", '[data-behaviour="form_submit"]', function (e) {
47
47
  });
48
48
  if (submit.length === 0) {
49
49
  $("." + form_class).submit();
50
- return $('[data-behaviour="form_submit"]').button("loading");
50
+ $('[data-behaviour="form_submit_spinner"]').removeClass("visually-hidden");
51
+ return $('[data-behaviour="form_submit"]').addClass("visually-hidden");
51
52
  }
52
53
  });
53
54
 
@@ -36,6 +36,10 @@
36
36
  text-decoration: underline;
37
37
  }
38
38
 
39
+ .cm-admin .btn-loading {
40
+ @extend .btn, .btn-primary, .btn-sm, .btn-icon-spacing, .disabled;
41
+ }
42
+
39
43
  // button mixin - We can use if needed
40
44
  // @include button-variant($background: #6554e0, $border: #6554e0);
41
45
 
@@ -1,3 +1,3 @@
1
1
  module CmAdmin
2
- VERSION = '2.4.2'
2
+ VERSION = '2.4.3'
3
3
  end
@@ -185,7 +185,11 @@ module CmAdmin
185
185
 
186
186
  concat split_form_into_section(resource, form_obj, entities)
187
187
  concat tag.br
188
- concat form_obj.submit 'Save', class: 'btn-cta', data: { behaviour: 'form_submit', form_class: "cm_#{form_obj.object.class.name.downcase}_form" }
188
+ concat form_obj.submit 'Save', class: 'btn-cta', data: { behaviour: 'form_submit', form_class: "cm_#{form_obj.object.class.name.downcase}_form", turbo_submits_with: 'Submitting...' }
189
+ concat (button_tag(type: 'button', class: 'btn-loading visually-hidden', data: { behaviour: 'form_submit_spinner' }) do
190
+ concat content_tag(:span, '', class: 'spinner-border spinner-border-sm', role: 'status')
191
+ concat ' Submitting...'
192
+ end)
189
193
  concat button_tag 'Discard', class: 'btn-secondary discard-form', data: { behaviour: 'discard_form' } unless @is_drawer_form
190
194
  end
191
195
  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: 2.4.2
4
+ version: 2.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael
@@ -11,10 +11,10 @@ authors:
11
11
  - Pranav
12
12
  - Mahaveer
13
13
  - Austin
14
- autorequire:
14
+ autorequire:
15
15
  bindir: exe
16
16
  cert_chain: []
17
- date: 2024-10-16 00:00:00.000000000 Z
17
+ date: 2024-10-17 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: caxlsx_rails
@@ -507,7 +507,7 @@ licenses:
507
507
  metadata:
508
508
  homepage_uri: https://github.com/commutatus/cm-admin
509
509
  source_code_uri: https://github.com/commutatus/cm-admin
510
- post_install_message:
510
+ post_install_message:
511
511
  rdoc_options: []
512
512
  require_paths:
513
513
  - lib
@@ -523,7 +523,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
523
523
  version: '0'
524
524
  requirements: []
525
525
  rubygems_version: 3.5.16
526
- signing_key:
526
+ signing_key:
527
527
  specification_version: 4
528
528
  summary: CmAdmin is a robust gem designed to assist in creating admin panels for Rails
529
529
  applications