From 366ba06e89ab4e5345b9fd526a26bc47e6843714 Mon Sep 17 00:00:00 2001 From: Steven Miers Date: Sun, 15 Feb 2015 19:28:13 -0600 Subject: [PATCH] VRFS-1845 : Webcam settings included in account page. Script uses same WebcamViewer object as the flue. --- .../javascripts/accounts_video_profile.js | 32 ++++++++++++++++ .../stylesheets/client/account.css.scss | 21 +++++++++-- .../clients/_account_video_profile.html.erb | 37 +++++++++++++++++++ web/app/views/clients/index.html.erb | 4 ++ 4 files changed, 90 insertions(+), 4 deletions(-) create mode 100644 web/app/assets/javascripts/accounts_video_profile.js create mode 100644 web/app/views/clients/_account_video_profile.html.erb diff --git a/web/app/assets/javascripts/accounts_video_profile.js b/web/app/assets/javascripts/accounts_video_profile.js new file mode 100644 index 000000000..fbb1a6d53 --- /dev/null +++ b/web/app/assets/javascripts/accounts_video_profile.js @@ -0,0 +1,32 @@ +(function (context, $) { + + "use strict"; + + context.JK = context.JK || {}; + context.JK.AccountVideoProfile = function (app) { + var $webcamViewer = new context.JK.WebcamViewer() + function initialize() { + var screenBindings = { + 'beforeShow': beforeShow, + 'beforeHide':beforeHide + }; + app.bindScreen('account/video', screenBindings); + + $webcamViewer.init($(".webcam-container")) + } + + function beforeShow() { + $webcamViewer.beforeShow() + } + + function beforeHide() { + $webcamViewer.setVideoOff() + } + + this.beforeShow = beforeShow + this.beforeHide = beforeHide + this.initialize = initialize + return this; + }; + +})(window, jQuery); \ No newline at end of file diff --git a/web/app/assets/stylesheets/client/account.css.scss b/web/app/assets/stylesheets/client/account.css.scss index 965ed4036..a894e43de 100644 --- a/web/app/assets/stylesheets/client/account.css.scss +++ b/web/app/assets/stylesheets/client/account.css.scss @@ -49,6 +49,22 @@ width: 20%; } + .wizard_control { + margin-bottom: 10px; + } + + .content-wrapper .account-video { + + .subcaption { + margin-bottom: 4px; + } + } + + .webcam-container { + margin-top: 10px; + } + + .account-left h2 { color: #FFFFFF; font-size: 23px; @@ -107,7 +123,7 @@ } } - .audio .audio-profiles-short{ + .audio .audio-profiles-short, .video .video-profiles-short { white-space: normal; } @@ -151,7 +167,6 @@ } .account-audio { - table.generaltable td { vertical-align:middle; } @@ -160,7 +175,6 @@ margin-bottom:9px; } - .rescanning-notice { display:none; @@ -216,7 +230,6 @@ } } - .spinner-large { width:300px; height:300px; diff --git a/web/app/views/clients/_account_video_profile.html.erb b/web/app/views/clients/_account_video_profile.html.erb new file mode 100644 index 000000000..074bfefb7 --- /dev/null +++ b/web/app/views/clients/_account_video_profile.html.erb @@ -0,0 +1,37 @@ + +
+ +
+ +
+ <%= image_tag "content/icon_account.png", {:width => 27, :height => 20} %> +
+ +

my account

+ + <%= render "screen_navigation" %> +
+ + + +
+ +
+ +
+ diff --git a/web/app/views/clients/index.html.erb b/web/app/views/clients/index.html.erb index acf32e572..615ea061d 100644 --- a/web/app/views/clients/index.html.erb +++ b/web/app/views/clients/index.html.erb @@ -50,6 +50,7 @@ <%= render "account_profile" %> <%= render "account_profile_avatar" %> <%= render "account_audio_profile" %> +<%= render "account_video_profile" %> <%= render "account_sessions" %> <%= render "account_session_detail" %> <%= render "account_session_properties" %> @@ -206,6 +207,9 @@ var accountAudioProfile = new JK.AccountAudioProfile(JK.app); accountAudioProfile.initialize(); + var accountVideoProfile = new JK.AccountVideoProfile(JK.app); + accountVideoProfile.initialize(); + var searchResultScreen = new JK.SearchResultScreen(JK.app); searchResultScreen.initialize();