scrivito_content_browser 1.7.0 → 1.8.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_content_browser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.8.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 1.7.0
33
+ version: 1.8.0.rc1
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: 1.7.0
40
+ version: 1.8.0.rc1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: pry
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -79,7 +79,6 @@ files:
79
79
  - app/assets/javascripts/scrivito_content_browser.js
80
80
  - app/helpers/converter_helper.rb
81
81
  - config/initializers/obj_extension.rb
82
- - config/initializers/scrivito_content_browser.rb
83
82
  - lib/scrivito_content_browser.rb
84
83
  - lib/scrivito_content_browser/engine.rb
85
84
  homepage: http://www.scrivito.com
@@ -1,19 +0,0 @@
1
- # Register a JavaScript search API result format used by the content browser.
2
- Scrivito::Configuration.register_obj_format('content_browser') do |obj, _, view_context|
3
- format = {
4
- id: obj.id,
5
- file_type: obj.obj_class,
6
- file_size: ConverterHelper.human_binary_length(obj),
7
- last_changed: obj[:_last_changed],
8
- title: obj.description_for_editor.presence || obj.binary.try(:filename),
9
- subtitle: obj.info_for_content_browser,
10
- mime_type: obj.binary_content_type,
11
- }
12
-
13
- if obj.binary_content_type && obj.binary_content_type.start_with?('image/')
14
- binary = obj.binary.transform(width: 260, height: 140)
15
- format[:preview] = view_context.scrivito_path(binary)
16
- end
17
-
18
- format
19
- end