diff --git a/ruby/lib/jam_ruby/models/user.rb b/ruby/lib/jam_ruby/models/user.rb index ce60126ee..7af848254 100644 --- a/ruby/lib/jam_ruby/models/user.rb +++ b/ruby/lib/jam_ruby/models/user.rb @@ -652,7 +652,7 @@ module JamRuby # throws ActiveRecord::RecordNotFound if instrument is invalid # throws an email delivery error if unable to connect out to SMTP - def self.signup(first_name, last_name, email, password, password_confirmation, terms_of_service, subscribe_email, + def self.signup(first_name, last_name, email, password, password_confirmation, terms_of_service, location, instruments, birth_date, musician, photo_url, invited_user, signup_confirm_url) user = User.new @@ -660,7 +660,7 @@ module JamRuby user.first_name = first_name user.last_name = last_name user.email = email - user.subscribe_email = subscribe_email + user.subscribe_email = true user.terms_of_service = terms_of_service user.musician = musician diff --git a/web/app/assets/javascripts/accounts.js b/web/app/assets/javascripts/accounts.js index 50a79821b..c01cb12ed 100644 --- a/web/app/assets/javascripts/accounts.js +++ b/web/app/assets/javascripts/accounts.js @@ -91,12 +91,12 @@ function navToEditIdentity() { resetForm() - window.location = '#/account/identity' + window.location = '/client#/account/identity' } function navToEditProfile() { resetForm() - window.location = '#/account/profile' + window.location = '/client#/account/profile' } function navToEditSubscriptions() { @@ -109,7 +109,7 @@ function navToEditAudio() { resetForm() - window.location = "#/account/audio" + window.location = "/client#/account/audio" } // handle update avatar event diff --git a/web/app/assets/javascripts/accounts_identity.js b/web/app/assets/javascripts/accounts_identity.js index 27f71ec2f..66a1d80a6 100644 --- a/web/app/assets/javascripts/accounts_identity.js +++ b/web/app/assets/javascripts/accounts_identity.js @@ -74,7 +74,7 @@ function navToAccount() { resetForm(); - window.location = '#/account'; + window.location = '/client#/account'; } function handleUpdateEmail() { diff --git a/web/app/assets/javascripts/accounts_profile.js b/web/app/assets/javascripts/accounts_profile.js index 97f563159..25716900d 100644 --- a/web/app/assets/javascripts/accounts_profile.js +++ b/web/app/assets/javascripts/accounts_profile.js @@ -38,7 +38,8 @@ last_name: userDetail.last_name, user_instruments: userDetail.instruments, birth_date : userDetail.birth_date, - gender: userDetail.gender + gender: userDetail.gender, + subscribe_email: userDetail.subscribe_email ? "checked=checked" : "" }); var content_root = $('#account-profile-content-scroller') @@ -263,12 +264,12 @@ function navToAccount() { resetForm(); - window.location = '#/account'; + window.location = '/client#/account'; } function navToAvatar() { resetForm(); - window.location = '#/account/profile/avatar'; + window.location = '/client#/account/profile/avatar'; } function handleUpdateProfile() { @@ -280,11 +281,12 @@ var city = getCityElement().val(); var firstName = getFirstNameElement().val(); var lastName = getLastNameElement().val(); - var gender = getGenderElement().val() + var gender = getGenderElement().val(); + var subscribeEmail = getSubscribeEmail().is(':checked'); var birthDate = getBirthDate(); var instruments = getInstrumentsValue(); - postUpdateProfile({ + api.updateUser({ country: country, state: region, city: city, @@ -292,25 +294,13 @@ last_name: lastName, gender: gender, birth_date: birthDate, - instruments: instruments + instruments: instruments, + subscribe_email: subscribeEmail }) .done(postUpdateProfileSuccess) .fail(postUpdateProfileFailure) } - function postUpdateProfile(options) { - - var url = "/api/users/" + context.JK.currentUserId; - return $.ajax({ - type: "POST", - dataType: "json", - contentType: 'application/json', - url: url, - data: JSON.stringify(options), - processData: false - }); - } - function postUpdateProfileSuccess(response) { app.notify( { title: "Profile Changed", @@ -332,6 +322,7 @@ var city = context.JK.format_errors("city", errors); var birth_date = context.JK.format_errors("birth_date", errors); var gender = context.JK.format_errors("birth_date", errors); + var subscribeEmail = context.JK.format_errors("subscribe_email", errors); var instruments = context.JK.format_errors("musician_instruments", errors) if(first_name != null) { @@ -358,6 +349,10 @@ getYearElement().closest('div.field').addClass('error').end().after(birth_date); } + if(subscribeEmail != null) { + getSubscribeEmail().closest('div.field').addClass('error').end().after(subscribeEmail); + } + if(gender != null) { getGenderElement().closest('div.field').addClass('error').end().after(gender); } @@ -480,6 +475,10 @@ return $('#account-profile-content-scroller select#user_birth_date_1i'); } + function getSubscribeEmail() { + return $('#account-profile-content-scroller input[name=subscribe_email]'); + } + function getInstrumentsElement() { return $('#account-profile-content-scroller .instrument_selector'); } diff --git a/web/app/assets/javascripts/accounts_profile_avatar.js b/web/app/assets/javascripts/accounts_profile_avatar.js index d656577bc..4d574f102 100644 --- a/web/app/assets/javascripts/accounts_profile_avatar.js +++ b/web/app/assets/javascripts/accounts_profile_avatar.js @@ -139,7 +139,7 @@ function navToEditProfile() { resetForm(); - window.location = '#/account/profile' + window.location = '/client#/account/profile' } function renderAvatarSpinner() { diff --git a/web/app/assets/stylesheets/client/account.css.scss b/web/app/assets/stylesheets/client/account.css.scss index 7b561c21a..9bf531c39 100644 --- a/web/app/assets/stylesheets/client/account.css.scss +++ b/web/app/assets/stylesheets/client/account.css.scss @@ -41,12 +41,14 @@ min-width: 165px; width: 20%; } + .account-left h2 { color: #FFFFFF; font-size: 23px; font-weight: 400; margin-bottom: 8px; } + .account-mid { float: left; line-height: 150%; @@ -54,6 +56,29 @@ width: 50%; } + .account-profile { + padding-top:25px; + + h2 { + margin-bottom:15px; + } + + .location { + position:relative; + } + + #account-change-avatar { + position:absolute; + top:-25px; + right:80px; + height:13px; + } + + .birth_date { + margin-left:40px; + } + } + .audio .audio-profiles-short{ white-space: normal; } diff --git a/web/app/assets/stylesheets/client/content.css.scss b/web/app/assets/stylesheets/client/content.css.scss index 4a64acd85..228a6edf2 100644 --- a/web/app/assets/stylesheets/client/content.css.scss +++ b/web/app/assets/stylesheets/client/content.css.scss @@ -342,7 +342,7 @@ ul.shortcuts { .tagline { font-size:30px; - margin-top:55px; + margin-top:35px; color:#ed3718; font-weight:300; width:345px; diff --git a/web/app/assets/stylesheets/landing/simple_landing.css.scss b/web/app/assets/stylesheets/landing/simple_landing.css.scss index 801064534..07020e0a0 100644 --- a/web/app/assets/stylesheets/landing/simple_landing.css.scss +++ b/web/app/assets/stylesheets/landing/simple_landing.css.scss @@ -175,76 +175,3 @@ strong { display:block; } } - -// all custom CSS for the register page goes here -.register-page { - .register-container { - padding:10px; - } - - input.register-musician { - - } - - .error { - padding: 5px 12px 5px 5px; - margin-left:-5px; - margin-right:-12px; - } - - input.register-fan { - margin-left:20px; - } - - input[type=text], input[type=password] { - margin-top:1px; - width:100%; - } - - select { - width:100%; - } - - - .right-side { - margin-left:25px; - } - - .ftue-left { - margin-bottom:30px; - - select { - width:104%; - } - - div.field { - margin-top:31px; - width:43%; - float:left; - } - } - - .ftue-right { - - table { - border-collapse:separate; - border-spacing:6px; - } - - label.instruments { - margin-bottom:2px; - } - - div.field { - margin-top:15px; - } - - a.tos { - text-decoration: underline; - } - - input[type=submit] { - margin-top:20px; - } - } -} \ No newline at end of file diff --git a/web/app/assets/stylesheets/web/footer.css.scss b/web/app/assets/stylesheets/web/footer.css.scss index cb21e75e0..df599b11b 100644 --- a/web/app/assets/stylesheets/web/footer.css.scss +++ b/web/app/assets/stylesheets/web/footer.css.scss @@ -2,10 +2,9 @@ #footer-container { position:relative; - width:1100px; - top:20px; + margin:0 6%; + top:100px; height:13px; - } #footer { diff --git a/web/app/assets/stylesheets/web/main.css.scss b/web/app/assets/stylesheets/web/main.css.scss index 74d4cda0b..b9622093b 100644 --- a/web/app/assets/stylesheets/web/main.css.scss +++ b/web/app/assets/stylesheets/web/main.css.scss @@ -3,7 +3,6 @@ html { } body.web { - background-image: url(../web/bkg_home.gif); background-repeat: repeat-x; margin:0 !important; padding:0 !important; @@ -12,26 +11,12 @@ body.web { width:auto !important; #web-container { - padding:3% 6%; + padding:3% 0; } + div.wrapper { - width: 1100px; - margin: 0 auto; white-space: nowrap; - } - .logo-home { - width: 298px; - margin-top: 30px; - display: inline-block; - float:left; - } - - #profile { - margin-top: 25px; - } - - #landing-inner { p, ul { color:#999; line-height:160%; @@ -40,7 +25,153 @@ body.web { white-space:normal; font-size:16px; } + + h2 { + font-weight:300; + } + + .content-wrapper { + border-bottom: medium none; + padding: 0; + } + + .black-bar{ + position:relative; + width:100%; + min-height: 366px; + background-color:black; + padding-top:20px; + } + + .black-bar-inner { + width:1100px; + margin: 0 auto; + + position:relative; + + // all custom CSS for the register page goes here + .register-page { + + .register-container { + padding:10px; + } + + input.register-musician { + + } + + .actions { + margin-top:20px; + + a.button-grey { + line-height:15px; // WHY is this not universal + } + } + + + .error { + padding: 5px 12px 5px 5px; + margin-left:-5px; + margin-right:-12px; + } + + input.register-fan { + margin-left:20px; + } + + input[type=text], input[type=password] { + margin-top:1px; + width:100%; + } + + select { + width:100%; + } + + + .right-side { + margin-left:25px; + } + + + .register-left { + + select { + width:104%; + } + + div.field { + margin-top:31px; + width:43%; + float:left; + } + } + + .register-right { + + margin-top:40px; + + table { + border-collapse:separate; + border-spacing:6px; + } + + label.instruments { + margin-bottom:2px; + } + + div.field { + margin-top:15px; + } + + a.tos { + text-decoration: underline; + } + + .ftue-instrumentlist { + width:100%; + } + } + } + } + + .after-black-bar { + position:relative; + background-color:#262626; + width:1100px; + margin:0 auto; + + .after-black-bar-inner { + background-color:#262626; + position:absolute; + left:0; + right:0; + } + } } + + .header { + width:1100px; + margin:0 auto; + + .logo-home { + width: 298px; + margin-top: 30px; + display: inline-block; + float:left; + } + } + + #profile { + position:absolute; + top:-80px; + right:0; + + ul { + margin-bottom:0; + } + } + ul { list-style: none outside none; } @@ -62,7 +193,7 @@ body.web { } .system-requirements { - margin-top:75px; + margin-top:35px; display:none; ul { @@ -233,76 +364,3 @@ strong { display:block; } } - -// all custom CSS for the register page goes here -.register-page { - .register-container { - padding:10px; - } - - input.register-musician { - - } - - .error { - padding: 5px 12px 5px 5px; - margin-left:-5px; - margin-right:-12px; - } - - input.register-fan { - margin-left:20px; - } - - input[type=text], input[type=password] { - margin-top:1px; - width:100%; - } - - select { - width:100%; - } - - - .right-side { - margin-left:25px; - } - - .ftue-left { - margin-bottom:30px; - - select { - width:104%; - } - - div.field { - margin-top:31px; - width:43%; - float:left; - } - } - - .ftue-right { - - table { - border-collapse:separate; - border-spacing:6px; - } - - label.instruments { - margin-bottom:2px; - } - - div.field { - margin-top:15px; - } - - a.tos { - text-decoration: underline; - } - - input[type=submit] { - margin-top:20px; - } - } -} \ No newline at end of file diff --git a/web/app/controllers/api_users_controller.rb b/web/app/controllers/api_users_controller.rb index f463da6d3..3ee708c40 100644 --- a/web/app/controllers/api_users_controller.rb +++ b/web/app/controllers/api_users_controller.rb @@ -66,6 +66,7 @@ class ApiUsersController < ApiController @user.musician = params[:musician] if params.has_key?(:musician) @user.update_instruments(params[:instruments].nil? ? [] : params[:instruments]) if params.has_key?(:instruments) @user.show_whats_next = params[:show_whats_next] if params.has_key?(:show_whats_next) + @user.subscribe_email = params[:subscribe_email] if params.has_key?(:subscribe_email) @user.save diff --git a/web/app/controllers/clients_controller.rb b/web/app/controllers/clients_controller.rb index f7a96de70..03b83ac88 100644 --- a/web/app/controllers/clients_controller.rb +++ b/web/app/controllers/clients_controller.rb @@ -3,6 +3,14 @@ class ClientsController < ApplicationController include UsersHelper def index + + # we want to enforce that /client is always the client view prefix + # this is a side effect of setting root path to '/'; soon we can remove this when we implement the new home page + if request.path == '/' + redirect_to client_url + return + end + # use gon to pass variables into javascript gon.websocket_gateway_uri = Rails.application.config.websocket_gateway_uri gon.check_for_client_updates = Rails.application.config.check_for_client_updates diff --git a/web/app/controllers/users_controller.rb b/web/app/controllers/users_controller.rb index 846bce02b..fea60764b 100644 --- a/web/app/controllers/users_controller.rb +++ b/web/app/controllers/users_controller.rb @@ -22,6 +22,11 @@ class UsersController < ApplicationController end def new + if current_user + redirect_to :root + return + end + @invited_user = load_invited_user(params) if !@invited_user.nil? && @invited_user.accepted @@ -41,10 +46,14 @@ class UsersController < ApplicationController @user.email = @invited_user.email end - render :layout => 'landing' + render :layout => 'web' end def create + if current_user + redirect_to :root + return + end @invited_user = load_invited_user(params) @signup_postback = load_postback(@invited_user) @@ -53,7 +62,7 @@ class UsersController < ApplicationController # check recaptcha; if any errors seen, contribute it to the model unless verify_recaptcha(:model => @user, :message => "recaptcha") - render 'new', :layout => 'landing' + render 'new', :layout => 'web' return end @@ -73,7 +82,6 @@ class UsersController < ApplicationController params[:jam_ruby_user][:password], params[:jam_ruby_user][:password_confirmation], terms_of_service, - subscribe_email, instruments, birth_date, location, @@ -88,7 +96,7 @@ class UsersController < ApplicationController load_location(request.remote_ip, location) gon.signup_errors = true gon.musician_instruments = instruments - render 'new', :layout => 'landing' + render 'new', :layout => 'web' else sign_in @user diff --git a/web/app/views/api_users/show.rabl b/web/app/views/api_users/show.rabl index e54a66772..99394b57b 100644 --- a/web/app/views/api_users/show.rabl +++ b/web/app/views/api_users/show.rabl @@ -1,10 +1,10 @@ object @user -attributes :id, :first_name, :last_name, :name, :city, :state, :country, :location, :online, :photo_url, :musician, :gender, :birth_date, :internet_service_provider, :friend_count, :liker_count, :like_count, :band_like_count, :follower_count, :following_count, :band_following_count, :recording_count, :session_count, :show_whats_next +attributes :id, :first_name, :last_name, :name, :city, :state, :country, :location, :online, :photo_url, :musician, :gender, :birth_date, :internet_service_provider, :friend_count, :liker_count, :like_count, :band_like_count, :follower_count, :following_count, :band_following_count, :recording_count, :session_count # give back more info if the user being fetched is yourself if @user == current_user - attributes :email, :original_fpfile, :cropped_fpfile, :crop_selection, :session_settings + attributes :email, :original_fpfile, :cropped_fpfile, :crop_selection, :session_settings, :show_whats_next, :subscribe_email end unless @user.friends.nil? || @user.friends.size == 0 diff --git a/web/app/views/clients/_account_profile.html.erb b/web/app/views/clients/_account_profile.html.erb index bbd0e8be7..9a851ca1b 100644 --- a/web/app/views/clients/_account_profile.html.erb +++ b/web/app/views/clients/_account_profile.html.erb @@ -22,100 +22,86 @@ diff --git a/web/app/views/layouts/web.erb b/web/app/views/layouts/web.erb index 54504c649..6d439faf6 100644 --- a/web/app/views/layouts/web.erb +++ b/web/app/views/layouts/web.erb @@ -21,55 +21,59 @@
-
+
-
- <%= link_to root_path do %> - <%= image_tag("web/logo_home.png", :alt => "JamKazam logo", :size => "298x54") %> - <% end %> -
- - <%= render "users/user_dropdown" %> - - -
- -
- <%= yield %> -
- - - - -
- -<%= render "clients/invitationDialog" %> - - +
+ <%= yield(:after_black_bar) %> +
+ + +
+ + <%= render "clients/invitationDialog" %> + +
diff --git a/web/app/views/users/_downloads.html.erb b/web/app/views/users/_downloads.html.erb index a2e8b075d..4e1e206a8 100644 --- a/web/app/views/users/_downloads.html.erb +++ b/web/app/views/users/_downloads.html.erb @@ -3,7 +3,7 @@
- + <
@@ -12,7 +12,7 @@
- +<% content_for :after_black_bar do %>

SYSTEM REQUIREMENTS:


A short summary of requirements follows. For a more detailed explanation of system requirements, please review our Minimum System Requirements knowledgebase article.

@@ -22,14 +22,20 @@
  • Ethernet port for Internet (we strongly advise that you not use Wi-Fi)
  • 74MB hard disk space for app, plus any space needed for recordings
  • Audio interface (best to use an audio interface device that gets your music into your computer, else can use built-in mic & headphones on your computer to get started)
  • -
  • Broadband Internet services with 1Mbps uplink bandwidth
  • +
  • Broadband Internet service with 1Mbps uplink bandwidth
  • +<%end%> <%= render "users/download_templates" %> \ No newline at end of file diff --git a/web/app/views/users/_user_dropdown.html.erb b/web/app/views/users/_user_dropdown.html.erb index 8d1df1a5c..59f086bb4 100644 --- a/web/app/views/users/_user_dropdown.html.erb +++ b/web/app/views/users/_user_dropdown.html.erb @@ -13,12 +13,12 @@