cm-admin 2.1.0 → 2.1.2

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: fe90c70d41c0c926b741a4bcb28301950fffbf1c65aa3ccb66fb01679006e25d
4
- data.tar.gz: 7beb40a997866418c007bb20d793ce41c176b44a1e4071e929e460eeec0ccf58
3
+ metadata.gz: 0bf108bd43b406a281c6ed12ad91abf98ac9c9036b65016e0290f439f6a3f4fe
4
+ data.tar.gz: 9a6ef986cf196dc7ed52479a0f5e7f325d6c51ff0b2442fed231cc39be8cae63
5
5
  SHA512:
6
- metadata.gz: e7a98b27a48e7d26b684afb2c8c11dca4402d47f4611d0b50bae4fed2da7350843f1db2db5722c5cd049becf95f0d149c72317a03de6b98d7d1aeb57af0ef9e5
7
- data.tar.gz: ec328874d48319a601a0abaa14345faa0789df2c20be3ef16e2f67cabe4d21761fce1b3a0df2a5244fa7f06ba312b26beab53a03ce3d8cf347b757d942886f73
6
+ metadata.gz: 94e62aeebf8d5554baee3efc5535cb9b63347d6de55f8a725a03f639da53db436bbba6674aa693dbb9f93a9fc69dae23bcc3e751c8adce507045115bccc9f58f
7
+ data.tar.gz: 56875e172f79dd906e4ce20f78c7621ebd4f696b7f5c582003db2e33f37ba043a3c99fbd3d14c230f5e3b8a1171ee13610fc934e40d452ac5773e17e6043d90f
@@ -46,7 +46,7 @@ jobs:
46
46
  run: gem install gem-release
47
47
 
48
48
  - name: Bump the gem
49
- run: gem bump --version ${{ github.event.inputs.bump_type }}
49
+ run: gem bump --version ${{ github.event.inputs.bump_type }} -p
50
50
 
51
51
  - name: Remove lock on bundle
52
52
  run: bundle config set frozen false
data/.yardopts CHANGED
@@ -1,6 +1,4 @@
1
1
  lib/cm_admin/models/dsl_method.rb
2
2
  -
3
- docs/ShowHideContent.md
4
- docs/ListingSelectTwoItems.md
5
- docs/ListingSelectTwoAjax.md
6
- docs/AddingAlert.md
3
+ docs/**.md
4
+ docs/**.rb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cm-admin (2.1.0)
4
+ cm-admin (2.1.2)
5
5
  caxlsx_rails
6
6
  cocoon (~> 1.2.15)
7
7
  csv-importer (~> 0.8.2)
data/README.md CHANGED
@@ -39,6 +39,8 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
39
39
 
40
40
  To install this gem onto your local machine, run `bundle exec rake install`.
41
41
 
42
+ Any markdown and ruby file added in `docs/` folder will be auto added in yard docs.
43
+
42
44
  ## Deployment
43
45
 
44
46
  To release a new version of the Gem you can use Github Actions.
@@ -16,6 +16,7 @@ $(document).on("click", '[data-behaviour="form_submit"]', function (e) {
16
16
  submit.push(true);
17
17
  }
18
18
  });
19
+
19
20
  $("." + form_class + " select.required").each(function () {
20
21
  $(this).removeClass("is-invalid");
21
22
  let selected_value = $(this).val();
@@ -49,3 +50,10 @@ $(document).on("click", '[data-behaviour="form_submit"]', function (e) {
49
50
  return $('[data-behaviour="form_submit"]').button("loading");
50
51
  }
51
52
  });
53
+
54
+ $(document).on("click", '[data-behaviour="discard_form"]', function (e) {
55
+ e.preventDefault();
56
+ const form = $(this).closest("form");
57
+ form[0].reset();
58
+ window.history.back();
59
+ });
@@ -114,3 +114,7 @@
114
114
  border: 1px solid $gray-300;
115
115
  background-color: $gray-100;
116
116
  }
117
+
118
+ .discard-form {
119
+ margin-left: 16px;
120
+ }
@@ -34,4 +34,4 @@
34
34
  = select_tag(:policy_scope_name, options_for_select(model.policy_scopes.map{|policy_hash| [policy_hash[:display_name], policy_hash[:scope_name]]}, permission&.scope_name), {name: "role_permission[#{model.name}][#{action.name}][scope_name]", class: 'select-2', id: "policy-scope-#{model.name}-#{action.name}"})
35
35
  div
36
36
  = f.submit 'Save Changes', class: "btn-cta"
37
- = link_to 'Discard', cm_admin.send('cm_role_index_path'), class: "btn btn-outline-dark ml-10"
37
+ = link_to 'Discard', cm_admin.send('cm_role_index_path'), class: "btn-secondary ml-10"
@@ -1,3 +1,3 @@
1
1
  module CmAdmin
2
- VERSION = '2.1.0'
2
+ VERSION = '2.1.2'
3
3
  end
@@ -161,6 +161,7 @@ module CmAdmin
161
161
  concat split_form_into_section(resource, form_obj, entities)
162
162
  concat tag.br
163
163
  concat form_obj.submit 'Save', class: 'btn-cta', data: { behaviour: 'form_submit', form_class: "cm_#{form_obj.object.class.name.downcase}_form" }
164
+ concat button_tag 'Discard', class: 'btn-secondary discard-form', data: { behaviour: 'discard_form' }
164
165
  end
165
166
  end
166
167
 
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.1.0
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: exe
16
16
  cert_chain: []
17
- date: 2024-09-13 00:00:00.000000000 Z
17
+ date: 2024-09-17 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: caxlsx_rails