alchemy-richmedia-essences 0.3.0 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +13 -0
  3. data/LICENSE.txt +1 -1
  4. data/README.md +39 -20
  5. data/alchemy-richmedia-essences.gemspec +4 -4
  6. data/app/controllers/alchemy/admin/essence_audios_controller.rb +5 -5
  7. data/app/controllers/alchemy/admin/essence_videos_controller.rb +6 -4
  8. data/app/models/alchemy/essence_audio.rb +1 -1
  9. data/app/models/alchemy/essence_video.rb +1 -1
  10. data/app/views/alchemy/admin/essence_audios/edit.html.erb +5 -5
  11. data/app/views/alchemy/admin/essence_files/assign.js.erb +9 -0
  12. data/app/views/alchemy/admin/essence_videos/edit.html.erb +7 -4
  13. data/app/views/alchemy/essences/_essence_audio_editor.html.erb +4 -4
  14. data/app/views/alchemy/essences/_essence_audio_view.html.erb +14 -32
  15. data/app/views/alchemy/essences/_essence_video_editor.html.erb +4 -4
  16. data/app/views/alchemy/essences/_essence_video_view.html.erb +17 -34
  17. data/app/views/alchemy/essences/_richmedia_essence_editor.html.erb +33 -51
  18. data/config/routes.rb +0 -1
  19. data/db/migrate/20121113171023_create_alchemy_richmedia_essences.rb +1 -1
  20. data/db/migrate/20140814212620_alchemy_essence_video_html5_update.rb +25 -0
  21. data/db/migrate/20150728153847_remove_alchemy_essence_flashes.rb +9 -0
  22. data/db/migrate/20150728172823_alchemy_essence_audio_html5_update.rb +17 -0
  23. data/db/migrate/20151005130801_add_preload_to_alchemy_essence_videos.rb +5 -0
  24. data/lib/alchemy-richmedia-essences/ability.rb +0 -1
  25. data/lib/alchemy-richmedia-essences/version.rb +1 -1
  26. metadata +17 -19
  27. data/app/controllers/alchemy/admin/essence_flashes_controller.rb +0 -25
  28. data/app/models/alchemy/essence_flash.rb +0 -8
  29. data/app/views/alchemy/admin/essence_flashes/edit.html.erb +0 -6
  30. data/app/views/alchemy/essences/_essence_flash_editor.html.erb +0 -6
  31. data/app/views/alchemy/essences/_essence_flash_view.html.erb +0 -26
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c368e688fbed9b1e75d5390132a2e96c8aab3a3a
4
- data.tar.gz: 1466c1312100108384f41c867705792d2f2a558d
2
+ SHA256:
3
+ metadata.gz: '091bd86f3821388cbcf99319b0b498078c4f124e12f885c814c932d4a8835b05'
4
+ data.tar.gz: 6f27b19ccbabf6ca1c61698cfc859835d0875b228d052fb647f8394cbe7d8845
5
5
  SHA512:
