workarea-product_additional_details 2.0.32 → 2.0.37

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: 8cf388085dcce8abed17ce4c1dae2ddbb81c277bd24755323b70612c83159892
4
- data.tar.gz: 56c3b49d63f0195293422da2c607f715c90c921ae8e9a6bdbea5322885342c04
3
+ metadata.gz: c3d47d3fb77978b7e34bab148cb5271fea0e6c18e1008829c0ed5423dabcac3f
4
+ data.tar.gz: 431dd11f6ee7e4b426ee54473aa5d9bd79ef0458aecfa249922e0e2882852af9
5
5
  SHA512:
6
- metadata.gz: 157555f62295ca411375f2540073b19b20cc3c31eb6caa286f7c2ff611ab49366e4fba3f5b26158d15eec5b5f0eee833825a68c832f015c9cc294eadf55c8a36
7
- data.tar.gz: fc268a0a385cc2892b3bc25bfe26cddcdb259a08f232b0730345877b2ae59cb6ed8f7a9b4055f24ddef7d12a25395a006c1307b1e2a8050c5b033dc3605a3f40
6
+ metadata.gz: 1f144a9577a550ad78086faf80314b6e307491caed8931f50a7fe346fcfc3bfb0d6b66dd79de63785c15e3b368a5ca535f797661aabae58843f3e1c81c285e60
7
+ data.tar.gz: df745d01dcbfe649f2569b5d689daa602f79ef61a35cba611ffda544673e6a4bea710e2b2a4df0ac903ec72ccd50c71f7ab1899e432738065e26211f7e736592
@@ -0,0 +1,10 @@
1
+ module Workarea
2
+ module Admin
3
+ module DetailsParseHelper
4
+ def parse_details_text(text)
5
+ return text.join(' ') if text.kind_of?(Array)
6
+ JSON.parse(text).join(' ') rescue text
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ module Workarea
2
+ module Storefront
3
+ module DetailsParseHelper
4
+ def parse_details_text(text)
5
+ return text.join(' ') if text.kind_of?(Array)
6
+ JSON.parse(text).join(' ') rescue text
7
+ end
8
+ end
9
+ end
10
+ end
@@ -17,7 +17,7 @@
17
17
  %td
18
18
  .property
19
19
  = hidden_field_tag 'additional_details[]', name, id: nil
20
- = text_area_tag 'additional_details[]', value, class: 'text-box text-box--i18n', id: nil
20
+ = text_area_tag 'additional_details[]', parse_details_text(value), class: 'text-box text-box--i18n', id: nil
21
21
  %td.align-center= check_box_tag 'additional_details_to_remove[]', name, false, id: nil, title: "#{t('workarea.admin.actions.delete')}: #{name} #{value}"
22
22
  %tr{ data: { cloneable_row: '' } }
23
23
  %td
@@ -1,3 +1,5 @@
1
1
  Workarea.configure do |config|
2
2
  # Add custom configuration here
3
+ Workarea::Admin::ApplicationController.helper(Workarea::Admin::DetailsParseHelper)
4
+ Workarea::Storefront::ApplicationController.helper(Workarea::Storefront::DetailsParseHelper)
3
5
  end
@@ -1,5 +1,5 @@
1
1
  module Workarea
2
2
  module ProductAdditionalDetails
3
- VERSION = "2.0.32".freeze
3
+ VERSION = "2.0.37"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workarea-product_additional_details
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.32
4
+ version: 2.0.37
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gunasekaran Raja
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-26 00:00:00.000000000 Z
11
+ date: 2020-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: workarea
@@ -49,6 +49,8 @@ files:
49
49
  - app/controllers/workarea/admin/catalog_variants_controller.decorator
50
50
  - app/controllers/workarea/admin/create_catalog_products_controller.decorator
51
51
  - app/helpers/.keep
52
+ - app/helpers/workarea/admin/details_parse_helper.rb
53
+ - app/helpers/workarea/storefront/details_parse_helper.rb
52
54
  - app/mailers/.keep
53
55
  - app/models/.keep
54
56
  - app/models/workarea/catalog/product.decorator