cm-admin 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad9a43a0763e747a7c11a94d719d2fc9ec924f499a4081057df26eb37fd91392
4
- data.tar.gz: 474b8cc9a8f2c883bce94c1529527ba9d4ea550c2aa43e28cd233ab7bb96eb15
3
+ metadata.gz: 0bf108bd43b406a281c6ed12ad91abf98ac9c9036b65016e0290f439f6a3f4fe
4
+ data.tar.gz: 9a6ef986cf196dc7ed52479a0f5e7f325d6c51ff0b2442fed231cc39be8cae63
5
5
  SHA512:
6
- metadata.gz: 9f629c58db6ef60d36eb10244efb1bbe1298abdb96a49ea8914aea659c7912f0835f067a9573a006483877af0205d87e2fe19fbe97fa691bf826854d6e771bfc
7
- data.tar.gz: '028f51fa078b58bf8715590e269e72fe6d27a814c7a365b5a08b70641f3617a7e6fa026a8a06da85d1fd826165c48501e9abe03656ef0d2e012a61d92446dcc2'
6
+ metadata.gz: 94e62aeebf8d5554baee3efc5535cb9b63347d6de55f8a725a03f639da53db436bbba6674aa693dbb9f93a9fc69dae23bcc3e751c8adce507045115bccc9f58f
7
+ data.tar.gz: 56875e172f79dd906e4ce20f78c7621ebd4f696b7f5c582003db2e33f37ba043a3c99fbd3d14c230f5e3b8a1171ee13610fc934e40d452ac5773e17e6043d90f
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.1)
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.1'
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.1
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