spree_backend 4.7.0 → 4.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/app/assets/javascripts/spree/backend/global/tinymce.es6 +2 -2
- data/app/controllers/spree/admin/products_controller.rb +0 -22
- data/app/views/spree/admin/prototypes/show.html.erb +2 -2
- data/app/views/spree/admin/webhooks_subscribers/index.html.erb +11 -0
- data/lib/spree/backend/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a64f6be6f1dc47fc136c7f99adf19acefe212624a332355954592d9b8ee86eee
|
4
|
+
data.tar.gz: af8d92cf1b6666f2f2c0488f4fce06f5bf26c2218a769ff8c3fdea0312ac8d86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5644b93458d102a9941ded9f1bb10f851cc538a69e3b3d5cba77e8f4a2062545a633d59b9ea6fc73db90a56e457e4b17886990fd86ea8775893627cd10fec553
|
7
|
+
data.tar.gz: 52f91826040b92c0ccc3e93e2c62b065b29de04ba9d1e9b31b18d03699d2388839fe46f411ea656c0a26cfd316c63513998e6fcfac391efc8e8ff4489ad07383
|
data/Gemfile
CHANGED
@@ -4,7 +4,7 @@ document.addEventListener("spree:load", function() {
|
|
4
4
|
tinymce.init({
|
5
5
|
selector: '.spree-rte',
|
6
6
|
plugins: [
|
7
|
-
'image table paste code link table'
|
7
|
+
'image table paste code link table lists'
|
8
8
|
],
|
9
9
|
menubar: false,
|
10
10
|
toolbar: 'undo redo | styleselect | bold italic link forecolor backcolor | alignleft aligncenter alignright alignjustify | table | bullist numlist outdent indent | code '
|
@@ -14,7 +14,7 @@ document.addEventListener("spree:load", function() {
|
|
14
14
|
selector: '.spree-rte-simple',
|
15
15
|
menubar: false,
|
16
16
|
plugins: [
|
17
|
-
'image table paste link table'
|
17
|
+
'image table paste link table lists'
|
18
18
|
],
|
19
19
|
toolbar: 'undo redo | styleselect | bold italic link forecolor backcolor | alignleft aligncenter alignright alignjustify | table | bullist numlist outdent indent'
|
20
20
|
});
|
@@ -10,7 +10,6 @@ module Spree
|
|
10
10
|
before_action :set_product_defaults, only: :new
|
11
11
|
|
12
12
|
create.before :create_before
|
13
|
-
create.before :fix_option_values_params_rails_7_1
|
14
13
|
update.before :update_before
|
15
14
|
update.before :skip_updating_status
|
16
15
|
update.after :update_status
|
@@ -168,27 +167,6 @@ module Spree
|
|
168
167
|
@prototype = Spree::Prototype.find(params[:product][:prototype_id])
|
169
168
|
end
|
170
169
|
|
171
|
-
def fix_option_values_params_rails_7_1
|
172
|
-
raise 'Verify if the patch is still needed' if Rails::VERSION::STRING >= '7.2.0'
|
173
|
-
|
174
|
-
if Rails::VERSION::STRING >= '7.1.0'
|
175
|
-
# This is a rather ugly fix for an issue with Rails 7.1.0 and 7.1.1
|
176
|
-
# As an example, a form field with name = option_values_hash[1][] and value = 5
|
177
|
-
# gets parsed incorrectly and is visible via params as the following structure
|
178
|
-
# { 'option_values_hash[1' => { '][]' => 5 } }
|
179
|
-
# This patch fixes that behavior to ensure compatibility with the existing templates
|
180
|
-
option_values_hash_keys = params[:product].keys.select { |e| e.starts_with?('option_values_hash[') }
|
181
|
-
option_values_hash = {}
|
182
|
-
option_values_hash_keys.each do |key|
|
183
|
-
value = params[:product].delete(key)
|
184
|
-
fixed_key = key.gsub(/option_values_hash\[/, '')
|
185
|
-
option_values_hash[fixed_key] ||= []
|
186
|
-
option_values_hash[fixed_key] << value['][]']
|
187
|
-
end
|
188
|
-
params[:product][:option_values_hash] = option_values_hash if option_values_hash.present?
|
189
|
-
end
|
190
|
-
end
|
191
|
-
|
192
170
|
def update_before
|
193
171
|
# NOTE: we only reset the product properties if we're receiving a post
|
194
172
|
# from the form on that tab
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<% ot.option_values.each do |ov| %>
|
14
14
|
<li>
|
15
15
|
<%= label_tag "option_value_#{ov.id}" do %>
|
16
|
-
<%= check_box_tag "product[option_values_hash[#{ot.id}]
|
16
|
+
<%= check_box_tag "product[option_values_hash][#{ot.id}][]", ov.id, params[:product] && (params[:product][:option_values_hash] || {}).values.flatten.include?(ov.id.to_s), id: "option_value_#{ov.id}", class: "option-value" %>
|
17
17
|
<div class="option-value__color" style="--presentation: <%= ov.presentation %>"></div>
|
18
18
|
<% end %>
|
19
19
|
</li>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<ul class="option-type-values">
|
24
24
|
<% ot.option_values.each do |ov| %>
|
25
25
|
<li>
|
26
|
-
<%= check_box_tag "product[option_values_hash[#{ot.id}]
|
26
|
+
<%= check_box_tag "product[option_values_hash][#{ot.id}][]", ov.id, params[:product] && (params[:product][:option_values_hash] || {}).values.flatten.include?(ov.id.to_s), id: "option_value_#{ov.id}", class: "option-value" %>
|
27
27
|
<%= label_tag "option_value_#{ov.id}", ov.presentation %>
|
28
28
|
</li>
|
29
29
|
<% end %>
|
@@ -15,6 +15,7 @@
|
|
15
15
|
<% if defined?(Spree::Vendor) && can?(:manage, Spree::Vendor) && !current_spree_vendor %>
|
16
16
|
<th><%= Spree.t(:vendor) %></th>
|
17
17
|
<% end %>
|
18
|
+
<th><%= Spree.t('admin.webhooks_subscribers.secret_key') %></th>
|
18
19
|
<th><%= Spree.t('admin.active') %></th>
|
19
20
|
<th><%= Spree.t('admin.webhooks_subscribers.subscriptions') %></th>
|
20
21
|
<th><%= Spree.t('admin.webhooks_subscribers.time_of_last_event') %></th>
|
@@ -31,6 +32,16 @@
|
|
31
32
|
<%= link_to webhooks_subscriber.vendor.name, spree.admin_vendor_path(webhooks_subscriber.vendor) if webhooks_subscriber.vendor.present? %>
|
32
33
|
</td>
|
33
34
|
<% end %>
|
35
|
+
<td>
|
36
|
+
<div class="input-group" data-controller="password-toggle">
|
37
|
+
<%= password_field_tag :password, webhooks_subscriber.secret_key, class: 'form-control unhide text-muted border-0 shadow-none bg-transparent', data: { password_toggle_target: 'unhide' }, readonly: true %>
|
38
|
+
<div class="input-group-append">
|
39
|
+
<%= button_tag class: 'btn btn-link rounded', data: { action: 'click->password-toggle#password' } do %>
|
40
|
+
<%= svg_icon name: "view.svg", width: '18', height: '18' %>
|
41
|
+
<% end %>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
</td>
|
34
45
|
<td><%= active_badge(webhooks_subscriber.active) %></td>
|
35
46
|
<td><%= webhooks_subscriber.subscriptions&.sort&.join(', ') %></td>
|
36
47
|
<td><%= webhooks_subscriber.events.order(:created_at).last&.created_at %></td>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.7.
|
4
|
+
version: 4.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-01-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: spree
|
@@ -2446,9 +2446,9 @@ licenses:
|
|
2446
2446
|
- BSD-3-Clause
|
2447
2447
|
metadata:
|
2448
2448
|
bug_tracker_uri: https://github.com/spree/spree_backend/issues
|
2449
|
-
changelog_uri: https://github.com/spree/spree_backend/releases/tag/v4.7.
|
2449
|
+
changelog_uri: https://github.com/spree/spree_backend/releases/tag/v4.7.2
|
2450
2450
|
documentation_uri: https://dev-docs.spreecommerce.org/
|
2451
|
-
source_code_uri: https://github.com/spree/spree_backend/tree/v4.7.
|
2451
|
+
source_code_uri: https://github.com/spree/spree_backend/tree/v4.7.2
|
2452
2452
|
post_install_message:
|
2453
2453
|
rdoc_options: []
|
2454
2454
|
require_paths:
|