* fix facebook signup issues VRFS-3253

This commit is contained in:
Seth Call 2015-05-15 16:01:39 -05:00
parent eba9afab04
commit 2c6a5fe81a
6 changed files with 14 additions and 11 deletions

View File

@ -230,8 +230,8 @@
try {
cookie = JSON.parse(cookie)
context.JK.signup = {}
context.JK.signup = cookie
context.JK.signupData = {}
context.JK.signupData = cookie
$(function() {
// ga() object isn't ready until the page is loaded

View File

@ -98,11 +98,10 @@
}
})
}
function onClickSignupFacebook() {
function onClickSignupFacebook(e) {
// tos must already be clicked
var $btn = $(e.target)
$btn.addClass('disabled')
$btnFacebook.addClass('disabled')
var $field = $termsOfServiceL.closest('.field')
$field.find('.error-text').remove()
@ -113,13 +112,13 @@
rest.createSignupHint({redirect_location: '/client#/redeemComplete'})
.done(function() {
// send the user on to facebook signin
window.location = $btn.attr('href');
window.location = $btnFacebook.attr('href');
})
.fail(function() {
app.notify({text:"Facebook Signup is not working properly"});
})
.always(function() {
$btn.removeClass('disabled')
$btnFacebook.removeClass('disabled')
})
}
else {

View File

@ -13,7 +13,6 @@
h2 {
color:white;
background-color:#4d4d4d;
font-weight:normal;
margin: 0 0 10px 0;
font-size:14px;
@ -22,6 +21,10 @@
line-height: 14px;
vertical-align: middle;
text-align:left;
&.purchased-jam-track-header {
background-color:#4d4d4d;
}
}
.action-bar {

View File

@ -147,6 +147,9 @@ class SessionsController < ApplicationController
new_user(user, signup_hint)
redirect_to signup_hint.redirect_location
return
else
redirect_to "#{signup_path}?facebook_signup=#{fb_signup.lookup_id}"
return
end
else
redirect_to "#{signup_path}?facebook_signup=#{fb_signup.lookup_id}"

View File

@ -35,8 +35,6 @@ div layout="screen" layout-id="redeemComplete" id="redeemCompleteScreen" class="
h2.purchased-jam-track-header status="in-progress"
span.in-progress-msg Downloading Your JamTrack
span.done-msg All purchased JamTracks have been downloaded successfully! You can now play them in a session.
span Each JamTrack will be downloaded sequentially.
br
span.notice Note that you do not have to wait for this to complete in order to use your JamTrack later.
br.clear
ul.purchased-list

View File

@ -69,7 +69,7 @@ javascript:
confirmOrder(data.app);
})
}
else if(window.JK.signup && window.JK.signup.want_jamblaster) {
else if(window.JK.signupData && window.JK.signupData.want_jamblaster) {
// if the user has come here as a result of a signup attempt, and if they indicated that they want the jamblaster, tell em it's done
promptConfirmed(data.app)
}