diff --git a/web/app/assets/javascripts/checkout_order.js b/web/app/assets/javascripts/checkout_order.js index eeee5d74b..523c02691 100644 --- a/web/app/assets/javascripts/checkout_order.js +++ b/web/app/assets/javascripts/checkout_order.js @@ -34,12 +34,12 @@ function beforeShow() { - beforeShowOrder(); + } function afterShow(data) { - + beforeShowOrder(); } @@ -63,6 +63,7 @@ $noAccountInfoPrompt.addClass('hidden') $orderPanel.removeClass("hidden") $thanksPanel.addClass("hidden") + $purchasedJamTrackHeader.attr('status', 'in-progress') $screen.find(".place-order").addClass('disabled').off('click', placeOrder) $("#order_error").text('').addClass("hidden") step = 3; @@ -305,7 +306,7 @@ } else { logger.debug("done iterating over purchased JamTracks") - $purchasedJamTrackHeader.text('All purchased JamTracks have been downloaded successfully! You can now play them in a session.') + $purchasedJamTrackHeader.attr('status', 'done') } } diff --git a/web/app/assets/stylesheets/client/checkout.css.scss b/web/app/assets/stylesheets/client/checkout.css.scss index c6cb6a34d..9aa7d1040 100644 --- a/web/app/assets/stylesheets/client/checkout.css.scss +++ b/web/app/assets/stylesheets/client/checkout.css.scss @@ -68,6 +68,22 @@ .purchased-jam-track-header { font-size: 15px; margin-bottom:10px; + + span { + display:none; + } + + &[status="in-progress"] { + span.in-progress-msg { + display:inline; + } + } + + &[status="done"] { + span.done-msg { + display:inline; + } + } } ul.purchased-list { diff --git a/web/app/views/clients/_checkout_order.html.slim b/web/app/views/clients/_checkout_order.html.slim index 4aacb4d58..795e9f715 100644 --- a/web/app/views/clients/_checkout_order.html.slim +++ b/web/app/views/clients/_checkout_order.html.slim @@ -42,7 +42,9 @@ div layout="screen" layout-id="checkoutOrder" id="checkoutOrderScreen" class="sc .download-jamkazam | Click Here to Get the Free JamKazam Application .thanks-detail.purchased-jam-track.hidden - h2.purchased-jam-track-header Downloading Your Purchased JamTracks + h2.purchased-jam-track-header status="in-progress" + span.in-progress-msg Downloading Your Purchased JamTracks + 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. diff --git a/web/spec/features/checkout_spec.rb b/web/spec/features/checkout_spec.rb index 56a363041..53163d0aa 100644 --- a/web/spec/features/checkout_spec.rb +++ b/web/spec/features/checkout_spec.rb @@ -614,7 +614,7 @@ describe "Checkout", :js => true, :type => :feature, :capybara_feature => true d find('h1', text: 'shopping cart') find('.cart-item-caption', text: "JamTrack: #{jamtrack_acdc_backinblack.name}") find('.cart-item-price', text: "$ #{0.00}") # 1st one is free! - find('.shopping-sub-total', text:"Subtotal: $ 0.00") + find('.shopping-sub-total', text:"Subtotal:$ 0.00") # attempt to checkout find('a.button-orange', text: 'PROCEED TO CHECKOUT').trigger(:click) @@ -707,7 +707,7 @@ describe "Checkout", :js => true, :type => :feature, :capybara_feature => true d find('h1', text: 'shopping cart') find('.cart-item-caption', text: "JamTrack: #{jamtrack_pearljam_evenflow.name}") find('.cart-item-price', text: "$ #{jamtrack_pearljam_evenflow.price}") - find('.shopping-sub-total', text:"Subtotal: $ #{jamtrack_pearljam_evenflow.price}") + find('.shopping-sub-total', text:"Subtotal:$ #{jamtrack_pearljam_evenflow.price}") # attempt to checkout find('a.button-orange', text: 'PROCEED TO CHECKOUT').trigger(:click) @@ -761,7 +761,7 @@ describe "Checkout", :js => true, :type => :feature, :capybara_feature => true d find('h1', text: 'shopping cart') find('.cart-item-caption', text: "JamTrack: #{jamtrack_acdc_backinblack.name}") find('.cart-item-price', text: "$ #{0.00}") # 1st one is free! - find('.shopping-sub-total', text:"Subtotal: $ 0.00") + find('.shopping-sub-total', text:"Subtotal:$ 0.00") # attempt to checkout find('a.button-orange', text: 'PROCEED TO CHECKOUT').trigger(:click) @@ -819,7 +819,7 @@ describe "Checkout", :js => true, :type => :feature, :capybara_feature => true d find('h1', text: 'shopping cart') find('.cart-item-caption', text: "JamTrack: #{jamtrack_acdc_backinblack.name}") find('.cart-item-price', text: "$ #{0.00}") # 1st one is free! - find('.shopping-sub-total', text:"Subtotal: $ 0.00") + find('.shopping-sub-total', text:"Subtotal:$ 0.00") # attempt to checkout find('a.button-orange', text: 'PROCEED TO CHECKOUT').trigger(:click)