Commit e43ed850fd5054e1749ecdd3098e5866e35bf64b

Authored by Evandro Jr
2 parents 237e3579 36566aeb

Merge branch 'stable' of gitlab.com:participa/noosfero into stable

plugins/sub_organizations/lib/sub_organizations_plugin/relation.rb
@@ -25,14 +25,12 @@ class SubOrganizationsPlugin::Relation < Noosfero::Plugin::ActiveRecord @@ -25,14 +25,12 @@ class SubOrganizationsPlugin::Relation < Noosfero::Plugin::ActiveRecord
25 end 25 end
26 end 26 end
27 27
28 - class << self  
29 - def add_children(parent, *children)  
30 - children.each {|child| create!(:parent_id => parent.id, :child_id => child.id)}  
31 - end 28 + def self.add_children(parent, *children)
  29 + children.each {|child| SubOrganizationsPlugin::Relation.create!(:parent => parent, :child => child)}
  30 + end
32 31
33 - def remove_children(parent, *children)  
34 - children.flatten.each {|child| find_by_parent_id_and_child_id(parent.id, child.id).destroy}  
35 - end 32 + def self.remove_children(parent, *children)
  33 + children.flatten.each {|child| find_by_parent_id_and_child_id(parent.id, child.id).destroy}
36 end 34 end
37 35
38 end 36 end
plugins/video/views/content_viewer/_video.html.erb
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <link type="text/css" rel="stylesheet" href="https://vjs.zencdn.net/4.5.1/video-js.css" /> 3 <link type="text/css" rel="stylesheet" href="https://vjs.zencdn.net/4.5.1/video-js.css" />
4 <video id="embedded_video" src="" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" 4 <video id="embedded_video" src="" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto"
5 width="<%= @page.fitted_width %>" height="<%= @page.fitted_height %>" 5 width="<%= @page.fitted_width %>" height="<%= @page.fitted_height %>"
6 - data-setup='{ "techOrder": ["youtube"], "src": "<%= @page.video_url %>" }'> 6 + data-setup='<%=CGI::escapeHTML("{ \"techOrder\": [\"youtube\"], \"src\": \"#{@page.video_url}\" }") %>'>
7 <%= @page.no_browser_support_message %> 7 <%= @page.no_browser_support_message %>
8 </video> 8 </video>
9 <script src="https://vjs.zencdn.net/4.5.1/video.js"></script> 9 <script src="https://vjs.zencdn.net/4.5.1/video.js"></script>
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 <link type="text/css" rel="stylesheet" href="https://vjs.zencdn.net/4.5.1/video-js.css" /> 12 <link type="text/css" rel="stylesheet" href="https://vjs.zencdn.net/4.5.1/video-js.css" />
13 <video id="embedded_video" src="" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" 13 <video id="embedded_video" src="" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto"
14 width="<%= @page.fitted_width %>" height="<%= @page.fitted_height %>" 14 width="<%= @page.fitted_width %>" height="<%= @page.fitted_height %>"
15 - data-setup='{ "techOrder": ["vimeo"], "src": "<%= @page.video_url %>", "loop": true, "autoplay": false }'> 15 + data-setup='<%=CGI::escapeHTML("{ \"techOrder\": [\"vimeo\"], \"src\": \"#{@page.video_url}\", \"loop\": true, \"autoplay\": false }") %>'>
16 <%= @page.no_browser_support_message %> 16 <%= @page.no_browser_support_message %>
17 </video> 17 </video>
18 <script src="https://vjs.zencdn.net/4.5.1/video.js"></script> 18 <script src="https://vjs.zencdn.net/4.5.1/video.js"></script>