workarea-admin 3.5.15 → 3.5.16

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: 22151d97339dcf587e89454822b83969e0eb2a164c7f5748a34dec5d427b90c5
4
- data.tar.gz: '0279175251fddeff03ab8132ada998f4ec8e15aa9f8cc58968170de06f6d7299'
3
+ metadata.gz: 012d96e0ce66ade5a23b5294d490d9b5ea32a67462fc6f44a3e42ba1fbb70ca9
4
+ data.tar.gz: 495c4c9286915ccca98b591901675816d7dd81a8f570892f5bdbd5b7d59cf58b
5
5
  SHA512:
6
- metadata.gz: e5ee00e2c8de2a4009fe2e5b57b9299511e682ecd62ac30de7dd6bee8ebe249a69ec69956d5f14f2e01c5cd03a4d2af58a3b76af7eedfbf36ee822b08a9729a6
7
- data.tar.gz: 214e7cdb84936b2a2e40232f4fbd8876b7e7d327951ec6caaf8ca59058c52c0ae6e8ed1df7f2618c56bace59758d480074033e510f1edf107151454ed3be13ad
6
+ metadata.gz: e904cece312118b2b3dda842061f489030812d4a1fe1e1d1294a6b7267d175d25e6880727cc782784f7c07961746dda013244b2f059d2f99d323f6d55e08bd57
7
+ data.tar.gz: 779a0262c951d51efcd7d132c1944bbc0cd14a177ee9a762931e934bc8ff59108bfc81e27bde267469c24acb0e4410720bfd98c88d127a7806839f69dfbbbdea
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Add data-insert to an element. When that element is also data-remote, the
3
+ * server's response will be appended into the element matching the value of
4
+ * the data-insert attribute. (with WORKAREA modules initialized). If that
5
+ * element is also insert-before or insert-after, the response will instead
6
+ * be inserted before or after, respectively, the matching element.
7
+ */
8
+
9
+ $(document).on('ajax:success', function (event, response) {
10
+ var $element = $(event.target),
11
+ targetSelector = $element.data('insert'),
12
+ $target,
13
+ $content;
14
+
15
+ if (! $element.is('[data-insert]')) { return; }
16
+ if (_.isEmpty(targetSelector)) { return; }
17
+
18
+ $target = $(targetSelector);
19
+ $content = $(response);
20
+
21
+ if ($element.is('[data-insert-after]')) {
22
+ $content.insertAfter($target);
23
+ } else if ($element.is('[data-insert-before]')) {
24
+ $content.insertBefore($target);
25
+ } else {
26
+ $target.append($content);
27
+ }
28
+
29
+ WORKAREA.initModules($content);
30
+ });
@@ -14,6 +14,7 @@ window.feature.testAll();
14
14
  jquery3
15
15
  jquery_ujs
16
16
  jquery_ujs/replace
17
+ jquery_ujs/insert
17
18
  jquery-ui/core
18
19
  jquery-ui/widget
19
20
  jquery-ui/position
@@ -15,6 +15,10 @@ module Workarea
15
15
  inventory.available
16
16
  end
17
17
 
18
+ def available_to_sell_inventory
19
+ inventory.available_to_sell
20
+ end
21
+
18
22
  def fulfillment
19
23
  @fulfillment ||= Fulfillment::Sku.find_or_create_by(id: sku)
20
24
  end
@@ -45,7 +45,7 @@
45
45
  %td= link_to variant.fulfillment_policy, fulfillment_sku_path(variant.sku)
46
46
  %td.align-center
47
47
  = link_to inventory_sku_path(variant.sku) do
48
- = variant.available_inventory
48
+ = variant.available_to_sell_inventory
49
49
  %td.align-right
50
50
  = link_to pricing_sku_path(variant.sku) do
51
51
  = number_to_currency variant.pricing.sell_price
@@ -62,6 +62,8 @@
62
62
  = render 'workarea/admin/shared/csv_formatting_tooltip'
63
63
  %td.align-center -
64
64
 
65
+ = append_partials('admin.additional_variant_information_fields', variant: @variant)
66
+
65
67
  .workflow-bar
66
68
  .grid.grid--auto.grid--right.grid--middle
67
69
  .grid__cell= render 'workarea/admin/shared/activate_select', name: 'variant[activate_with]'
@@ -7,7 +7,7 @@
7
7
  .grid.grid--middle
8
8
  .grid__cell.grid__cell--50
9
9
  - if content.show_areas?
10
- %span= content.name
10
+ %span #{t('workarea.admin.content.edit.current_area')}:
11
11
  = inline_svg('workarea/admin/icons/navigate_next.svg', class: 'svg-icon svg-icon--small svg-icon--white')
12
12
  = form_tag request.path, method: 'get', class: 'content-editor__area-select-form' do
13
13
  = select_tag 'area_id', options_for_select(content.area_options, content.current_area), data: { form_submitting_control: '' }
@@ -31,7 +31,9 @@
31
31
  = inline_svg('workarea/admin/icons/help.svg', class: 'svg-icon svg-icon--small svg-icon--blue', title: t('workarea.admin.fields.policy'))
