diff --git a/web/app/assets/javascripts/session.js b/web/app/assets/javascripts/session.js index e017d1de6..d85a15b30 100644 --- a/web/app/assets/javascripts/session.js +++ b/web/app/assets/javascripts/session.js @@ -1319,6 +1319,7 @@ configureTrackDialog.showVoiceChatPanel(true); configureTrackDialog.showMusicAudioPanel(true); }); + $('#close-playback-recording').on('click', closeRecording); $(playbackControls) .on('pause', onPause) diff --git a/web/app/assets/javascripts/shareDialog.js b/web/app/assets/javascripts/shareDialog.js new file mode 100644 index 000000000..ddf0640ce --- /dev/null +++ b/web/app/assets/javascripts/shareDialog.js @@ -0,0 +1,102 @@ +(function(context,$) { + + "use strict"; + context.JK = context.JK || {}; + context.JK.ShareDialog = function(app) { + var logger = context.JK.logger; + var rest = context.JK.Rest(); + + function registerEvents(onOff) { + + } + + /*function showEmailDialog() { + $('#invitation-dialog').show(); + $('#invitation-textarea-container').show(); + $('#invitation-checkbox-container').hide(); + $('#btn-send-invitation').show(); + $('#btn-next-invitation').hide(); + clearTextFields(); + app.layout.showDialog('inviteUsers') + } + + function showGoogleDialog() { + $('#invitation-dialog').show(); + $('#invitation-textarea-container').hide(); + $('#invitation-checkbox-container').show(); + $('#btn-send-invitation').hide(); + $('#btn-next-invitation').show(); + clearTextFields(); + + app.layout.showDialog('inviteUsers') + + $('#invitation-checkboxes').html('
Loading your contacts...
'); + window._oauth_callback = function() { + window._oauth_win.close(); + window._oauth_win = null; + window._oauth_callback = null; + $.ajax({ + type: "GET", + url: "/gmail_contacts", + success: function(response) { + $('#invitation-checkboxes').html(''); + for (var i in response) { + $('#invitation-checkboxes').append(""); + } + + $('.invitation-checkbox').change(function() { + var checkedBoxes = $('.invitation-checkbox:checkbox:checked'); + var emails = ''; + for (var i = 0; i < checkedBoxes.length; i++) { + emails += $(checkedBoxes[i]).data('email') + ', '; + } + emails = emails.replace(/, $/, ''); + // track how many of these came from google + $('#txt-emails').val(emails).data('google_invite_count', checkedBoxes.length); + }); + }, + error: function() { + $('#invitation-checkboxes').html("Load failed!"); + } + }); + + }; + window._oauth_win = window.open("/auth/google_login", "_blank", "height=500,width=500,menubar=no,resizable=no,status=no"); + } + + function showFacebookDialog() { + window._oauth_callback = function() { + window._oauth_win.close(); + window._oauth_win = null; + window._oauth_callback = null; + }; + window._oauth_win = window.open("/auth/facebook_login", "_blank", "height=500,width=500,menubar=no,resizable=no,status=no"); + }*/ + + function clearTextFields() { + + } + + function beforeShow() { + registerEvents(true); + } + + function afterHide() { + registerEvents(false); + } + + function initialize(){ + var dialogBindings = { + 'beforeShow' : beforeShow, + 'afterHide': afterHide + }; + + app.bindDialog('shareSessionRecording', dialogBindings); + }; + + + this.initialize = initialize; + } + + return this; +})(window,jQuery); \ No newline at end of file diff --git a/web/app/assets/javascripts/web/recordings.js b/web/app/assets/javascripts/web/recordings.js index a6e6d51eb..2ab8ba2bf 100644 --- a/web/app/assets/javascripts/web/recordings.js +++ b/web/app/assets/javascripts/web/recordings.js @@ -1,32 +1,10 @@ $(function() { - function search() { - var locationQuery = $('#location').val().length > 0 ? $('#location').val() : ''; + function like() { - var searchUrl = "/search"; - if (locationQuery.length > 0) { - searchUrl = searchUrl + "?location=" + encodeURIComponent(locationQuery); - - if ($('#activity').val().length > 0) { - searchUrl = searchUrl + "&activity=" + encodeURIComponent($('#activity').val()); - } - } - else { - if ($('#activity').val().length > 0) { - searchUrl = searchUrl + "?activity=" + encodeURIComponent($('#activity').val()); - } - } - - window.location.href = searchUrl; } // search click handler - $('#btnSearch').click(search); + $('#btnlike').click(like); - $("#location").keypress(function(evt) { - if (evt.which === 13) { - evt.preventDefault(); - search(); - } - }); }); \ No newline at end of file diff --git a/web/app/assets/javascripts/web/sessions.js b/web/app/assets/javascripts/web/sessions.js index a6e6d51eb..2ab8ba2bf 100644 --- a/web/app/assets/javascripts/web/sessions.js +++ b/web/app/assets/javascripts/web/sessions.js @@ -1,32 +1,10 @@ $(function() { - function search() { - var locationQuery = $('#location').val().length > 0 ? $('#location').val() : ''; + function like() { - var searchUrl = "/search"; - if (locationQuery.length > 0) { - searchUrl = searchUrl + "?location=" + encodeURIComponent(locationQuery); - - if ($('#activity').val().length > 0) { - searchUrl = searchUrl + "&activity=" + encodeURIComponent($('#activity').val()); - } - } - else { - if ($('#activity').val().length > 0) { - searchUrl = searchUrl + "?activity=" + encodeURIComponent($('#activity').val()); - } - } - - window.location.href = searchUrl; } // search click handler - $('#btnSearch').click(search); + $('#btnlike').click(like); - $("#location").keypress(function(evt) { - if (evt.which === 13) { - evt.preventDefault(); - search(); - } - }); }); \ No newline at end of file diff --git a/web/app/assets/javascripts/web/web.js b/web/app/assets/javascripts/web/web.js index f1e3438e6..0cde1c7d7 100644 --- a/web/app/assets/javascripts/web/web.js +++ b/web/app/assets/javascripts/web/web.js @@ -6,6 +6,7 @@ //= require AAC_underscore //= require globals //= require invitationDialog +//= require shareDialog //= require layout //= require user_dropdown //= require jamkazam @@ -16,3 +17,5 @@ //= require landing/signup //= require web/downloads //= require web/congratulations +//= require web/sessions +//= require web/recordings diff --git a/web/app/assets/stylesheets/client/client.css b/web/app/assets/stylesheets/client/client.css index a852d46bf..77fa35555 100644 --- a/web/app/assets/stylesheets/client/client.css +++ b/web/app/assets/stylesheets/client/client.css @@ -32,6 +32,8 @@ *= require ./search *= require ./ftue *= require ./invitationDialog + *= require ./shareDialog + *= require ./widget *= require ./recordingFinishedDialog *= require ./localRecordingsDialog *= require ./createSession diff --git a/web/app/assets/stylesheets/client/screen_common.css.scss b/web/app/assets/stylesheets/client/screen_common.css.scss index 98fd15a4b..8b7b259d0 100644 --- a/web/app/assets/stylesheets/client/screen_common.css.scss +++ b/web/app/assets/stylesheets/client/screen_common.css.scss @@ -169,8 +169,8 @@ a { display:inline-block; } -small { - font-size:11px; +small, .small { + font-size:11px; } .button-grey { @@ -207,6 +207,11 @@ small { text-decoration:none; } +.smallbutton { + font-size:10px; + padding:2px 8px; +} + .button-orange:hover { background-color:#f16750; color:#FFF; @@ -230,49 +235,24 @@ a img { border:none; } -.clearall { - clear:both; -} +.clearall {clear:both;} +.left {float:left;} +.right {float:right;} +.center {text-align:center !important;} -.left { - float:left; -} - -.right { - float:right; -} - -.f8 { - font-size: 8px !important; -} - -.f9 { - font-size: 9px !important; -} - -.f10 { - font-size: 10px !important; -} - -.f11 { - font-size: 11px !important; -} - -.f12 { - font-size: 12px !important; -} - -.f13 { - font-size: 13px !important; -} - -.f14 { - font-size: 14px !important; -} - -.f15 { - font-size: 15px !important; -} +.f8 {font-size:8px !important} +.f9 {font-size:9px !important} +.f10 {font-size:10px !important} +.f11 {font-size:11px !important} +.f12 {font-size:12px !important} +.f13 {font-size:13px !important} +.f14 {font-size:14px !important} +.f15 {font-size:15px !important} +.f16 {font-size:16px !important} +.f17 {font-size:17px !important} +.f18 {font-size:18px !important} +.f19 {font-size:19px !important} +.f20 {font-size:20px !important} .m0 { margin: 0 !important; @@ -322,73 +302,54 @@ a img { margin-left:25px; } -.ml30 { - margin-left:30px; -} +.ml30 {margin-left:30px;} +.ml35 {margin-left:35px;} +.ml45 {margin-left:45px;} -.ml35 { - margin-left:35px; -} +.mt5 {margin-top:5px;} +.mt10 {margin-top:10px;} +.mt15 {margin-top:15px;} +.mt20 {margin-top:20px;} +.mt25 {margin-top:25px;} +.mt30 {margin-top:30px;} +.mt35 {margin-top:35px;} +.mt40 {margin-top:40px;} +.mt45 {margin-top:45px;} +.mt50 {margin-top:50px;} +.mt55 {margin-top:55px;} +.mt65 {margin-top:65px;} -.ml45 { - margin-left:45px; -} +.mb5 {margin-bottom:5px;} +.mb15 {margin-bottom:15px;} -.mt5 { - margin-top:5px; -} +.w0 {width:0% !important} +.w5 {width:5% !important} +.w10 {width:10% !important} +.w15 {width:15% !important} +.w20 {width:20% !important} +.w25 {width:25% !important} +.w30 {width:30% !important} +.w35 {width:35% !important} +.w40 {width:40% !important} +.w45 {width:45% !important} +.w50 {width:50% !important} +.w55 {width:55% !important} +.w60 {width:60% !important} +.w65 {width:65% !important} +.w70 {width:70% !important} +.w75 {width:75% !important} +.w80 {width:80% !important} +.w85 {width:85% !important} +.w90 {width:90% !important} +.w95 {width:95% !important} +.w100 {width:100% !important} -.mt10 { - margin-top:10px; -} - -.mt15 { - margin-top:15px; -} - -.mt20 { - margin-top:20px; -} - -.mt25 { - margin-top:25px; -} - -.mt30 { - margin-top:30px; -} - -.mt35 { - margin-top:35px; -} - -.mt40 { - margin-top:40px; -} - -.mt45 { - margin-top:45px; -} - -.mt50 { - margin-top:50px; -} - -.mt55 { - margin-top:55px; -} - -.mt65 { - margin-top:65px; -} - -.mb5 { - margin-bottom:5px; -} - -.mb15 { - margin-bottom:15px; -} +.p5 {padding:5px !important} +.p10 {padding:10px !important} +.p15 {padding:15px !important} +.p20 {padding:20px !important} +.p25 {padding:25px !important} +.p30 {padding:30px !important} .op50 { opacity: .5; @@ -443,20 +404,16 @@ a img { width:239px; } -.white { - color:#fff; -} - -.lightgrey { - color:#ccc; -} - -.grey { - color:#999; -} - -.darkgrey { - color:#333; -} +.white {color:#fff;} +.lightgrey {color:#ccc;} +.grey {color:#999;} +.darkgrey {color:#333;} +.orange {color:#ED3618 !important;} +.teal {color:#2b8897;} +.green-fill {background-color:#72a43b;} +.gold-fill {background-color:#cc9900;} +.red-fill {background-color:#660000;} +.orange-fill {background-color:#ed3618;} +.teal-fill {background-color:#0b6672;} /* End of Jeff's common.css file */ diff --git a/web/app/assets/stylesheets/client/shareDialog.css.scss b/web/app/assets/stylesheets/client/shareDialog.css.scss new file mode 100644 index 000000000..7a7d32c3e --- /dev/null +++ b/web/app/assets/stylesheets/client/shareDialog.css.scss @@ -0,0 +1,11 @@ +@import 'widget.css.scss' + +h3 { + display: block; + font-size: 1.17em !important; + -webkit-margin-before: 1em; + -webkit-margin-after: 1em; + -webkit-margin-start: 0px; + -webkit-margin-end: 0px; + font-weight: bold; +} \ No newline at end of file diff --git a/web/app/assets/stylesheets/client/widget.css.scss b/web/app/assets/stylesheets/client/widget.css.scss new file mode 100644 index 000000000..23c82020d --- /dev/null +++ b/web/app/assets/stylesheets/client/widget.css.scss @@ -0,0 +1,185 @@ +body.widgets { + background:#fff; + padding:20px; +} + +.widget { + width:430px; + height:180px; + background:#353535; + border:solid 1px; + text-align:left; +} + +.widget.session { + border-color:#0b6672; +} + +.widget.recording { + border-color:#ed3618; +} + +.widget-header { + color:#fff; + font-size:17px; + padding:8px; +} + +.widget-content { + width:100%; + color:#ccc; + position:relative; +} + +.widget-avatar { + top:15px; + left:15px; + position:absolute; + padding:2px; + width:110px; + height:110px; + background-color:#ed3618; + -webkit-border-radius:57px; + -moz-border-radius:57px; + border-radius:57px; + margin-bottom:10px; +} + +.widget-avatar img { + width:110px; + height:110px; + -webkit-border-radius:55px; + -moz-border-radius:55px; + border-radius:55px; +} + +.widget-playbutton { + position:absolute; + top:55px; + left:55px; + width:35px; + height:31px; + background-image:url(../images/shared/play_button.png); + background-repeat:no-repeat; +} + +.widget-pausebutton { + position:absolute; + top:55px; + left:55px; + width:35px; + height:31px; + background-image:url(../images/shared/pause_button.png); + background-repeat:no-repeat; +} + +.widget-title { + font-size:18px; + position:absolute; + top:20px; + left:153px; + width:260px; + height:22px; + overflow:hidden; + white-space:nowrap; + text-overflow:ellipsis; +} + +.widget-description { + font-size:13px; + position:absolute; + top:15px; + left:153px; + width:260px; + height:32px; + overflow:hidden; + text-overflow:ellipsis; +} + +.widget-controls { + position:absolute; + top:25px; + left:153px; + width:270px; + height:32px; +} + +.widget-members { + position:absolute; + left:153px; + top:60px; + width:280px; + height:38px; + overflow:hidden; +} + +.widget-social { + position:absolute; + top:75px; + left:153px; + width:270px; + height:20px; + font-size:13px; +} + +.widget-branding { + position: absolute; + top: 110px; + right: 8px; + width: 270px; + height: 34px; + font-size: 13px; + text-align:right; +} + +.widget .recording-controls { + margin-top:0px; + height:22px; + padding:8px 5px; +} + +.widget .recording-playback { + width:65%; +} + +.widget .recording-position { + margin-left:-30px; + width:95%; +} + +.widget .recording-current { + top:8px; +} + +.widget a { + color:#ccc; + text-decoration:none; +} + +img.space { + margin-left:28px; +} + +.widget a:hover { + color:#fff; +} + +.widget-avatar-small { + float:left; + padding:1px; + width: 36px; + height:36px; + background-color:#ed3618; + -webkit-border-radius:18px; + -moz-border-radius:18px; + border-radius:18px; + margin-right:15px; +} + +.widget-avatar-small img { + width: 36px; + height: 36px; + -webkit-border-radius:18px; + -moz-border-radius:18px; + border-radius:18px; +} diff --git a/web/app/assets/stylesheets/web/web.css b/web/app/assets/stylesheets/web/web.css index 59db0c313..fb5b53926 100644 --- a/web/app/assets/stylesheets/web/web.css +++ b/web/app/assets/stylesheets/web/web.css @@ -7,6 +7,8 @@ *= require client/user_dropdown *= require client/dialog *= require client/invitationDialog +*= require client/shareDialog +*= require client/widget *= require web/main *= require web/footer *= require web/recordings diff --git a/web/app/views/clients/_session.html.erb b/web/app/views/clients/_session.html.erb index 308178ef1..43085a35b 100644 --- a/web/app/views/clients/_session.html.erb +++ b/web/app/views/clients/_session.html.erb @@ -18,7 +18,7 @@ <%= image_tag "content/icon_settings_sm.png", {:align => "texttop", :height => 12, :width => 12} %> SETTINGS - + <%= image_tag "content/icon_share.png", {:align => "texttop", :height => 12, :width => 12} %> SHARE @@ -137,6 +137,7 @@ <%= render "addNewGear" %> <%= render "error" %> <%= render "sessionSettings" %> +<%= render "shareDialog" %>