From 89a073e546423d40736ef01c55984ba93e9a3f2b Mon Sep 17 00:00:00 2001 From: Fernando Brito Date: Wed, 4 Jun 2014 15:52:07 -0300 Subject: [PATCH] Remove control os most videos --- app/assets/stylesheets/components/video_player.css.scss | 1 + app/assets/stylesheets/v_libras/requests.css.scss | 3 +++ app/helpers/application_helper.rb | 6 +----- app/views/devise/registrations/new.html.haml | 3 ++- app/views/devise/sessions/new.html.haml | 3 ++- app/views/layouts/application.html.erb | 5 +++-- app/views/static/home.haml | 8 +++++--- app/views/v_libras/requests/_service_step.haml | 8 +++++--- app/views/v_libras/requests/_video_step.haml | 27 +++++++++++++++++++-------- app/views/v_libras/videos/show.haml | 2 +- 10 files changed, 42 insertions(+), 24 deletions(-) diff --git a/app/assets/stylesheets/components/video_player.css.scss b/app/assets/stylesheets/components/video_player.css.scss index ae23fa0..2105e9d 100644 --- a/app/assets/stylesheets/components/video_player.css.scss +++ b/app/assets/stylesheets/components/video_player.css.scss @@ -10,6 +10,7 @@ .video-wizard { max-width: 100%; margin-bottom: 20px; + background-color: inherit !important; } .video-vlibras { diff --git a/app/assets/stylesheets/v_libras/requests.css.scss b/app/assets/stylesheets/v_libras/requests.css.scss index 2b0f7c4..4dcf3a2 100644 --- a/app/assets/stylesheets/v_libras/requests.css.scss +++ b/app/assets/stylesheets/v_libras/requests.css.scss @@ -38,4 +38,7 @@ opacity: 1; } + label { + line-height: 32px; + } } \ No newline at end of file diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 18ccab7..ae43ecc 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -46,15 +46,11 @@ module ApplicationHelper :data => { 'toggle' => "tooltip" }, :title => request.response) end - def custom_video_tag(video, classes = nil) - html5_video_tag(video.url_mp4, "video_#{video.id}", classes) - end - def html5_video_tag(url, id, classes = nil, *args) options = args.first || {} + options[:id] = id options[:class] = "video-js vjs-default skin #{classes}" - options[:controls] = 'controls' options[:preload] = 'auto' content_tag(:video, options) do diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml index 78e9a88..5415370 100644 --- a/app/views/devise/registrations/new.html.haml +++ b/app/views/devise/registrations/new.html.haml @@ -3,7 +3,8 @@ .row-fluid .span5.well - = html5_video_tag('/system/videos/cadastro.mp4', 'video-vlibras', 'video-instructions', :autoplay => 'autoplay') + = html5_video_tag('/system/videos/cadastro.mp4', 'video-vlibras', 'video-instructions', + :autoplay => 'autoplay', :loop => 'loop') .span7.well %h2 Dados do Usuário diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml index 7675092..7a9fcd1 100644 --- a/app/views/devise/sessions/new.html.haml +++ b/app/views/devise/sessions/new.html.haml @@ -1,6 +1,7 @@ .row-fluid .span7 - = html5_video_tag('/system/videos/login.mp4', 'login', 'video-instructions', :autoplay => 'autoplay') + = html5_video_tag('/system/videos/login.mp4', 'login', 'video-instructions', + :autoplay => 'autoplay', :loop => 'loop') .span4.offset1.login %h2 Entrar diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 083b95e..db97148 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -2,11 +2,12 @@ GTAaaS - <%= stylesheet_link_tag "application", :media => "all" %> <%= javascript_include_tag "application" %> - <%= yield :js %> + <%= yield :css %> + <%= stylesheet_link_tag "application", :media => "all" %> + <%= csrf_meta_tags %> diff --git a/app/views/static/home.haml b/app/views/static/home.haml index f2f2231..be6bd8f 100644 --- a/app/views/static/home.haml +++ b/app/views/static/home.haml @@ -4,19 +4,21 @@ .hero-unit .row-fluid .span4 - = html5_video_tag('/system/videos/vlibras.mp4', 'video-vlibras', 'video-instructions', :autoplay => 'autoplay') + = html5_video_tag('/system/videos/vlibras.mp4', 'video-vlibras', 'video-instructions', + :autoplay => 'autoplay', :loop => 'loop') + %br/ %h2= link_to "V-LIBRAS", new_v_libras_request_path %p Coloque o seu vídeo e torne-o acessível. .span4.hidden - = html5_video_tag('/system/videos/wikilibras.mp4', 'video-wikilibras', 'video-instructions') + =# html5_video_tag('/system/videos/wikilibras.mp4', 'video-wikilibras', 'video-instructions') %br/ %h2= link_to "WIKILIBRAS", '#' %p Contribua com sinais de LIBRAS para o nosso banco de dados. .span4.hidden - = html5_video_tag('/system/videos/slibras.mp4', 'video-slibras', 'video-instructions') + =# html5_video_tag('/system/videos/slibras.mp4', 'video-slibras', 'video-instructions') %br/ %h2= link_to "S-LIBRAS", '#' %p Edite a legenda dos vídeos já acessíveis \ No newline at end of file diff --git a/app/views/v_libras/requests/_service_step.haml b/app/views/v_libras/requests/_service_step.haml index 13cf560..8b21dcd 100644 --- a/app/views/v_libras/requests/_service_step.haml +++ b/app/views/v_libras/requests/_service_step.haml @@ -6,10 +6,12 @@ %source{src: "/system/videos/workflow/sub_audio.webm"} Your browser does not support the video tag. - =# html5_video_tag("/system/videos/workflow/sub_audio.mp4", 'id', 'video-wizard', :autoplay => true) + .row-fluid.hide + .span1.offset3 + = label_tag :video, t('videos.subtitle'), :class => "bold" - .span4.offset4.hide - = file_field_tag 'subtitle', :id => 'subtitle-upload' + .span5 + = file_field_tag 'subtitle', :id => 'subtitle-upload' :javascript diff --git a/app/views/v_libras/requests/_video_step.haml b/app/views/v_libras/requests/_video_step.haml index 6378f16..3041bbc 100644 --- a/app/views/v_libras/requests/_video_step.haml +++ b/app/views/v_libras/requests/_video_step.haml @@ -1,13 +1,24 @@ -.wrapper +#video-step.wrapper .video_wrapper - %video.video-wizard{'autoplay' => 'autoplay'} - %source{src: "/system/videos/workflow/tamanho.mp4"} - %source{src: "/system/videos/workflow/tamanho.webm"} + %video.video-wizard{:autoplay => 'autoplay'} + %source{src: "/system/videos/workflow/sub_audio.mp4"} + %source{src: "/system/videos/workflow/sub_audio.webm"} Your browser does not support the video tag. - .span6.offset3 - .span2 + .row-fluid + .span1.offset3 = label_tag :video, t('videos.url'), :class => "bold" - .span10 - = file_field_tag 'video', :id => 'video-upload' \ No newline at end of file + + .span5 + = file_field_tag 'video', :id => 'video-upload' + + +:javascript + var optionsVideo = { + video: { width: 940, height: 530 }, + buttons: [] + }; + + var VLibrasVideo = new VLibrasLocalization(); + VLibrasVideo.init("#video-step", optionsVideo); \ No newline at end of file diff --git a/app/views/v_libras/videos/show.haml b/app/views/v_libras/videos/show.haml index e021c0e..4bb3e56 100644 --- a/app/views/v_libras/videos/show.haml +++ b/app/views/v_libras/videos/show.haml @@ -3,4 +3,4 @@ .row-fluid .span12.text-center.well - = html5_video_tag(@video.url_mp4, 'video-vlibras', 'video-vlibras', :autoplay => 'autoplay') \ No newline at end of file + = html5_video_tag(@video.url_mp4, 'video-vlibras', 'video-vlibras', :autoplay => 'autoplay', :controls => 'controls') \ No newline at end of file -- libgit2 0.21.2