6
- metadata.gz: 3b4f8af2708993d78972231d631a4c3007474848c2b2cabb1dd972a0b2ffc3e598972294420e7fd9016b6ded9e40b4ce6917fd3c6f60c05a688aa55793ddf162
7
- data.tar.gz: 0e0ca4a660ad8e1f337beab1fddc44008312170ec41426afd80d78b0374836abb56cbc6b83967ac3c140b3bbc5c320e461fa4eb3ed7ffa5fa843c86549d44747
6
+ metadata.gz: e7d83af1f141c590bea2c7ea1b513e05b97a131e4608c5d6211dcdc3a69dab5af5612c36c994c3875532f87f62caf0c6375da9e2c134f59fbbb453b93902159e
7
+ data.tar.gz: aa759065419b46a285e863cd876e026ebf1d6f5d581a996f59d004046e74c24bc9899db96d87ae384f76459f2c71c32425a7cd395f4e952593f02e13d69bf6e4
@@ -0,0 +1,13 @@
1
+ ## 2.3.0 (2020-07-16)
2
+
3
+ - Add support for rendering essence by partial name ([tvdeyen](https://github.com/tvdeyen))
4
+
5
+ ## 2.2.0 (2020-01-07)
6
+
7
+ - Do not rely on options variable in essence editor files [#17](https://github.com/AlchemyCMS/alchemy-richmedia-essences/pull/17) ([tvdeyen](https://github.com/tvdeyen))
8
+
9
+ ## 2.1.0 (2019-11-11)
10
+
11
+ - Update essence editor view [#16](https://github.com/AlchemyCMS/alchemy-richmedia-essences/pull/16) ([jrieger](https://github.com/jrieger))
12
+ - Avoid empty width/height attributes [#14](https://github.com/AlchemyCMS/alchemy-richmedia-essences/pull/14) ([jrieger](https://github.com/jrieger))
13
+ - `source` is a void element [#13](https://github.com/AlchemyCMS/alchemy-richmedia-essences/pull/13) ([jrieger](https://github.com/jrieger))
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010-2014, magic labs GmbH, Hamburg Germany
1
+ Copyright (c) 2010-2015, magic labs GmbH, Hamburg Germany
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without modification,
data/README.md CHANGED
@@ -1,44 +1,63 @@
1
- # Alchemy CMS Richmedia Essences
1
+ # AlchemyCMS HTML5 Richmedia Essences
2
2
 
3
- Adds EssenceAudio, EssenceFlash and EssenceVideo essences to your Alchemy CMS powered site.
3
+ Adds HTML5 `EssenceAudio` and `EssenceVideo` essences to your AlchemyCMS powered website.
4
4
 
5
- This version is compatible with Alchemy version 3.0 and above only.
5
+ ## Alchemy version
6
6
 
7
- For Alchemy v2.7.0 please use version 0.2.0.
7
+ This version is compatible with Alchemy v4.0 and above only.
8
8
 
9
- For Alchemy v2.6.0 and below please use version 0.1.0.
9
+ - For Alchemy v3.x please use version 1.0.0.
10
+ - For Alchemy v2.7.0 please use version 0.2.0.
11
+ - For Alchemy v2.6.0 and below please use version 0.1.0.
12
+
13
+ Also this plugin does not contain a `EssenceFlash` any more. If you need `EssenceFlash`, you need to use version 0.3-stable.
10
14
 
11
15
  ## Installation
12
16
 
13
- **Make sure you have Alchemy CMS installed.**
17
+ **Make sure you have AlchemyCMS installed.**
14
18
 
15
19
  Add this line to your application's Gemfile:
16
20
 
17
- gem 'alchemy-richmedia-essences'
21
+ ~~~ruby
22
+ gem 'alchemy-richmedia-essences', github: 'AlchemyCMS/alchemy-richmedia-essences'
23
+ ~~~
18
24
 
19
25
  And then execute:
20
26
 
21
- $ bundle
27
+ ~~~shell
28
+ $ bundle install
29
+ ~~~
22
30
 
23
- Or install it yourself as:
31
+ ## Usage
24
32
 
25
- $ gem install alchemy-richmedia-essences
33
+ 1) After installing or updating, prepare your database with:
26
34
 
27
- ## Usage
35
+ ~~~shell
36
+ $ rake alchemy_richmedia_essences:install:migrations db:migrate
37
+ ~~~
38
+
39
+ 2) In your `elements.yml` add one of these essences to your element of choice.
40
+
41
+ ~~~yaml
42
+ # elements.yml
43
+ - name: video
44
+ contents:
45
+ - name: video
46
+ type: EssenceVideo
28
47
 
29
- 1. After installing, prepare your database with:
48
+ - name: audio
49
+ contents:
50
+ - name: audio
51
+ type: EssenceAudio
52
+ ~~~
30
53
 
31
- $ rake alchemy_richmedia_essences:install:migrations db:migrate
54
+ ## Player customization
32
55
 
33
- 2. In your `elements.yml` add one of the shiny new essences to your element of choice.
56
+ This plugin just provides HTML5 `<video>` and `<audio>` tags and no styling at all. The players will appear as the browser vendors provide.
34
57
 
35
- # elements.yml
36
- - name: video
37
- contents:
38
- - name: file
39
- type: EssenceVideo
58
+ If you want a cross browser and customizable player with Flash® fallback, then we strongly recommend something like http://mediaelementjs.com/
40
59
 
41
- That's it!
60
+ There is even a gem https://github.com/tobsch/mediaelement_rails that provides everthing for the Rails' asset pipeline.
42
61
 
43
62
  ## Contributing
44
63
 
@@ -7,14 +7,14 @@ Gem::Specification.new do |gem|
7
7
  gem.name = "alchemy-richmedia-essences"
8
8
  gem.version = Alchemy::Richmedia::Essences::VERSION
9
9
  gem.authors = ["Thomas von Deyen"]
10
- gem.email = ["tvdeyen@gmail.com"]
11
- gem.description = %q{EssenceAudio, EssenceFlash and EssenceVideo for Alchemy CMS 3.0}
12
- gem.summary = %q{Adds EssenceAudio, EssenceFlash and EssenceVideo essences to your Alchemy CMS powered site.}
10
+ gem.email = ["thomas@vondeyen.com"]
11
+ gem.description = %q{EssenceAudio and EssenceVideo for AlchemyCMS 4.0}
12
+ gem.summary = %q{Adds EssenceAudio and EssenceVideo essences to your AlchemyCMS powered website.}
13
13
  gem.homepage = "http://alchemy-cms.com"
14
14
  gem.license = 'BSD New'
15
15
 
16
16
  gem.files = `git ls-files`.split($/)
17
17
  gem.require_paths = ["lib"]
18
18
 
19
- gem.add_runtime_dependency 'alchemy_cms', ['>= 3.0.0.rc4']
19
+ gem.add_runtime_dependency 'alchemy_cms', ['>= 4.0.0.rc1']
20
20
  end
@@ -1,7 +1,7 @@
1
1
  module Alchemy
2
2
  class Admin::EssenceAudiosController < Alchemy::Admin::BaseController
3
3
  authorize_resource class: Alchemy::EssenceAudio
4
- before_filter :load_essence
4
+ before_action :load_essence
5
5
 
6
6
  def update
7
7
  @essence_audio.update(essence_audio_params)
@@ -15,10 +15,10 @@ module Alchemy
15
15
 
16
16
  def essence_audio_params
17
17
  params.require(:essence_audio).permit(
18
- :width,
19
- :height,
20
- :show_eq,
21
- :show_navigation,
18
+ :autoplay,
19
+ :controls,
20
+ :loop,
21
+ :muted,
22
22
  :attachment_id
23
23
  )
24
24
  end
@@ -1,7 +1,7 @@
1
1
  module Alchemy
2
2
  class Admin::EssenceVideosController < Alchemy::Admin::BaseController
3
3
  authorize_resource class: Alchemy::EssenceVideo
4
- before_filter :load_essence
4
+ before_action :load_essence
5
5
 
6
6
  def update
7
7
  @essence_video.update(essence_video_params)
@@ -17,9 +17,11 @@ module Alchemy
17
17
  params.require(:essence_video).permit(
18
18
  :width,
19
19
  :height,
20
- :allow_fullscreen,
21
- :auto_play,
22
- :show_navigation,
20
+ :autoplay,
21
+ :controls,
22
+ :loop,
23
+ :muted,
24
+ :preload,
23
25
  :attachment_id
24
26
  )
25
27
  end
@@ -3,6 +3,6 @@ module Alchemy
3
3
  acts_as_essence ingredient_column: 'attachment',
4
4
  preview_text_method: 'name'
5
5
 
6
- belongs_to :attachment
6
+ belongs_to :attachment, optional: true
7
7
  end
8
8
  end
@@ -3,6 +3,6 @@ module Alchemy
3
3
  acts_as_essence ingredient_column: 'attachment',
4
4
  preview_text_method: 'name'
5
5
 
6
- belongs_to :attachment
6
+ belongs_to :attachment, optional: true
7
7
  end
8
8
  end
@@ -1,7 +1,7 @@
1
1
  <%= alchemy_form_for [:admin, @essence_audio] do |f| %>
2
- <%= f.input :width %>
3
- <%= f.input :height %>
4
- <%= f.input :show_eq %>
5
- <%= f.input :show_navigation %>
6
- <%= f.submit _t(:save) %>
2
+ <%= f.input :autoplay %>
3
+ <%= f.input :controls %>
4
+ <%= f.input :loop %>
5
+ <%= f.input :muted %>
6
+ <%= f.submit Alchemy.t(:save) %>
7
7
  <% end %>
@@ -0,0 +1,9 @@
1
+ $('#<%= @content.dom_id %>').replaceWith('<%= j(
2
+ render "alchemy/essences/#{@content.essence_partial_name}_editor",
3
+ formats: [:html],
4
+ content: @content,
5
+ options: @options
6
+ ) %>');
7
+ Alchemy.closeCurrentDialog();
8
+ Alchemy.setElementDirty($('#element_<%= @content.element.id %>'));
9
+ Alchemy.watchForDialogs($('#<%= @content.dom_id %>'));
@@ -1,8 +1,11 @@
1
1
  <%= alchemy_form_for [:admin, @essence_video] do |f| %>
2
2
  <%= f.input :width %>
3
3
  <%= f.input :height %>
4
- <%= f.input :allow_fullscreen %>
5
- <%= f.input :auto_play %>
6
- <%= f.input :show_navigation %>
7
- <%= f.submit _t(:save) %>
4
+ <%= f.input :autoplay %>
5
+ <%= f.input :controls %>
6
+ <%= f.input :loop %>
7
+ <%= f.input :muted %>
8
+ <%= f.input :preload, collection: %w(auto none metadata),
9
+ include_blank: false, input_html: {class: 'alchemy_selectbox'} %>
10
+ <%= f.submit Alchemy.t(:save) %>
8
11
  <% end %>
@@ -1,6 +1,6 @@
1
1
  <%= render(
2
- "alchemy/essences/richmedia_essence_editor",
3
- :options => options,
4
- :content => content,
5
- :controller => 'essence_audios'
2
+ 'alchemy/essences/richmedia_essence_editor',
3
+ options: local_assigns.fetch(:options, {}),
4
+ content: local_assigns[:content] || local_assigns[:essence_audio_editor],
5
+ controller: 'essence_audios'
6
6
  ) %>
@@ -1,33 +1,15 @@
1
- <%- unless content.essence.attachment.nil? -%>
2
- <%- unless options[:player_cover_image].blank? -%>
3
- <%- i_height = options[:player_cover_image].image_height.to_f -%>
4
- <%- i_width = options[:player_cover_image].image_width.to_f -%>
5
- <%- ratio = i_height / i_width -%>
6
- <%- width = (options[:player_cover_image_width] rescue 320) -%>
7
- <%- height = width * ratio -%>
8
- <%- else -%>
9
- <%- width = content.essence.width.blank? ? (options[:player_size].split('x')[0] rescue 320) : content.essence.width -%>
10
- <%- height = content.essence.height.blank? ? (options[:player_size].split('x')[1] rescue 20) : content.essence.height -%>
11
- <%- end -%>
12
- <div id="alchemy_audio_player_<%= content.id %>">
13
- To watch this video, you need the latest <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank">Flash-Player</a> and active javascript in your browser.
14
- </div>
15
- <script type="text/javascript" charset="utf-8">
16
- //<!--[CDATA[
17
- var alchemy_audio_player_<%= content.id %> = new SWFObject("/mediaplayer.swf", "mediaplayer", <%= width %>, <%= height %>, "8");
18
- alchemy_audio_player_<%= content.id %>.addVariable("width", <%= width %>);
19
- alchemy_audio_player_<%= content.id %>.addVariable("height", <%= height %>);
20
- alchemy_audio_player_<%= content.id %>.addVariable("backcolor", '<%= options[:player_backcolor] || "0xFFFFFF" %>');
21
- alchemy_audio_player_<%= content.id %>.addVariable("frontcolor", '<%= options[:player_frontcolor] || "0x000000" %>');
22
- alchemy_audio_player_<%= content.id %>.addVariable("lightcolor", '<%= options[:player_lightcolor] || "0xEDEDED" %>');
23
- alchemy_audio_player_<%= content.id %>.addVariable("screencolor", '<%= options[:player_screencolor] || "0x000000" %>');
24
- alchemy_audio_player_<%= content.id %>.addVariable("showeq", '<%= content.essence.show_eq ? "true" : "false" %>');
25
- alchemy_audio_player_<%= content.id %>.addVariable("shownavigation", '<%= content.essence.show_navigation ? "true" : "false" %>');
26
- alchemy_audio_player_<%= content.id %>.addVariable("file", '<%= content.essence.attachment.public_filename %>');
27
- <%- unless options[:player_cover_image].blank? -%>
28
- alchemy_audio_player_<%= content.id %>.addVariable("image", '<%= "/" + options[:player_cover_image].file_name %>');
29
- <%- end -%>
30
- alchemy_audio_player_<%= content.id %>.write("alchemy_audio_player_<%= content.id %>");
31
- //]]-->
32
- </script>
1
+ <% content = local_assigns[:content] || local_assigns[:essence_audio_view] %>
2
+ <%- if content.ingredient -%>
3
+ <%= content_tag :audio,
4
+ controls: content.essence.controls,
5
+ autoplay: content.essence.autoplay,
6
+ loop: content.essence.loop,
7
+ muted: content.essence.muted do %>
8
+ <%= tag :source,
9
+ src: alchemy.show_attachment_path(
10
+ content.ingredient,
11
+ format: content.ingredient.suffix
12
+ ),
13
+ type: content.ingredient.file_mime_type %>
14
+ <% end %>
33
15
  <%- end -%>
@@ -1,6 +1,6 @@
1
1
  <%= render(
2
- "alchemy/essences/richmedia_essence_editor",
3
- :options => options,
4
- :content => content,
5
- :controller => 'essence_videos'
2
+ 'alchemy/essences/richmedia_essence_editor',
3
+ options: local_assigns.fetch(:options, {}),
4
+ content: local_assigns[:content] || local_assigns[:essence_video_editor],
5
+ controller: 'essence_videos'
6
6
  ) %>
@@ -1,35 +1,18 @@
1
- <%- unless content.essence.attachment.nil? -%>
2
-
3
- <%- width = content.essence.width.blank? ? (options[:player_size].split('x')[0] rescue 480) : content.essence.width -%>
4
- <%- height = content.essence.height.blank? ? (options[:player_size].split('x')[1] rescue 320) : content.essence.height -%>
5
-
6
- <a href="<%= alchemy.show_attachment_path(content.essence.attachment) %>"
7
- id="player_<%= content.id %>"
8
- style="width: <%= width %>px; height: <%= height %>px; display: block">
9
- </a>
10
- <script type="text/javascript" charset="utf-8">
11
- flowplayer("player_<%= content.id %>",
12
- {
13
- src: "/flowplayer-3.2.5.swf",
14
- allowfullscreen: <%= content.essence.allow_fullscreen %>
15
- },
16
- {
17
- clip: {
18
- autoBuffering: true,
19
- autoPlay: false,
20
- scaling: 'fit'
21
- },
22
- plugins: {
23
- controls:
24
- <%- if content.essence.show_navigation -%>
25
- {
26
- fullscreen: <%= content.essence.allow_fullscreen %>
27
- }
28
- <%- else -%>
29
- null
30
- <%- end -%>
31
- }
32
- }
33
- );
34
- </script>
1
+ <% content = local_assigns[:content] || local_assigns[:essence_video_view] %>
2
+ <%- if content.ingredient -%>
3
+ <%= content_tag :video,
4
+ controls: content.essence.controls,
5
+ autoplay: content.essence.autoplay,
6
+ loop: content.essence.loop,
7
+ muted: content.essence.muted,
8
+ preload: content.essence.preload.presence,
9
+ width: content.essence.width.presence,
10
+ height: content.essence.height.presence do %>
11
+ <%= tag :source,
12
+ src: alchemy.show_attachment_path(
13
+ content.ingredient,
14
+ format: content.ingredient.suffix
15
+ ),
16
+ type: content.ingredient.file_mime_type %>
17
+ <% end %>
35
18
  <%- end -%>
@@ -1,66 +1,48 @@
1
- <div class="content_editor essence_file" id="<%= content.dom_id %>">
2
- <label style="display: inline">
3
- <%= render_content_name(content) %>
4
- <%= delete_content_link(content) %>
5
- </label>
1
+ <% dialog_link = link_to_dialog render_icon(:file, style: 'regular'),
2
+ alchemy.admin_attachments_path(
3
+ content_id: content.id,
4
+ only: content.settings_value(:only, local_assigns.fetch(:options, {})),
5
+ except: content.settings_value(:except, local_assigns.fetch(:options, {})),
6
+ options: local_assigns.fetch(:options, {})
7
+ ),
8
+ {
9
+ title: Alchemy.t(:assign_file),
10
+ size: '780x585',
11
+ padding: false
12
+ },
13
+ class: 'file_icon',
14
+ title: Alchemy.t(:assign_file) %>
15
+
16
+ <div class="content_editor essence_file" id="<%= content.dom_id %>" data-content-id="<%= content.id %>">
17
+ <%= content_label(content) %>
6
18
  <div class="file" id="file_<%= content.id %>">
7
- <div class="file_icon">
8
- <% if content.ingredient.nil? %>
9
- <%= link_to_dialog '',
10
- alchemy.admin_attachments_path(
11
- content_id: content.id,
12
- only: options[:file_assign_show_only],
13
- except: options[:file_assign_do_not_show],
14
- options: options.to_json
15
- ),
16
- {
17
- title: _t(:assign_file),
18
- size: '780x585',
19
- padding: false
20
- },
21
- class: 'assign_file',
22
- title: _t(:assign_file)
23
- %>
19
+ <% if content.ingredient %>
20
+ <div class="file_icon">
21
+ <%= render_icon(content.ingredient.icon_css_class) %>
22
+ </div>
24
23
  <% else %>
25
- <%= render_icon(content.ingredient.icon_css_class) %>
24
+ <%= dialog_link %>
26
25
  <% end %>
27
- </div>
28
26
  <div class="file_name">
29
- <%= content.ingredient.name rescue ("&#x2190;" + _t(:assign_file_from_archive)).html_safe %>
27
+ <%= content.ingredient.try(:name) ||
28
+ ("&#x2190;" + Alchemy.t(:assign_file_from_archive)).html_safe %>
30
29
  </div>
31
- <% unless content.ingredient.nil? %>
32
- <%= hidden_field_tag content.form_field_name(:attachment_id), content.ingredient.id %>
33
30
  <div class="essence_file_tools">
34
- <%= link_to_dialog '',
35
- alchemy.admin_attachments_path(
36
- content_id: content.id,
37
- only: options[:file_assign_show_only],
38
- except: options[:file_assign_do_not_show],
39
- options: options.to_json
40
- ),
41
- {
42
- title: _t(:assign_file),
43
- size: '780x585',
44
- padding: false
45
- },
46
- class: 'assign_file',
47
- title: _t(:assign_file)
48
- %>
49
- <%= link_to_dialog '',
31
+ <%= dialog_link %>
32
+ <%= link_to_dialog render_icon(:edit),
50
33
  url_for(
51
34
  controller: controller,
52
35
  action: 'edit',
53
- options: options.to_json,
54
- id: content
36
+ options: local_assigns[:options],
37
+ id: content.essence.id
55
38
  ),
56
39
  {
57
- title: _t(:edit_file_properties),
58
- size: '400x165'
40
+ title: Alchemy.t(:edit_file_properties),
41
+ size: '400x215'
59
42
  },
60
- class: 'edit_file',
61
- title: _t(:edit_file_properties)
62
- %>
43
+ title: Alchemy.t(:edit_file_properties) %>
63
44
  </div>
64
- <% end %>
45
+ <%= hidden_field_tag content.form_field_name(:attachment_id),
46
+ content.ingredient && content.ingredient.id %>
65
47
  </div>
66
48
  </div>
@@ -1,7 +1,6 @@
1
1
  Alchemy::Engine.routes.draw do
2
2
  namespace :admin do
3
3
  resources :essence_audios
4
- resources :essence_flashes
5
4
  resources :essence_videos
6
5
  end
7
6
  end
@@ -1,4 +1,4 @@
1
- class CreateAlchemyRichmediaEssences < ActiveRecord::Migration
1
+ class CreateAlchemyRichmediaEssences < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  return if table_exists?(:alchemy_essence_audios)
4
4
 
@@ -0,0 +1,25 @@
1
+ class AlchemyEssenceVideoHtml5Update < ActiveRecord::Migration[4.2]
2
+ def up
3
+ change_table :alchemy_essence_videos do |t|
4
+ t.change :width, :string
5
+ t.change :height, :string
6
+ t.rename :auto_play, :autoplay
7
+ t.rename :show_navigation, :controls
8
+ end
9
+
10
+ add_column :alchemy_essence_videos, :loop, :boolean, default: false
11
+ add_column :alchemy_essence_videos, :muted, :boolean, default: false
12
+ end
13
+
14
+ def down
15
+ change_table :alchemy_essence_videos do |t|
16
+ t.change :width, :integer
17
+ t.change :height, :integer
18
+ t.rename :autoplay, :auto_play
19
+ t.rename :controls, :show_navigation
20
+ end
21
+
22
+ remove_column :alchemy_essence_videos, :loop, :boolean
23
+ remove_column :alchemy_essence_videos, :muted, :boolean
24
+ end
25
+ end
@@ -0,0 +1,9 @@
1
+ class RemoveAlchemyEssenceFlashes < ActiveRecord::Migration[4.2]
2
+ def up
3
+ drop_table :alchemy_essence_flashes
4
+ end
5
+
6
+ def down
7
+ raise ActiveRecord::IrreversibleMigration
8
+ end
9
+ end
@@ -0,0 +1,17 @@
1
+ class AlchemyEssenceAudioHtml5Update < ActiveRecord::Migration[4.2]
2
+ def up
3
+ change_table :alchemy_essence_audios do |t|
4
+ t.boolean :autoplay, default: false
5
+ t.boolean :loop, default: false
6
+ t.boolean :muted, default: false
7
+ t.rename :show_navigation, :controls
8
+ t.remove :width
9
+ t.remove :height
10
+ t.remove :show_eq
11
+ end
12
+ end
13
+
14
+ def down
15
+ raise ActiveRecord::IrreversibleMigration
16
+ end
17
+ end
@@ -0,0 +1,5 @@
1
+ class AddPreloadToAlchemyEssenceVideos < ActiveRecord::Migration[4.2]
2
+ def change
3
+ add_column :alchemy_essence_videos, :preload, :string
4
+ end
5
+ end
@@ -8,7 +8,6 @@ module Alchemy
8
8
  return if user.nil?
9
9
  if user.has_role?(:author) || user.has_role?(:editor) || user.has_role?(:admin)
10
10
  can :manage, Alchemy::EssenceAudio
11
- can :manage, Alchemy::EssenceFlash
12
11
  can :manage, Alchemy::EssenceVideo
13
12
  end
14
13
  end
@@ -1,7 +1,7 @@
1
1
  module Alchemy
2
2
  module Richmedia
3
3
  module Essences
4
- VERSION = "0.3.0"
4
+ VERSION = "2.3.0"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy-richmedia-essences
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-13 00:00:00.000000000 Z
11
+ date: 2020-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: alchemy_cms
@@ -16,45 +16,46 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.0.rc4
19
+ version: 4.0.0.rc1
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.0.0.rc4
27
- description: EssenceAudio, EssenceFlash and EssenceVideo for Alchemy CMS 3.0
26
+ version: 4.0.0.rc1
27
+ description: EssenceAudio and EssenceVideo for AlchemyCMS 4.0
28
28
  email:
29
- - tvdeyen@gmail.com
29
+ - thomas@vondeyen.com
30
30
  executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
34
  - ".gitignore"
35
+ - CHANGELOG.md
35
36
  - Gemfile
36
37
  - LICENSE.txt
37
38
  - README.md
38
39
  - Rakefile
39
40
  - alchemy-richmedia-essences.gemspec
40
41
  - app/controllers/alchemy/admin/essence_audios_controller.rb
41
- - app/controllers/alchemy/admin/essence_flashes_controller.rb
42
42
  - app/controllers/alchemy/admin/essence_videos_controller.rb
43
43
  - app/models/alchemy/essence_audio.rb
44
- - app/models/alchemy/essence_flash.rb
45
44
  - app/models/alchemy/essence_video.rb
46
45
  - app/views/alchemy/admin/essence_audios/edit.html.erb
47
- - app/views/alchemy/admin/essence_flashes/edit.html.erb
46
+ - app/views/alchemy/admin/essence_files/assign.js.erb
48
47
  - app/views/alchemy/admin/essence_videos/edit.html.erb
49
48
  - app/views/alchemy/essences/_essence_audio_editor.html.erb
50
49
  - app/views/alchemy/essences/_essence_audio_view.html.erb
51
- - app/views/alchemy/essences/_essence_flash_editor.html.erb
52
- - app/views/alchemy/essences/_essence_flash_view.html.erb
53
50
  - app/views/alchemy/essences/_essence_video_editor.html.erb
54
51
  - app/views/alchemy/essences/_essence_video_view.html.erb
55
52
  - app/views/alchemy/essences/_richmedia_essence_editor.html.erb
56
53
  - config/routes.rb
57
54
  - db/migrate/20121113171023_create_alchemy_richmedia_essences.rb
55
+ - db/migrate/20140814212620_alchemy_essence_video_html5_update.rb
56
+ - db/migrate/20150728153847_remove_alchemy_essence_flashes.rb
57
+ - db/migrate/20150728172823_alchemy_essence_audio_html5_update.rb
58
+ - db/migrate/20151005130801_add_preload_to_alchemy_essence_videos.rb
58
59
  - lib/alchemy-richmedia-essences.rb
59
60
  - lib/alchemy-richmedia-essences/ability.rb
60
61
  - lib/alchemy-richmedia-essences/engine.rb
@@ -63,7 +64,7 @@ homepage: http://alchemy-cms.com
63
64
  licenses:
64
65
  - BSD New
65
66
  metadata: {}
66
- post_install_message:
67
+ post_install_message:
67
68
  rdoc_options: []
68
69
  require_paths:
69
70
  - lib
@@ -78,11 +79,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
79
  - !ruby/object:Gem::Version
79
80
  version: '0'
80
81
  requirements: []
81
- rubyforge_project:
82
- rubygems_version: 2.2.2
83
- signing_key:
82
+ rubygems_version: 3.0.3
83
+ signing_key:
84
84
  specification_version: 4
85
- summary: Adds EssenceAudio, EssenceFlash and EssenceVideo essences to your Alchemy
86
- CMS powered site.
85
+ summary: Adds EssenceAudio and EssenceVideo essences to your AlchemyCMS powered website.
87
86
  test_files: []
88
- has_rdoc:
@@ -1,25 +0,0 @@
1
- module Alchemy
2
- class Admin::EssenceFlashesController < Alchemy::Admin::BaseController
3
- authorize_resource class: Alchemy::EssenceFlash
4
- before_filter :load_essence
5
-
6
- def update
7
- @essence_flash.update(essence_flash_params)
8
- end
9
-
10
- private
11
-
12
- def load_essence
13
- @essence_flash = EssenceFlash.find(params[:id])
14
- end
15
-
16
- def essence_flash_params
17
- params.require(:essence_flash).permit(
18
- :width,
19
- :height,
20
- :player_version,
21
- :attachment_id
22
- )
23
- end
24
- end
25
- end
@@ -1,8 +0,0 @@
1
- module Alchemy
2
- class EssenceFlash < ActiveRecord::Base
3
- acts_as_essence ingredient_column: 'attachment',
4
- preview_text_method: 'name'
5
-
6
- belongs_to :attachment
7
- end
8
- end
@@ -1,6 +0,0 @@
1
- <%= alchemy_form_for [:admin, @essence_flash] do |f| %>
2
- <%= f.input :width %>
3
- <%= f.input :height %>
4
- <%= f.input :player_version %>
5
- <%= f.submit _t(:save) %>
6
- <% end %>
@@ -1,6 +0,0 @@
1
- <%= render(
2
- "alchemy/essences/richmedia_essence_editor",
3
- :options => options,
4
- :content => content,
5
- :controller => 'essence_flashes'
6
- ) %>
@@ -1,26 +0,0 @@
1
- <%- unless content.essence.attachment.nil? -%>
2
- <%- width = content.essence.width.blank? ? (options[:flash_movie_size].split('x')[0] rescue 320) : content.essence.width -%>
3
- <%- height = content.essence.height.blank? ? (options[:flash_movie_size].split('x')[1] rescue 200) : content.essence.height -%>
4
- <%- player_version = content.essence.player_version.blank? ? "8" : content.essence.player_version -%>
5
- <div class="flash_film">
6
- <div id="swf_container_<%= content.id %>">
7
- Sie brauchen den neusten <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank">Flash-Player</a> und Sie müssen JavaScript aktivieren.
8
- </div>
9
- <script type="text/javascript" charset="utf-8">
10
- var flashvars = {};
11
- var params = {};
12
- var attributes = {};
13
- swfobject.embedSWF(
14
- "<%= content.essence.attachment.public_filename %>",
15
- "swf_container_<%= content.id %>",
16
- '<%= width %>',
17
- '<%= height %>',
18
- '<%= player_version %>',
19
- false,
20
- flashvars,
21
- params,
22
- attributes
23
- );
24
- </script>
25
- </div>
26
- <%- end -%>