activeadmin_addons 2.0.0.beta.3 → 2.0.0.beta.4

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: 89b4ce7695da72133e698f7a197889ac11799489282ec78b5e86aa8c91b067ba
4
- data.tar.gz: 19d91fa45dacd9e69381732b8565ca19126980b2c774082f4ea04874bf2652aa
3
+ metadata.gz: 6d1d92c2197d4d974df8f2d6e19551aa328ab605c65fe492b84a9a5874e97452
4
+ data.tar.gz: b144abdc489072a0edd9b61ebbf04b46b27495b26f92cbac0ab539c75943605b
5
5
  SHA512:
6
- metadata.gz: 8325581c4b779c1b55cccb627afd6da7fe360212e051851358124c2f837a1fdfdea0264051d7c545136f611b56311494286de1b1c4ee760c46fe77b81776438a
7
- data.tar.gz: 7700a77a2ad797b32259d4060cf0ae637452a6e1403fae4387b231c8322128fbe6b4e59b95d6cedb707fd12768f41837bfda13b48aebc52ab4fef54c61acbf9e
6
+ metadata.gz: f27037816601052006e102f463e2992da4d5a04d9fa897717bf1f25891e03b0d5b34c852725ba18ad6e1417a4943c58e2a77071d7cc234918d33cecd06c1c26d
7
+ data.tar.gz: ad92d7c5390027c736081e829a171abc45afdb50c32b504c634540ccf769b29791dbda72eb1f7f42b534edd87e5088766b0d339ca9502efcc15c54c39a932565
@@ -26,7 +26,6 @@ class SelectedListInput < ActiveAdminAddons::InputBase
26
26
 
27
27
  def render_control_wrapper
28
28
  template.content_tag(:div, class: "selected-list-container") do
29
- template.content_tag(label_html)
30
29
  template.concat(render_items_list)
31
30
  template.concat(builder.select(build_virtual_attr, [], {}, input_html_options))
32
31
  end
@@ -2,6 +2,20 @@ var initializer = function() {
2
2
  $('.toggle-bool-switch').click(function(e) {
3
3
  var boolSwitch = $(e.target);
4
4
 
5
+ var value = boolSwitch.data('value');
6
+ var confirmMessage = boolSwitch.data('confirm_message');
7
+ var confirmTrigger = boolSwitch.data('confirm_message_trigger') || 'both';
8
+
9
+ if (confirmMessage) {
10
+ var shouldConfirm =
11
+ (confirmTrigger === 'both') ||
12
+ (confirmTrigger === 'on' && !value) ||
13
+ (confirmTrigger === 'off' && value);
14
+
15
+ if (shouldConfirm && !confirm(confirmMessage)) {
16
+ return false;
17
+ }
18
+ }
5
19
  var objectId = boolSwitch.data('object_id');
6
20
  var model = boolSwitch.data('model');
7
21
  var field = boolSwitch.data('field');
@@ -1,11 +1,10 @@
1
1
  .filter_date_time_picker_filter {
2
2
  li {
3
3
  list-style: none;
4
+ margin-bottom: 5px;
4
5
 
5
6
  label {
6
7
  display: none;
7
8
  }
8
-
9
- margin-bottom: 5px;
10
9
  }
11
10
  }
@@ -24,7 +24,9 @@ module ActiveAdminAddons
24
24
  'data-field' => attribute,
25
25
  'data-value' => data,
26
26
  'data-url' => resource_url,
27
- 'data-success_message' => options[:success_message]
27
+ 'data-success_message' => options[:success_message],
28
+ 'data-confirm_message' => options[:confirm_message],
29
+ 'data-confirm_message_trigger' => options[:confirm_message_trigger]
28
30
  )
29
31
  end
30
32
 
@@ -1,3 +1,3 @@
1
1
  module ActiveadminAddons
2
- VERSION = "2.0.0.beta.3"
2
+ VERSION = "2.0.0.beta.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin_addons
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta.3
4
+ version: 2.0.0.beta.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Platanus
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2023-08-24 00:00:00.000000000 Z
14
+ date: 2024-12-06 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: railties
@@ -506,11 +506,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
506
506
  version: 2.7.0
507
507
  required_rubygems_version: !ruby/object:Gem::Requirement
508
508
  requirements:
509
- - - ">"
509
+ - - ">="
510
510
  - !ruby/object:Gem::Version
511
- version: 1.3.1
511
+ version: '0'
512
512
  requirements: []
513
- rubygems_version: 3.4.10
513
+ rubygems_version: 3.5.22
514
514
  signing_key:
515
515
  specification_version: 4
516
516
  summary: Set of addons to help with the activeadmin ui