refinerycms-videojs 0.5.5.1 → 0.6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/app/assets/javascripts/refinery/admin/wymeditor_monkeypatch.js.erb +27 -0
- data/app/assets/stylesheets/refinery/admin/video.css +60 -56
- data/app/controllers/refinery/videos/admin/videos_controller.rb +10 -2
- data/app/models/refinery/videos/video.rb +7 -12
- data/app/models/refinery/videos/video_file.rb +10 -14
- data/app/views/refinery/videos/admin/videos/_file_fields.html.erb +8 -9
- data/app/views/refinery/videos/admin/videos/_new_file_field.html.erb +2 -2
- data/app/views/refinery/videos/admin/videos/_preview_form.html.erb +1 -1
- data/app/views/refinery/videos/admin/videos/_video.html.erb +6 -4
- data/app/views/refinery/videos/admin/videos/append_to_wym.js.erb +13 -2
- data/config/initializers/refinery/core.rb +1 -5
- data/config/initializers/refinery/wymeditor.rb +5 -0
- data/config/locales/en.yml +4 -2
- data/config/locales/es.yml +79 -0
- data/config/locales/pt-BR.yml +78 -0
- data/config/locales/ru.yml +2 -2
- data/config/locales/sk.yml +3 -2
- data/config/locales/zh-CN.yml +79 -0
- data/config/routes.rb +2 -2
- data/db/migrate/1_create_videos_videos.rb +1 -1
- data/db/migrate/2_create_video_file.rb +2 -5
- data/lib/generators/refinery/videos/templates/assets/javascripts/videojs_loader.js +17 -7
- data/lib/generators/refinery/videos/templates/config/initializers/refinery/videos.rb.erb +2 -4
- data/lib/refinery/videos/configuration.rb +5 -5
- data/lib/refinery/videos/dialogs_controller.rb +14 -0
- data/lib/refinery/videos/dragonfly.rb +15 -28
- data/lib/refinery/videos/engine.rb +6 -6
- data/lib/refinery/videos.rb +0 -1
- metadata +121 -55
- data/app/assets/javascripts/refinery/admin/wymeditor_monkeypatch.js +0 -13
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8b996ff7fcb1ec1b299df986ec76b766514fcb9ff6ea6db55d25eda5f59cc4fe
|
4
|
+
data.tar.gz: bd3ddcebad019508716737dd332f6c5680ec095fab4bae861923d913eaef9dcf
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9d71b935cd38ee61a619a49c0e3b0805771572e9c7ea558163ac9f7101dec46881b5ec32e3e4492d5e59a8507cd76ba484c030a9dbd83cfc3d8455fc1ad563fa
|
7
|
+
data.tar.gz: eb4ae7f9a08dc151a9afbb6c3c62c9bdec529b6ddbad1903278854c51a19b036482a5b48963edb8fc2b80b1ed6e4be5a417049e2e7711afe9e0743f6733624dd
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<%#encoding: UTF-8 %>
|
2
|
+
wymeditor_boot_options.toolsItems.push({'name': 'AddVideo', 'title': 'Add_Video', 'css': 'wym_tools_add_video'});
|
3
|
+
|
4
|
+
<% locales = %w(en es sk pt-BR zh-CN)%>
|
5
|
+
<% locales.each do |locale| %>
|
6
|
+
if (WYMeditor.STRINGS['<%=locale%>']) WYMeditor.STRINGS['<%=locale%>']['Video'] = WYMeditor.STRINGS['<%=locale%>']['Add_Video'] = '<%= I18n.t(:add_video, :scope => :wym_tools, :locale => locale) %>';
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
onCloseDialog = function(){
|
10
|
+
$('iframe#dialog_iframe').attr('src', '');
|
11
|
+
};
|
12
|
+
|
13
|
+
WYMeditor.editor.prototype.exec_without_video = WYMeditor.editor.prototype.exec;
|
14
|
+
WYMeditor.editor.prototype.exec = function(cmd) {
|
15
|
+
if (cmd == 'AddVideo') {
|
16
|
+
this.dialog('Video');
|
17
|
+
} else this.exec_without_video(cmd);
|
18
|
+
}
|
19
|
+
|
20
|
+
<% Refinery::Wymeditor.whitelist_tags.each do |tag, attrs| %>
|
21
|
+
WYMeditor.XhtmlValidator._tags['<%=tag%>'] = WYMeditor.XhtmlValidator._tags['<%=tag%>'] || {};
|
22
|
+
<% attrs['attributes'].values.each do |attr| %>
|
23
|
+
WYMeditor.XhtmlValidator._tags['<%=tag%>'].attributes = WYMeditor.XhtmlValidator._tags['<%=tag%>'].attributes || {};
|
24
|
+
WYMeditor.XhtmlValidator._tags['<%=tag%>'].attributes[Object.keys(WYMeditor.XhtmlValidator._tags['<%=tag%>'].attributes).length + 1] = '<%=attr%>'
|
25
|
+
<% end %>
|
26
|
+
<% end %>
|
27
|
+
|
@@ -1,95 +1,99 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
.wym_skin_refinery .wym_section li.wym_tools_add_video a {
|
2
|
+
height: 24px;
|
3
|
+
background-image: url('/assets/refinery/admin/add_video_icon.png');
|
4
|
+
background-repeat: no-repeat;
|
5
|
+
padding-left: 24px;
|
4
6
|
}
|
5
7
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
padding-left: 20px;
|
8
|
+
label.inline {
|
9
|
+
display: inline-block;
|
10
|
+
margin-bottom: 10px;
|
11
|
+
margin-top: 0;
|
11
12
|
}
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
div.inline {
|
15
|
+
display: inline-block;
|
16
|
+
vertical-align: top;
|
17
|
+
margin: 1px 10px 0 0;
|
18
|
+
padding-left: 5px;
|
17
19
|
}
|
18
20
|
|
19
|
-
div.
|
20
|
-
|
21
|
-
vertical-align: top;
|
22
|
-
margin: 1px 10px 0 0;
|
23
|
-
padding-left: 5px
|
21
|
+
div.parent {
|
22
|
+
margin-bottom: 20px;
|
24
23
|
}
|
25
24
|
|
26
|
-
div.
|
27
|
-
|
25
|
+
div.video_container {
|
26
|
+
margin: 10px;
|
28
27
|
}
|
29
28
|
|
30
|
-
div.
|
31
|
-
|
29
|
+
div.tips {
|
30
|
+
margin: 10px 0 10px 0;
|
31
|
+
font-style: italic;
|
32
32
|
}
|
33
33
|
|
34
|
-
div.
|
35
|
-
|
36
|
-
|
34
|
+
div.use_file {
|
35
|
+
padding-bottom: 5px;
|
36
|
+
padding-top: 2px;
|
37
37
|
}
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
padding-top: 2px;
|
42
|
-
}
|
43
|
-
a.select_video_type{
|
44
|
-
font-size: 12px;
|
45
|
-
margin: 10px 10px 10px 0
|
38
|
+
a.select_video_type {
|
39
|
+
font-size: 12px;
|
40
|
+
margin: 10px 10px 10px 0;
|
46
41
|
}
|
47
42
|
|
48
|
-
a.select_video_type.selected{
|
49
|
-
|
43
|
+
a.select_video_type.selected {
|
44
|
+
font-weight: bold;
|
45
|
+
}
|
50
46
|
|
51
47
|
|
52
|
-
textarea.embed_tag{
|
53
|
-
|
48
|
+
textarea.embed_tag {
|
49
|
+
height: 100px;
|
54
50
|
}
|
55
51
|
|
56
|
-
span.short_info{
|
57
|
-
|
52
|
+
span.short_info {
|
53
|
+
color: grey;
|
58
54
|
}
|
59
55
|
|
60
|
-
div.add_remove_buttons{
|
61
|
-
|
56
|
+
div.add_remove_buttons {
|
57
|
+
margin-top: 10px;
|
62
58
|
}
|
63
59
|
|
64
|
-
div#dialog_list{
|
65
|
-
|
60
|
+
div#dialog_list {
|
61
|
+
width: 60%;
|
62
|
+
float: left;
|
63
|
+
min-height: 300px;
|
66
64
|
}
|
67
65
|
|
68
|
-
div#dialog_list li.selected{
|
69
|
-
|
66
|
+
div#dialog_list li.selected {
|
67
|
+
border: 4px solid #22A7F2;
|
70
68
|
}
|
71
69
|
|
72
|
-
div#dialog_preview{
|
73
|
-
|
70
|
+
div#dialog_preview {
|
71
|
+
width:35%;
|
72
|
+
float: right;
|
74
73
|
}
|
75
74
|
|
76
|
-
div#preview_form{
|
77
|
-
|
75
|
+
div#preview_form {
|
76
|
+
width:35%;
|
77
|
+
float: right;
|
78
78
|
}
|
79
79
|
|
80
|
-
div#preview_form div.dimensions{
|
81
|
-
|
80
|
+
div#preview_form div.dimensions {
|
81
|
+
width:50%;
|
82
|
+
float:left;
|
82
83
|
}
|
83
84
|
|
84
|
-
div#preview_form div.dimensions input{
|
85
|
-
|
85
|
+
div#preview_form div.dimensions input {
|
86
|
+
width:70%;
|
86
87
|
}
|
87
88
|
|
88
|
-
div#preview_form div.options{
|
89
|
-
|
89
|
+
div#preview_form div.options {
|
90
|
+
width:50%; float:right;
|
90
91
|
}
|
91
92
|
|
92
|
-
div#dialog_list #records{
|
93
|
-
|
93
|
+
div#dialog_list #records {
|
94
|
+
width: 100%;
|
94
95
|
}
|
95
96
|
|
97
|
+
#actions a {
|
98
|
+
position: relative; // fix capybara tests
|
99
|
+
}
|
@@ -9,7 +9,7 @@ module Refinery
|
|
9
9
|
:order => 'position ASC',
|
10
10
|
:sortable => true
|
11
11
|
|
12
|
-
|
12
|
+
before_action :set_embedded, :only => [:new, :create]
|
13
13
|
|
14
14
|
def show
|
15
15
|
@video = Video.find(params[:id])
|
@@ -28,7 +28,7 @@ module Refinery
|
|
28
28
|
|
29
29
|
def append_to_wym
|
30
30
|
@video = Video.find(params[:video_id])
|
31
|
-
|
31
|
+
video_params.each do |key, value|
|
32
32
|
@video.config[key.to_sym] = value
|
33
33
|
end
|
34
34
|
@html_for_wym = @video.to_html
|
@@ -53,6 +53,14 @@ module Refinery
|
|
53
53
|
@embedded = true if params['embedded']
|
54
54
|
end
|
55
55
|
|
56
|
+
def video_params
|
57
|
+
params.require(:video).permit(
|
58
|
+
:title, :poster_id, :position, :config, :embed_tag, :use_shared,
|
59
|
+
*Video::CONFIG_OPTIONS.keys,
|
60
|
+
:video_files_attributes => [
|
61
|
+
:file, :position, :use_external, :external_url
|
62
|
+
])
|
63
|
+
end
|
56
64
|
end
|
57
65
|
end
|
58
66
|
end
|
@@ -5,28 +5,24 @@ module Refinery
|
|
5
5
|
class Video < Refinery::Core::BaseModel
|
6
6
|
|
7
7
|
self.table_name = 'refinery_videos'
|
8
|
-
acts_as_indexed :
|
8
|
+
acts_as_indexed fields: [:title]
|
9
9
|
|
10
|
-
validates :title, :
|
10
|
+
validates :title, presence: true
|
11
11
|
validate :one_source
|
12
12
|
|
13
|
-
has_many :video_files, :
|
13
|
+
has_many :video_files, dependent: :destroy
|
14
14
|
accepts_nested_attributes_for :video_files
|
15
15
|
|
16
|
-
belongs_to :poster, :
|
16
|
+
belongs_to :poster, class_name: '::Refinery::Image', optional: true
|
17
17
|
accepts_nested_attributes_for :poster
|
18
18
|
|
19
19
|
################## Video config options
|
20
20
|
serialize :config, Hash
|
21
21
|
CONFIG_OPTIONS = {
|
22
|
-
|
23
|
-
|
22
|
+
autoplay: "false", width: "400", height: "300",
|
23
|
+
controls: "true", preload: "true", loop: "true"
|
24
24
|
}
|
25
25
|
|
26
|
-
attr_accessible :title, :poster_id, :video_files_attributes,
|
27
|
-
:position, :config, :embed_tag, :use_shared,
|
28
|
-
*CONFIG_OPTIONS.keys
|
29
|
-
|
30
26
|
# Create getters and setters
|
31
27
|
CONFIG_OPTIONS.keys.each do |option|
|
32
28
|
define_method option do
|
@@ -61,11 +57,10 @@ module Refinery
|
|
61
57
|
if file.use_external
|
62
58
|
sources << ["<source src='#{file.external_url}' type='#{file.file_mime_type}'/>"]
|
63
59
|
else
|
64
|
-
sources << ["<source src='#{file.
|
60
|
+
sources << ["<source src='#{file.remote_url}' type='#{file.mime_type}'/>"]
|
65
61
|
end if file.exist?
|
66
62
|
end
|
67
63
|
html = %Q{<video id="video_#{self.id}" class="video-js #{Refinery::Videos.skin_css_class}" width="#{config[:width]}" height="#{config[:height]}" data-setup=' {#{data_setup.join(',')}}'>#{sources.join}</video>}
|
68
|
-
|
69
64
|
html.html_safe
|
70
65
|
end
|
71
66
|
|
@@ -5,27 +5,25 @@ module Refinery
|
|
5
5
|
class VideoFile < Refinery::Core::BaseModel
|
6
6
|
|
7
7
|
self.table_name = 'refinery_video_files'
|
8
|
-
acts_as_indexed :
|
9
|
-
|
10
|
-
belongs_to :video
|
8
|
+
acts_as_indexed fields: [:file_name, :file_ext]
|
9
|
+
belongs_to :video, optional: true
|
11
10
|
|
12
11
|
MIME_TYPES = {'.mp4' => 'mp4', '.flv' => 'flv', '.webm' => 'webm', '.ogg' => 'ogg', '.ogv' => 'ogg'}
|
13
12
|
|
14
13
|
############################ Dragonfly
|
15
14
|
::Refinery::Videos::Dragonfly.setup!
|
16
|
-
|
17
|
-
|
18
|
-
delegate :ext, :size, :mime_type, :url,
|
19
|
-
:to => :file,
|
20
|
-
:allow_nil => true
|
15
|
+
dragonfly_accessor :file, app: :refinery_videos
|
21
16
|
|
17
|
+
delegate :ext, :size, :mime_type, :remote_url,
|
18
|
+
to: :file,
|
19
|
+
allow_nil: true
|
22
20
|
#######################################
|
23
21
|
|
24
22
|
########################### Validations
|
25
|
-
validates :file, :
|
26
|
-
validates :mime_type, :
|
27
|
-
:
|
28
|
-
validates :external_url, :
|
23
|
+
validates :file, presence: true, unless: :use_external?
|
24
|
+
validates :mime_type, inclusion: { in: Refinery::Videos.config[:whitelisted_mime_types],
|
25
|
+
message: "Wrong file mime_type" }, if: :file_name?
|
26
|
+
validates :external_url, presence: true, if: :use_external?
|
29
27
|
#######################################
|
30
28
|
|
31
29
|
before_save :set_mime_type
|
@@ -54,10 +52,8 @@ module Refinery
|
|
54
52
|
self.file_mime_type = 'video/mp4'
|
55
53
|
end
|
56
54
|
end
|
57
|
-
|
58
55
|
end
|
59
56
|
|
60
|
-
|
61
57
|
end
|
62
58
|
end
|
63
59
|
end
|
@@ -13,7 +13,7 @@
|
|
13
13
|
</label>
|
14
14
|
|
15
15
|
<div class='field'>
|
16
|
-
<div class="use_file" <%= "style='display: none;'" if v.object.use_external %>>
|
16
|
+
<div class="use_file" <%= raw "style='display: none;'" if v.object.use_external %>>
|
17
17
|
<% if v.object.file.present? %>
|
18
18
|
<% if v.object.url %>
|
19
19
|
<%= link_to(t('.download_current'), v.object.url,
|
@@ -28,7 +28,7 @@
|
|
28
28
|
<%= v.file_field :file, {}.merge(v.object.use_external ? {} : {:required => true}) %>
|
29
29
|
<% end %>
|
30
30
|
</div>
|
31
|
-
<div class="use_external" <%= "style='display: none;'" unless v.object.use_external %>>
|
31
|
+
<div class="use_external" <%= raw "style='display: none;'" unless v.object.use_external %>>
|
32
32
|
<span><%= t('.link_to_source') %></span>
|
33
33
|
<%= v.text_field :external_url, {}.merge(v.object.use_external ? {:required => true} : {}) %>
|
34
34
|
</div>
|
@@ -37,20 +37,19 @@
|
|
37
37
|
<% if f.object.video_files.count > 1 %>
|
38
38
|
<% if f.object.persisted? %>
|
39
39
|
<%= link_to(refinery.videos_admin_video_file_path(v.object),
|
40
|
-
:class => "cancel confirm-delete",
|
40
|
+
:class => "cancel confirm-delete fa fa-minus",
|
41
41
|
:title => t('.delete'),
|
42
42
|
:confirm => t('message', :scope => 'refinery.admin.delete', :title => 'file'),
|
43
43
|
:method => :delete) do %>
|
44
|
-
<%= refinery_icon_tag("delete.png") %>
|
45
44
|
<div class="inline"><%= t('.delete_source') %></div>
|
46
45
|
<% end %>
|
47
46
|
<% else %>
|
48
|
-
|
49
|
-
|
50
|
-
|
47
|
+
<a href='#' onclick="remove_field($(this)); return false" class="remove_field fa fa-minus" style='display: none'>
|
48
|
+
<div class="inline"><%= t('.delete_source') %></div>
|
49
|
+
</a>
|
51
50
|
<% end %>
|
52
51
|
<% end %>
|
53
|
-
<a href='#' onclick="add_field($(this)); return false" class="add_field" style='display: none'
|
52
|
+
<a href='#' onclick="add_field($(this)); return false" class="add_field fa fa-plus" style='display: none'>
|
54
53
|
<div class="inline"><%= t('.add_source') %></div>
|
55
54
|
</a>
|
56
55
|
</div>
|
@@ -91,4 +90,4 @@
|
|
91
90
|
}
|
92
91
|
|
93
92
|
|
94
|
-
</script>
|
93
|
+
</script>
|
@@ -19,10 +19,10 @@
|
|
19
19
|
</div>
|
20
20
|
</div>
|
21
21
|
<div class='add_remove_buttons'>
|
22
|
-
<a href='#' onclick="remove_field($(this)); return false" class="remove_field
|
22
|
+
<a href='#' onclick="remove_field($(this)); return false" class="remove_field fa fa-trash">
|
23
23
|
<div class="inline"><%= t('.delete_source') %></div>
|
24
24
|
</a>
|
25
|
-
<a href='#' onclick="add_field($(this)); return false" class="add_field
|
25
|
+
<a href='#' onclick="add_field($(this)); return false" class="add_field fa fa-plus">
|
26
26
|
<div class="inline"><%= t('.add_source') %></div>
|
27
27
|
</a>
|
28
28
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= render "videojs_dependencies" unless @embedded%>
|
2
|
-
<%= form_for @video, url
|
2
|
+
<%= form_for @video, :url => refinery.videos_admin_video_append_to_wym_path(@video.id), :remote => true, :method => :post do |f| %>
|
3
3
|
<div class='dimensions'>
|
4
4
|
<div class='field'>
|
5
5
|
<%= f.label t('.width') %>
|
@@ -8,13 +8,15 @@
|
|
8
8
|
</span>
|
9
9
|
<% unless action_name =~ /insert/ %>
|
10
10
|
<span class='actions'>
|
11
|
-
<%= link_to
|
11
|
+
<%= link_to '', refinery.videos_admin_video_path(video, :dialog => true),
|
12
|
+
:class => 'preview_icon',
|
12
13
|
:title => t('.view_live_html'),
|
13
14
|
:target => "_blank" %>
|
14
|
-
<%= link_to
|
15
|
+
<%= link_to '', refinery.edit_videos_admin_video_path(video),
|
16
|
+
:class => 'edit_icon',
|
15
17
|
:title => t('.edit') %>
|
16
|
-
<%= link_to
|
17
|
-
:class => "cancel confirm-delete",
|
18
|
+
<%= link_to '', refinery.videos_admin_video_path(video),
|
19
|
+
:class => "cancel confirm-delete delete_icon",
|
18
20
|
:title => t('.delete'),
|
19
21
|
:confirm => t('message', :scope => 'refinery.admin.delete', :title => video.title),
|
20
22
|
:method => :delete %>
|
@@ -1,4 +1,15 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
parent.$.fn.getIndex = function(){
|
2
|
+
var $p=$(this).parent().children();
|
3
|
+
return $p.index(this);
|
4
|
+
}
|
5
|
+
selectedPart = parent.$('#page_parts .ui-tabs-active').getIndex();
|
6
|
+
wym = parent.$.wymeditors(selectedPart);
|
7
|
+
selectedBlock = wym.selected();
|
8
|
+
if (selectedBlock !== null) {
|
9
|
+
$(selectedBlock).append('<%= escape_javascript(@html_for_wym) %>');
|
10
|
+
} else {
|
11
|
+
wym.html(wym.html() + '<%= escape_javascript(@html_for_wym) %>');
|
12
|
+
}
|
3
13
|
wym.update();
|
4
14
|
close_dialog();
|
15
|
+
wym.close_dialog();
|
@@ -1,11 +1,7 @@
|
|
1
1
|
Refinery::Core.configure do |config|
|
2
|
-
|
3
|
-
# Add extra tags to the wymeditor whitelist e.g. = {'tag' => {'attributes' => {'1' => 'href'}}} or just {'tag' => {}}
|
4
|
-
config.wymeditor_whitelist_tags = {'video' => {'attributes' => {'1' => 'poster', '2' => 'width', '3' => 'height', '4' => 'source', '5' => 'controls'} },
|
5
|
-
'source' => {'attributes' => {'1' => 'src', '2' => 'type'}}}
|
6
2
|
# Register extra javascript for backend
|
7
3
|
config.register_javascript "refinery/admin/wymeditor_monkeypatch.js"
|
8
4
|
|
9
5
|
#Register extra stylesheet for backend (optional options)
|
10
6
|
config.register_stylesheet "refinery/admin/video.css"
|
11
|
-
end
|
7
|
+
end
|
@@ -0,0 +1,5 @@
|
|
1
|
+
Refinery::Wymeditor.configure do |config|
|
2
|
+
# Add extra tags to the wymeditor whitelist e.g. = {'tag' => {'attributes' => {'1' => 'href'}}} or just {'tag' => {}}
|
3
|
+
config.whitelist_tags = {'video' => {'attributes' => {'1' => 'poster', '2' => 'width', '3' => 'height', '4' => 'source', '5' => 'controls'} },
|
4
|
+
'source' => {'attributes' => {'1' => 'src', '2' => 'type'}}}
|
5
|
+
end
|
data/config/locales/en.yml
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
en:
|
2
|
+
wym_tools:
|
3
|
+
add_video: Add Video
|
2
4
|
refinery:
|
3
5
|
admin:
|
4
6
|
dashboard:
|
@@ -19,7 +21,7 @@ en:
|
|
19
21
|
sorry_no_results: Sorry! There are no results found.
|
20
22
|
no_items_yet: There are no Videos yet. Click "Add New Video" to add your first video.
|
21
23
|
video:
|
22
|
-
view_live_html: View this video live
|
24
|
+
view_live_html: View this video live
|
23
25
|
edit: Edit this video
|
24
26
|
delete: Remove this video forever
|
25
27
|
file: File
|
@@ -73,4 +75,4 @@ en:
|
|
73
75
|
'refinery/videos/video':
|
74
76
|
file_name: File Name
|
75
77
|
file_size: File Size
|
76
|
-
file_ext: File Ext
|
78
|
+
file_ext: File Ext
|
@@ -0,0 +1,79 @@
|
|
1
|
+
es:
|
2
|
+
wym_tools:
|
3
|
+
add_video: Video
|
4
|
+
refinery:
|
5
|
+
admin:
|
6
|
+
dashboard:
|
7
|
+
additional_dashboard_menu_items:
|
8
|
+
create_new: Añadir nuevo video
|
9
|
+
plugins:
|
10
|
+
videos:
|
11
|
+
title: Videos
|
12
|
+
videos:
|
13
|
+
admin:
|
14
|
+
videos:
|
15
|
+
actions:
|
16
|
+
create_new: Añadir nuevo video
|
17
|
+
reorder: Reordenar Videos
|
18
|
+
reorder_done: Reordenación de videos completada
|
19
|
+
records:
|
20
|
+
title: Videos
|
21
|
+
sorry_no_results: No se han encontrado resultados.
|
22
|
+
no_items_yet: Aún no hay videos. Haga click en "Añadir Nuevo Video" para insertar el primero.
|
23
|
+
video:
|
24
|
+
view_live_html: Ver este video en directo
|
25
|
+
edit: Editar este video
|
26
|
+
delete: Eliminar este video para siempre
|
27
|
+
file: Archivo
|
28
|
+
link: Enlace
|
29
|
+
shared_source: Embebido
|
30
|
+
new:
|
31
|
+
use_files: Usar archivos
|
32
|
+
use_embedded_video: Usar video embebido
|
33
|
+
form:
|
34
|
+
title: Título
|
35
|
+
poster: Poster
|
36
|
+
width: Ancho
|
37
|
+
height: Alto
|
38
|
+
page: Seleccionar como video al cargar una página
|
39
|
+
file_fields:
|
40
|
+
files: Archivos
|
41
|
+
file_tip: Añadir archivos (o enlaces a los archivos) tipos 'mp4', 'webm', 'flv', 'ogg' para compatibilidad total con el navegador
|
42
|
+
use_file: Usar archivo
|
43
|
+
use_external_source: Usar archivo externo
|
44
|
+
add_file: Añadir archivo
|
45
|
+
add_source: Añadir fuente
|
46
|
+
delete_source: Borrar fuente
|
47
|
+
link_to_source: Enlace a la fuente
|
48
|
+
download_current: Usar video actual
|
49
|
+
or: o
|
50
|
+
replace: remplazar con este
|
51
|
+
maximum_file_size: "Tamaño máximo de archivo: %{bytes}"
|
52
|
+
new_file_field:
|
53
|
+
use_file: Usar archivo
|
54
|
+
use_external_source: Usar fuente externa
|
55
|
+
add_file: Añadir archivo
|
56
|
+
add_source: Añadir fuente
|
57
|
+
delete_source: Borrar fuente
|
58
|
+
embed_video_fields:
|
59
|
+
copy_embed_tag_here: Copiar HTML aquí
|
60
|
+
form_option_fields:
|
61
|
+
options: Opciones
|
62
|
+
autoplay: Auto-arranque
|
63
|
+
show_ontrols: Mostrar controles
|
64
|
+
preload_video: Precargar video
|
65
|
+
loop_video: Repetir video
|
66
|
+
insert:
|
67
|
+
insert: Insertar
|
68
|
+
preview_form:
|
69
|
+
width: Ancho
|
70
|
+
height: Alto
|
71
|
+
videos:
|
72
|
+
show:
|
73
|
+
other: Otros Videos
|
74
|
+
activerecord:
|
75
|
+
attributes:
|
76
|
+
'refinery/videos/video':
|
77
|
+
file_name: Nombre de archivo
|
78
|
+
file_size: Tamaño de archivo
|
79
|
+
file_ext: Extensión de archivo
|
@@ -0,0 +1,78 @@
|
|
1
|
+
pt-BR:
|
2
|
+
wym_tools:
|
3
|
+
add_video: Vídeo
|
4
|
+
refinery:
|
5
|
+
admin:
|
6
|
+
dashboard:
|
7
|
+
additional_dashboard_menu_items:
|
8
|
+
create_new: Adicionar novo vídeo
|
9
|
+
plugins:
|
10
|
+
videos:
|
11
|
+
title: Vídeos
|
12
|
+
videos:
|
13
|
+
admin:
|
14
|
+
videos:
|
15
|
+
actions:
|
16
|
+
create_new: Adicionar novo vídeo
|
17
|
+
reorder: Reordenar vídeos
|
18
|
+
reorder_done: Finalizar Reordenação
|
19
|
+
records:
|
20
|
+
title: Vídeos
|
21
|
+
sorry_no_results: Nenhum resultado encontrado.
|
22
|
+
no_items_yet: Não existem vídeos ainda. Clique em "Adicionar novo vídeo" para adicionar seu primeiro vídeo.
|
23
|
+
video:
|
24
|
+
view_live_html: Veja esse vídeo
|
25
|
+
edit: Editar esse vídeo
|
26
|
+
delete: Remover esse vídeo definitivamente
|
27
|
+
file: Arquivo
|
28
|
+
link: Link
|
29
|
+
shared_source: Embutido
|
30
|
+
new:
|
31
|
+
use_files: Usar arquivo
|
32
|
+
use_embedded_video: Usar vídeo embutido
|
33
|
+
form:
|
34
|
+
title: Título
|
35
|
+
poster: Poster
|
36
|
+
width: Largura
|
37
|
+
height: Altura
|
38
|
+
file_fields:
|
39
|
+
files: Arquivos
|
40
|
+
file_tip: Adicione arquivos (ou links para arquivos) 'mp4', 'webm', 'flv', 'ogg' para manter a compatibilidade com os navegadores
|
41
|
+
use_file: Usar arquivo
|
42
|
+
use_external_source: Usar fonte externa
|
43
|
+
add_file: Adicionar arquivo
|
44
|
+
add_source: Adicionar fonte
|
45
|
+
delete_source: Remover fonte
|
46
|
+
link_to_source: Link para fonte
|
47
|
+
download_current: Usar vídeo atual
|
48
|
+
or: ou
|
49
|
+
replace: substituir com esse
|
50
|
+
maximum_file_size: "Tamanho máximo do arquivo: %{bytes}"
|
51
|
+
new_file_field:
|
52
|
+
use_file: Usar arquivo
|
53
|
+
use_external_source: Usar fonte externa
|
54
|
+
add_file: Adicionar arquivo
|
55
|
+
add_source: Adicionar fonte
|
56
|
+
delete_source: Remover fonte
|
57
|
+
embed_video_fields:
|
58
|
+
copy_embed_tag_here: Copie o HTML aqui
|
59
|
+
form_option_fields:
|
60
|
+
options: Opções
|
61
|
+
autoplay: Iniciar automaticamente
|
62
|
+
show_ontrols: Mostrar controles
|
63
|
+
preload_video: Pre-carregar o vídeo
|
64
|
+
loop_video: Executar novamente após o final
|
65
|
+
insert:
|
66
|
+
insert: Inserir
|
67
|
+
preview_form:
|
68
|
+
width: Largura
|
69
|
+
height: Altura
|
70
|
+
videos:
|
71
|
+
show:
|
72
|
+
other: Outros vídeos
|
73
|
+
activerecord:
|
74
|
+
attributes:
|
75
|
+
'refinery/videos/video':
|
76
|
+
file_name: Nome do arquivo
|
77
|
+
file_size: Tamanho do arquivo
|
78
|
+
file_ext: Extensão do arquivo
|
data/config/locales/ru.yml
CHANGED
@@ -19,7 +19,7 @@ ru:
|
|
19
19
|
sorry_no_results: Извините, ничего не найдено.
|
20
20
|
no_items_yet: Видео отсутствуют. Нажмине "Добавить видео"
|
21
21
|
video:
|
22
|
-
view_live_html: Предварительный просмотр
|
22
|
+
view_live_html: Предварительный просмотр
|
23
23
|
edit: Редактировать видео
|
24
24
|
delete: Удалить видео
|
25
25
|
file: Файл
|
@@ -74,4 +74,4 @@ ru:
|
|
74
74
|
'refinery/videos/video':
|
75
75
|
file_name: Имя файла
|
76
76
|
file_size: Размер файла
|
77
|
-
file_ext: Расширение файла
|
77
|
+
file_ext: Расширение файла
|
data/config/locales/sk.yml
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
sk:
|
2
|
+
wym_tools:
|
3
|
+
add_video: Video
|
2
4
|
refinery:
|
3
5
|
admin:
|
4
6
|
dashboard:
|
@@ -19,7 +21,7 @@ sk:
|
|
19
21
|
sorry_no_results: Prepáč! Nenašli sa žiadne záznamy.
|
20
22
|
no_items_yet: Zatiaľ neboli pridané žiadne videá. Klikni na "Pridať nové video" pre pridanie prvého videa.
|
21
23
|
video:
|
22
|
-
view_live_html: Pozrieť toto video live
|
24
|
+
view_live_html: Pozrieť toto video live
|
23
25
|
edit: Upraviť toto video
|
24
26
|
delete: Permanentne odstrániť toto video
|
25
27
|
file: Súbor
|
@@ -74,4 +76,3 @@ sk:
|
|
74
76
|
file_name: Názov súboru
|
75
77
|
file_size: Veľkosť súboru
|
76
78
|
file_ext: Prípona súboru
|
77
|
-
|
@@ -0,0 +1,79 @@
|
|
1
|
+
zh-CN:
|
2
|
+
wym_tools:
|
3
|
+
add_video: 添加视频
|
4
|
+
refinery:
|
5
|
+
admin:
|
6
|
+
dashboard:
|
7
|
+
additional_dashboard_menu_items:
|
8
|
+
create_new: 添加新视频
|
9
|
+
plugins:
|
10
|
+
videos:
|
11
|
+
title: 视频
|
12
|
+
videos:
|
13
|
+
admin:
|
14
|
+
videos:
|
15
|
+
actions:
|
16
|
+
create_new: 添加新视频
|
17
|
+
reorder: 重新编排视频顺序
|
18
|
+
reorder_done: 完成编排
|
19
|
+
records:
|
20
|
+
title: 视频
|
21
|
+
sorry_no_results: 对不起, 没有找到结果
|
22
|
+
no_items_yet: 这里还没有视频. 点击 "添加新视频" 去添加您的第一张视频.
|
23
|
+
video:
|
24
|
+
view_live_html: 查看此视频
|
25
|
+
edit: 编辑此视频
|
26
|
+
delete: 永久删除此视频
|
27
|
+
file: 文件
|
28
|
+
link: 链接
|
29
|
+
shared_source: 内嵌
|
30
|
+
new:
|
31
|
+
use_files: 上传文件
|
32
|
+
use_embedded_video: 使用内嵌视频
|
33
|
+
form:
|
34
|
+
title: 标题
|
35
|
+
poster: 上传者
|
36
|
+
width: 宽度
|
37
|
+
height: 高度
|
38
|
+
file_fields:
|
39
|
+
files: 文件
|
40
|
+
file_tip: 为了适应浏览器兼容性, 请添加'mp4', 'webm', 'flv', 'ogg'格式的文件 (或文件链接).
|
41
|
+
use_file: 上传文件
|
42
|
+
use_external_source: 使用文件链接
|
43
|
+
add_file: 添加文件
|
44
|
+
add_source: 继续添加视频
|
45
|
+
delete_source: 删除视频
|
46
|
+
link_to_source: 文件链接
|
47
|
+
download_current: 使用当前视频
|
48
|
+
or: 或
|
49
|
+
replace: 替换当前视频
|
50
|
+
maximum_file_size: "最大的视频大小为 %{bytes}"
|
51
|
+
new_file_field:
|
52
|
+
use_file: 上传文件
|
53
|
+
use_external_source: 使用文件链接
|
54
|
+
add_file: 添加文件
|
55
|
+
add_source: 继续添加视频
|
56
|
+
delete_source: 删除视频
|
57
|
+
link_to_source: 文件链接
|
58
|
+
embed_video_fields:
|
59
|
+
copy_embed_tag_here: 拷贝 HTML 代码到这里
|
60
|
+
form_option_fields:
|
61
|
+
options: 选项
|
62
|
+
autoplay: 自动播放
|
63
|
+
show_ontrols: 显示控制器
|
64
|
+
preload_video: 预加载视频
|
65
|
+
loop_video: 循环播放视频
|
66
|
+
insert:
|
67
|
+
insert: 插入
|
68
|
+
preview_form:
|
69
|
+
width: 宽度
|
70
|
+
height: 高度
|
71
|
+
videos:
|
72
|
+
show:
|
73
|
+
other: 其他视频
|
74
|
+
activerecord:
|
75
|
+
attributes:
|
76
|
+
'refinery/videos/video':
|
77
|
+
file_name: 文件名
|
78
|
+
file_size: 文件大小
|
79
|
+
file_ext: 文件Ext
|
data/config/routes.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
Refinery::Core::Engine.routes.
|
2
|
-
match '/system/videos/*dragonfly', :to => Dragonfly[:
|
1
|
+
Refinery::Core::Engine.routes.prepend do
|
2
|
+
match '/system/videos/*dragonfly', :to => Dragonfly.app(:refinery_videos), via: [:get, :post]
|
3
3
|
|
4
4
|
# Frontend routes
|
5
5
|
namespace :videos do
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreateVideoFile < ActiveRecord::Migration
|
1
|
+
class CreateVideoFile < ActiveRecord::Migration[4.2]
|
2
2
|
|
3
3
|
def up
|
4
4
|
create_table "refinery_video_files", :force => true do |t|
|
@@ -13,13 +13,10 @@ class CreateVideoFile < ActiveRecord::Migration
|
|
13
13
|
t.string "external_url"
|
14
14
|
t.boolean "use_external"
|
15
15
|
end
|
16
|
-
|
17
16
|
end
|
18
17
|
|
19
18
|
def down
|
20
|
-
|
21
|
-
drop_table :refinery_videos
|
22
|
-
|
19
|
+
drop_table :refinery_video_files
|
23
20
|
end
|
24
21
|
|
25
22
|
end
|
@@ -1,7 +1,17 @@
|
|
1
|
-
window.onload = function ()
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
window.onload = function () {
|
2
|
+
var video = document.getElementsByTagName('video')[0];
|
3
|
+
|
4
|
+
if (!video) return;
|
5
|
+
|
6
|
+
var head = document.getElementsByTagName('head')[0];
|
7
|
+
var link = document.createElement('link');
|
8
|
+
var script = document.createElement('script');
|
9
|
+
|
10
|
+
link.rel = 'stylesheet';
|
11
|
+
link.type = 'text/css';
|
12
|
+
link.href = 'https://vjs.zencdn.net/7.6.6/video-js.css';
|
13
|
+
script.src = 'https://vjs.zencdn.net/7.6.6/video.js';
|
14
|
+
|
15
|
+
head.appendChild(link);
|
16
|
+
head.appendChild(script);
|
17
|
+
};
|
@@ -7,17 +7,15 @@ Refinery::Videos.configure do |config|
|
|
7
7
|
|
8
8
|
# Configure white-listed mime types for validation
|
9
9
|
#config.whitelisted_mime_types = <%= Refinery::Videos.whitelisted_mime_types %>
|
10
|
-
|
10
|
+
|
11
11
|
# Configure skin. Put css class name to activate skin. For YouTube like skin put tubecss and add css with images to assets path.
|
12
12
|
# config.skin_css_class = <%= Refinery::Videos.skin_css_class %>
|
13
13
|
|
14
14
|
# Configure Dragonfly
|
15
15
|
# This is where in the middleware stack to insert the Dragonfly middleware
|
16
16
|
# config.dragonfly_insert_before = <%= Refinery::Videos.dragonfly_insert_before %>
|
17
|
-
# config.dragonfly_secret = <%= Refinery::Videos.dragonfly_secret %>
|
18
17
|
# If you decide to trust file extensions replace :ext below with :format
|
19
|
-
# config.
|
18
|
+
# config.dragonfly_server_root = <%= Refinery::Videos.dragonfly_server_root %>
|
20
19
|
# config.datastore_root_path = <%= Refinery::Videos.datastore_root_path %>
|
21
20
|
# config.trust_file_extensions = <%= Refinery::Videos.trust_file_extensions %>
|
22
|
-
|
23
21
|
end
|
@@ -2,15 +2,15 @@ module Refinery
|
|
2
2
|
module Videos
|
3
3
|
include ActiveSupport::Configurable
|
4
4
|
|
5
|
-
config_accessor :dragonfly_insert_before, :dragonfly_secret, :
|
5
|
+
config_accessor :dragonfly_insert_before, :dragonfly_secret, :dragonfly_server_root,
|
6
6
|
:max_file_size, :pages_per_dialog, :pages_per_admin_index,
|
7
7
|
:s3_backend, :s3_bucket_name, :s3_region,
|
8
8
|
:s3_access_key_id, :s3_secret_access_key,
|
9
9
|
:datastore_root_path, :trust_file_extensions, :whitelisted_mime_types, :skin_css_class
|
10
10
|
|
11
11
|
self.dragonfly_insert_before = 'ActionDispatch::Callbacks'
|
12
|
-
self.dragonfly_secret = Refinery::
|
13
|
-
self.
|
12
|
+
self.dragonfly_secret = Refinery::Dragonfly.secret
|
13
|
+
self.dragonfly_server_root = 'public'
|
14
14
|
self.trust_file_extensions = false
|
15
15
|
self.max_file_size = 524288000
|
16
16
|
self.pages_per_dialog = 7
|
@@ -20,11 +20,11 @@ module Refinery
|
|
20
20
|
|
21
21
|
class << self
|
22
22
|
def datastore_root_path
|
23
|
-
config.datastore_root_path ||
|
23
|
+
config.datastore_root_path || Rails.root.join('public', 'system', 'refinery', 'videos').to_s
|
24
24
|
end
|
25
25
|
|
26
26
|
def s3_backend
|
27
|
-
config.s3_backend.nil? ? Refinery::Core.s3_backend : config.s3_backend
|
27
|
+
config.s3_backend.nil? ? Refinery::Core.config.s3_backend : config.s3_backend
|
28
28
|
end
|
29
29
|
|
30
30
|
def s3_bucket_name
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module DialogsControllerFindVideoIframeSrc
|
2
|
+
def find_iframe_src
|
3
|
+
if @dialog_type == 'video'
|
4
|
+
@iframe_src = refinery.insert_videos_admin_videos_path url_params.merge(:dialog => true)
|
5
|
+
else
|
6
|
+
super
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
Refinery::Admin::DialogsController.class_eval do
|
12
|
+
Refinery::Admin::DialogsController::TYPES << 'video'
|
13
|
+
prepend(DialogsControllerFindVideoIframeSrc)
|
14
|
+
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'dragonfly'
|
2
|
+
require 'dragonfly/s3_data_store'
|
2
3
|
|
3
4
|
module Refinery
|
4
5
|
module Videos
|
@@ -6,45 +7,31 @@ module Refinery
|
|
6
7
|
|
7
8
|
class << self
|
8
9
|
def setup!
|
9
|
-
app_videos = ::Dragonfly
|
10
|
-
|
11
|
-
app_videos.define_macro(::Refinery::Videos::VideoFile, :video_accessor)
|
12
|
-
|
13
|
-
app_videos.analyser.register(::Dragonfly::Analysis::FileCommandAnalyser)
|
14
|
-
app_videos.content_disposition = :attachment
|
10
|
+
app_videos = ::Dragonfly.app(:refinery_videos)
|
15
11
|
end
|
16
12
|
|
17
13
|
def configure!
|
18
|
-
app_videos = ::Dragonfly
|
19
|
-
app_videos.
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
14
|
+
app_videos = ::Dragonfly.app(:refinery_videos)
|
15
|
+
app_videos.configure do
|
16
|
+
datastore :file,
|
17
|
+
root_path: Refinery::Videos.datastore_root_path,
|
18
|
+
server_root: Refinery::Videos.dragonfly_server_root,
|
19
|
+
secret: Refinery::Videos.dragonfly_secret
|
24
20
|
end
|
25
21
|
|
26
22
|
if ::Refinery::Videos.s3_backend
|
27
|
-
app_videos.
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
23
|
+
app_videos.configure do
|
24
|
+
datastore :s3,
|
25
|
+
bucket_name: Refinery::Videos.s3_bucket_name,
|
26
|
+
access_key_id: Refinery::Videos.s3_access_key_id,
|
27
|
+
secret_access_key: Refinery::Videos.s3_secret_access_key,
|
28
|
+
# S3 Region otherwise defaults to 'us-east-1'
|
29
|
+
region: Refinery::Videos.s3_region if Refinery::Videos.s3_region
|
34
30
|
end
|
35
31
|
end
|
36
32
|
end
|
37
33
|
|
38
34
|
def attach!(app)
|
39
|
-
### Extend active record ###
|
40
|
-
app.config.middleware.insert_before Refinery::Videos.dragonfly_insert_before,
|
41
|
-
'Dragonfly::Middleware', :refinery_videos
|
42
|
-
|
43
|
-
app.config.middleware.insert_before 'Dragonfly::Middleware', 'Rack::Cache', {
|
44
|
-
:verbose => Rails.env.development?,
|
45
|
-
:metastore => "file:#{URI.encode(Rails.root.join('tmp', 'dragonfly', 'cache', 'meta').to_s)}",
|
46
|
-
:entitystore => "file:#{URI.encode(Rails.root.join('tmp', 'dragonfly', 'cache', 'body').to_s)}"
|
47
|
-
}
|
48
35
|
end
|
49
36
|
end
|
50
37
|
|
@@ -6,7 +6,7 @@ module Refinery
|
|
6
6
|
|
7
7
|
engine_name :refinery_videos
|
8
8
|
|
9
|
-
initializer 'attach-refinery-videos-with-dragonfly', :
|
9
|
+
initializer 'attach-refinery-videos-with-dragonfly', after: :load_config_initializers do |app|
|
10
10
|
::Refinery::Videos::Dragonfly.configure!
|
11
11
|
::Refinery::Videos::Dragonfly.attach!(app)
|
12
12
|
end
|
@@ -16,14 +16,14 @@ module Refinery
|
|
16
16
|
plugin.name = "videos"
|
17
17
|
plugin.url = proc { Refinery::Core::Engine.routes.url_helpers.videos_admin_videos_path }
|
18
18
|
plugin.pathname = root
|
19
|
-
plugin.activity = {
|
20
|
-
:class_name => :'refinery/videos/video',
|
21
|
-
:title => 'title'
|
22
|
-
}
|
23
|
-
|
24
19
|
end
|
25
20
|
end
|
26
21
|
|
22
|
+
config.to_prepare do
|
23
|
+
require 'refinery/videos/dialogs_controller'
|
24
|
+
|
25
|
+
Rails.application.config.assets.precompile << %w(refinery/admin/wymeditor_monkeypatch.js refinery/admin/video.css)
|
26
|
+
end
|
27
27
|
config.after_initialize do
|
28
28
|
Refinery.register_extension(Refinery::Videos)
|
29
29
|
end
|
data/lib/refinery/videos.rb
CHANGED
metadata
CHANGED
@@ -1,138 +1,204 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinerycms-videojs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.6.0.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Anton Mishchuk
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2020-02-27 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: dragonfly
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - "~>"
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
19
|
+
version: 1.2.0
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
26
|
+
version: 1.2.0
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
|
-
name:
|
28
|
+
name: refinerycms-core
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - "~>"
|
36
32
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
33
|
+
version: 4.0.2
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - "~>"
|
44
39
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
40
|
+
version: 4.0.2
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
42
|
+
name: dragonfly-s3_data_store
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - "~>"
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
47
|
+
version: 1.3.0
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.3.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: capybara-webkit
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.15.1
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.15.1
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: capybara-screenshot
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.0.24
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.0.24
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: factory_girl_rails
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
60
88
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
62
|
-
|
63
|
-
|
89
|
+
version: 4.9.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 4.9.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.18.2
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.18.2
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: refinerycms-testing
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 4.0.2
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 4.0.2
|
125
|
+
description: Manage videos in RefineryCMS using Video.js player for playback
|
126
|
+
email: admin@adexin.com
|
64
127
|
executables: []
|
65
128
|
extensions: []
|
66
129
|
extra_rdoc_files: []
|
67
130
|
files:
|
68
|
-
- app/models/refinery/videos/video_file.rb
|
69
|
-
- app/models/refinery/videos/video.rb
|
70
131
|
- app/assets/images/refinery/admin/add_video_icon.png
|
71
|
-
- app/assets/javascripts/refinery/admin/wymeditor_monkeypatch.js
|
132
|
+
- app/assets/javascripts/refinery/admin/wymeditor_monkeypatch.js.erb
|
72
133
|
- app/assets/stylesheets/refinery/admin/video.css
|
73
134
|
- app/controllers/refinery/videos/admin/video_files_controller.rb
|
74
135
|
- app/controllers/refinery/videos/admin/videos_controller.rb
|
75
|
-
- app/
|
136
|
+
- app/models/refinery/videos/video.rb
|
137
|
+
- app/models/refinery/videos/video_file.rb
|
138
|
+
- app/views/refinery/admin/dashboard/_additional_dashboard_menu_items.html.erb
|
76
139
|
- app/views/refinery/videos/admin/videos/_actions.html.erb
|
140
|
+
- app/views/refinery/videos/admin/videos/_embed_video_fields.html.erb
|
77
141
|
- app/views/refinery/videos/admin/videos/_file_fields.html.erb
|
142
|
+
- app/views/refinery/videos/admin/videos/_form.html.erb
|
143
|
+
- app/views/refinery/videos/admin/videos/_form_option_fields.html.erb
|
78
144
|
- app/views/refinery/videos/admin/videos/_new_file_field.html.erb
|
145
|
+
- app/views/refinery/videos/admin/videos/_preview_form.html.erb
|
79
146
|
- app/views/refinery/videos/admin/videos/_records.html.erb
|
80
|
-
- app/views/refinery/videos/admin/videos/
|
81
|
-
- app/views/refinery/videos/admin/videos/insert.html.erb
|
82
|
-
- app/views/refinery/videos/admin/videos/_videos.html.erb
|
147
|
+
- app/views/refinery/videos/admin/videos/_sortable_list.html.erb
|
83
148
|
- app/views/refinery/videos/admin/videos/_video.html.erb
|
84
|
-
- app/views/refinery/videos/admin/videos/
|
149
|
+
- app/views/refinery/videos/admin/videos/_videojs_dependencies.html.erb
|
150
|
+
- app/views/refinery/videos/admin/videos/_videos.html.erb
|
85
151
|
- app/views/refinery/videos/admin/videos/append_to_wym.js.erb
|
152
|
+
- app/views/refinery/videos/admin/videos/dialog_preview.js.erb
|
86
153
|
- app/views/refinery/videos/admin/videos/edit.html.erb
|
87
|
-
- app/views/refinery/videos/admin/videos/
|
88
|
-
- app/views/refinery/videos/admin/videos/
|
89
|
-
- app/views/refinery/videos/admin/videos/
|
90
|
-
- app/views/refinery/videos/admin/videos/_preview_form.html.erb
|
91
|
-
- app/views/refinery/videos/admin/videos/_sortable_list.html.erb
|
154
|
+
- app/views/refinery/videos/admin/videos/index.html.erb
|
155
|
+
- app/views/refinery/videos/admin/videos/insert.html.erb
|
156
|
+
- app/views/refinery/videos/admin/videos/new.html.erb
|
92
157
|
- app/views/refinery/videos/admin/videos/show.html.erb
|
93
|
-
- app/views/
|
94
|
-
-
|
95
|
-
-
|
158
|
+
- app/views/sitemap/index.xml.builder
|
159
|
+
- config/initializers/refinery/core.rb
|
160
|
+
- config/initializers/refinery/wymeditor.rb
|
96
161
|
- config/locales/en.yml
|
162
|
+
- config/locales/es.yml
|
163
|
+
- config/locales/pt-BR.yml
|
97
164
|
- config/locales/ru.yml
|
98
165
|
- config/locales/sk.yml
|
99
|
-
- config/
|
166
|
+
- config/locales/zh-CN.yml
|
100
167
|
- config/routes.rb
|
101
|
-
- db/migrate/2_create_video_file.rb
|
102
168
|
- db/migrate/1_create_videos_videos.rb
|
169
|
+
- db/migrate/2_create_video_file.rb
|
170
|
+
- lib/generators/refinery/videos/templates/assets/javascripts/videojs_loader.js
|
171
|
+
- lib/generators/refinery/videos/templates/config/initializers/refinery/videos.rb.erb
|
172
|
+
- lib/generators/refinery/videos_generator.rb
|
173
|
+
- lib/refinery/videos.rb
|
103
174
|
- lib/refinery/videos/configuration.rb
|
175
|
+
- lib/refinery/videos/dialogs_controller.rb
|
104
176
|
- lib/refinery/videos/dragonfly.rb
|
177
|
+
- lib/refinery/videos/engine.rb
|
105
178
|
- lib/refinery/videos/validators.rb
|
106
179
|
- lib/refinery/videos/validators/file_size_validator.rb
|
107
|
-
- lib/refinery/videos/engine.rb
|
108
|
-
- lib/refinery/videos.rb
|
109
180
|
- lib/refinerycms-videojs.rb
|
110
|
-
- lib/generators/refinery/videos/templates/config/initializers/refinery/videos.rb.erb
|
111
|
-
- lib/generators/refinery/videos/templates/assets/javascripts/videojs_loader.js
|
112
|
-
- lib/generators/refinery/videos_generator.rb
|
113
181
|
homepage: http://www.adexin.com
|
114
182
|
licenses:
|
115
183
|
- MIT
|
184
|
+
metadata: {}
|
116
185
|
post_install_message:
|
117
186
|
rdoc_options: []
|
118
187
|
require_paths:
|
119
188
|
- lib
|
120
189
|
required_ruby_version: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
190
|
requirements:
|
123
|
-
- -
|
191
|
+
- - ">="
|
124
192
|
- !ruby/object:Gem::Version
|
125
193
|
version: '0'
|
126
194
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
|
-
none: false
|
128
195
|
requirements:
|
129
|
-
- -
|
196
|
+
- - ">="
|
130
197
|
- !ruby/object:Gem::Version
|
131
198
|
version: '0'
|
132
199
|
requirements: []
|
133
|
-
|
134
|
-
rubygems_version: 1.8.24
|
200
|
+
rubygems_version: 3.1.2
|
135
201
|
signing_key:
|
136
|
-
specification_version:
|
202
|
+
specification_version: 4
|
137
203
|
summary: Videos extension for Refinery CMS
|
138
204
|
test_files: []
|
@@ -1,13 +0,0 @@
|
|
1
|
-
$insert_video_link = "<ul id='add_video'><li><a href='/refinery/videos/insert?dialog=true'>Add Video</a></li></ul>";
|
2
|
-
window.onload = function ()
|
3
|
-
{
|
4
|
-
if ($.wymeditors(0)) {
|
5
|
-
$('.wym_area_top').append($insert_video_link);
|
6
|
-
init_modal_dialogs();
|
7
|
-
}
|
8
|
-
};
|
9
|
-
|
10
|
-
onCloseDialog = function(){
|
11
|
-
$('iframe#dialog_iframe').attr('src', '');
|
12
|
-
};
|
13
|
-
|