32
32
 
33
33
  #policy-info.tooltip-content
34
- %p= t('workarea.admin.fulfillment_skus.edit.policy_info_html')
34
+ %p
35
+ = t('workarea.admin.fulfillment_skus.edit.policy_info_html')
36
+ = append_partials('admin.fulfillment_sku_policy_info')
35
37
  = select_tag 'sku[policy]', options_for_select(fulfillment_policies, @sku.policy.optionize)
36
38
 
37
39
  .property
@@ -29,7 +29,9 @@
29
29
  = inline_svg('workarea/admin/icons/help.svg', class: 'svg-icon svg-icon--small svg-icon--blue', title: t('workarea.admin.fields.policy'))
30
30
 
31
31
  #policy-info.tooltip-content
32
- %p= t('workarea.admin.fulfillment_skus.edit.policy_info_html')
32
+ %p
33
+ = t('workarea.admin.fulfillment_skus.edit.policy_info_html')
34
+ = append_partials('admin.fulfillment_sku_policy_info')
33
35
  = select_tag 'sku[policy]', options_for_select(fulfillment_policies, @sku.policy.optionize)
34
36
 
35
37
  .property
@@ -32,7 +32,9 @@
32
32
  = link_to '#tracking-policy-info', data: { tooltip: '' } do
33
33
  = inline_svg('workarea/admin/icons/help.svg', class: 'svg-icon svg-icon--small svg-icon--blue', title: t('workarea.admin.inventory_skus.edit.tracking_policy'))
34
34
  #tracking-policy-info.tooltip-content
35
- %p= t('workarea.admin.inventory_skus.edit.tracking_policy_info_html')
35
+ %p
36
+ = t('workarea.admin.inventory_skus.edit.tracking_policy_info_html')
37
+ = append_partials('admin.inventory_sku_policy_info')
36
38
  = select_tag 'sku[policy]', options_for_select(inventory_policies, @sku.policy.optionize)
37
39
 
38
40
  .grid.grid--huge
@@ -28,7 +28,9 @@
28
28
  = link_to '#tracking-policy-info', data: { tooltip: '' } do
29
29
  = inline_svg('workarea/admin/icons/help.svg', class: 'svg-icon svg-icon--small svg-icon--blue', title: t('workarea.admin.inventory_skus.edit.tracking_policy'))
30
30
  #tracking-policy-info.tooltip-content
31
- %p= t('workarea.admin.inventory_skus.edit.tracking_policy_info_html')
31
+ %p
32
+ = t('workarea.admin.inventory_skus.edit.tracking_policy_info_html')
33
+ = append_partials('admin.inventory_sku_policy_info')
32
34
  = select_tag 'sku[policy]', options_for_select(inventory_policies, @sku.policy.optionize)
33
35
 
34
36
  .property
@@ -703,6 +703,7 @@ en:
703
703
  loading: Loading...
704
704
  preview: Preview
705
705
  title: Content for %{content}
706
+ current_area: 'Current Area'
706
707
  form:
707
708
  all_blocks: All blocks
708
709
  cancel: Cancel
@@ -1863,7 +1864,7 @@ en:
1863
1864
  policy: 'Policy:'
1864
1865
  file: 'File:'
1865
1866
  edit:
1866
- policy_info_html: "<p><strong>Ship:</strong> Item requires shipping. System does nothing automatically for this SKU.</p> <p><strong>Ignore:</strong> Item does not require shipping. System does nothing automatically for this SKU.</p> <p><strong>Download:</strong> Generates a unique URL token that grants the customer access to attached file through a download link in the order summary.</p>"
1867
+ policy_info_html: "<p><strong>Shipping:</strong> Item requires shipping. System does nothing automatically for this SKU.</p><p><strong>Download:</strong> Generates a unique URL token that grants the customer access to attached file through a download link in the order summary.</p>"
1867
1868
  page_title: Edit Fulfillment SKU %{sku}
1868
1869
  save_sku: Save SKU
1869
1870
  flash_messages:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workarea-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.15
4
+ version: 3.5.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Crouse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-07 00:00:00.000000000 Z
11
+ date: 2020-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: workarea-core
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.5.15
19
+ version: 3.5.16
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.5.15
26
+ version: 3.5.16
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: workarea-storefront
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.5.15
33
+ version: 3.5.16
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 3.5.15
40
+ version: 3.5.16
41
41
  description: Provides site administration functionality for the Workarea Commerce
42
42
  Platform.
43
43
  email:
@@ -175,6 +175,7 @@ files:
175
175
  - app/assets/images/workarea/admin/selected.svg
176
176
  - app/assets/images/workarea/admin/valid.svg
177
177
  - app/assets/javascripts/jquery_ui/admin/categorized_autocomplete.js
178
+ - app/assets/javascripts/jquery_ujs/insert.js
178
179
  - app/assets/javascripts/jquery_ujs/replace.js
179
180
  - app/assets/javascripts/workarea/admin/application.js.erb
180
181
  - app/assets/javascripts/workarea/admin/config.js.erb