* fix bug in ability to open JamTrack

This commit is contained in:
Seth Call 2015-05-15 15:30:15 -05:00
parent 8e7ebcf3d6
commit eba9afab04
4 changed files with 5 additions and 5 deletions

View File

@ -89,7 +89,7 @@
rest.openJamTrack({id: context.JK.CurrentSessionModel.id(), jam_track_id: jamTrack.id})
.done(function(response) {
$dialog.data('result', {success:true, jamTrack: jamTrack})
context.JK.CurrentSessionModel.updateSession(response);s
context.JK.CurrentSessionModel.updateSession(response);
app.layout.closeDialog('open-jam-track-dialog');
})
.fail(function(jqXHR) {

View File

@ -140,9 +140,8 @@
$jamTrackInBrowser.removeClass('hidden');
app.user().done(function(user) {
// cut off time
var cutoff = new Date("May 8, 2015 00:00:00");
if(new Date(user.created_at).getTime() < cutoff.getTime()) {
// relative to 1 day ago (24 * 60 * 60 * 1000)
if(new Date(user.created_at).getTime() < new Date().getTime() - 86400000) {
logger.debug("existing user recorded")
context.JK.GA.virtualPageView('/redeemInBrowserExistingUser');
}

View File

@ -95,6 +95,7 @@ module SessionsHelper
redirect_location = signup_hint.redirect_location
end
cookies[:new_user] = { musician: user.musician, registrationType: user.user_authorization('facebook') ? 'Facebook' : 'Native', want_jamblaster: want_jamblaster, redirect_location: redirect_location }.to_json
end

View File

@ -52,7 +52,7 @@ describe "Product Pages", :js => true, :type => :feature, :capybara_feature => t
click_button "SIGN IN"
end
# should be back at the jamblaster product page, and told we placed our order
# should be back loat the jamblaster product page, and told we placed our order
find('h1', text: 'The JamBlaster by JamKazam')
find('#banner h1', text: 'virtual order placed')