VRFS-4118 - pulse side box

This commit is contained in:
Seth Call 2016-05-24 21:05:31 -05:00
parent 782f329947
commit 9212804eae
3 changed files with 13 additions and 4 deletions

View File

@ -188,7 +188,7 @@ module JamRuby
unless tracks.nil?
tracks.each do |track|
t = Track.new
t.instrument = Instrument.find(track["instrument_id"])
t.instrument = Instrument.find_by_id(track["instrument_id"]) || Instrument.find('acoustic guitar')
t.connection = self
t.sound = track["sound"]
t.client_track_id = track["client_track_id"]

View File

@ -81,6 +81,10 @@
}
}
function subtlePulse($element) {
$element.find('.bt-content').pulse({'background-color' : '#868686'}, {pulses: 3}, function() { $element.css('background-color', '#980006')})
}
helpBubble.rotateJamTrackLandingBubbles = function($preview, $video, $ctaButton, $alternativeCta) {
$(window).on('load', function() {
setTimeout(function() {
@ -198,7 +202,8 @@
helpBubble.showBuyTestDrive = function($element, $offsetParent, user, callback) {
return context.JK.onceBubble($element, 'side-buy-test-drive', user, {offsetParent:$offsetParent, width:260, positions:['right'], postShow: function(container) {
var $bookNow = $('a.book-now')
subtlePulse(container)
var $bookNow = container('a.book-now')
$bookNow.off('click').on('click', function(e) {
e.preventDefault()
callback()
@ -209,6 +214,7 @@
helpBubble.showBuyNormalLesson = function($element, $offsetParent, user, callback) {
return context.JK.onceBubble($element, 'side-buy-normal-lesson', user, {offsetParent:$offsetParent, width:260, positions:['right'], postShow: function(container) {
subtlePulse(container)
var $bookNow = container.find('a.book-now')
$bookNow.off('click').on('click', function(e) {
e.preventDefault()
@ -220,8 +226,8 @@
helpBubble.didntFindTeacher = function($element, $offsetParent, user, callback) {
return context.JK.onceBubble($element, 'side-didnt-find-teacher', user, {offsetParent:$offsetParent, width:260, positions:['right'], postShow: function(container) {
subtlePulse(container)
var $bookNow = container.find('a.post-help')
console.log("container", $bookNow)
$bookNow.off('click').on('click', function(e) {
e.preventDefault()
callback(container.find('.note').val(), container.find('.email').val(), container.find('.phonenumber').val())

View File

@ -102,7 +102,10 @@ proficiencyDescriptionMap = {
showSideBubbleWhenReady: () ->
if @user? && @state.user?
if @visible
@showSideBubble()
setTimeout((() => (
if @visible
@showSideBubble()
)), 5000)
beforeHide: (e) ->
@visible = false