Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Anthony Davis 2014-05-12 23:17:18 -05:00
commit fc35f0ad9d
7 changed files with 42 additions and 8 deletions

View File

@ -49,8 +49,8 @@
<table align="center" width="650" cellpadding="10" bgcolor="#156572" cellspacing="0">
<tr>
<td align="center" valign="top">
<% [:twitter, :facebook, :google].each do |src| %>
<%= link_to(image_tag("http://www.jamkazam.com/assets/content/icon_#{src}.png", :style => "vertical-align:top"), "http://www.jamkazam.com/endorse/@USERID/#{src}") %>&nbsp;
<% [:twitter, :facebook, :google].each do |site| %>
<%= link_to(image_tag("http://www.jamkazam.com/assets/content/icon_#{site}.png", :style => "vertical-align:top"), "http://www.jamkazam.com/endorse/@USERID/#{site}?src=email") %>&nbsp;
<% end %>
</td>
</tr>

View File

@ -13,7 +13,7 @@ module JamRuby
VAR_LAST_NAME = '@LASTNAME'
DEFAULT_SENDER = "noreply@jamkazam.com"
BATCH_SIZE = 5
BATCH_SIZE = 500
BODY_TEMPLATE =<<FOO
Hello #{VAR_FIRST_NAME},

View File

@ -79,7 +79,10 @@
band : 'Band',
fan : 'Fan',
recording : 'Recording',
session : 'Session'
session : 'Session',
facebook: 'facebook',
twitter: 'twitter',
google: 'google',
};
var categories = {
@ -271,11 +274,11 @@
context.ga('send', 'event', categories.band, bandAction);
}
function trackJKSocial(category, target) {
function trackJKSocial(category, target, data) {
assertOneOf(category, categories);
assertOneOf(target, jkSocialTargets);
context.ga('send', 'event', category, target);
context.ga('send', 'event', category, target, data);
}

View File

@ -608,7 +608,10 @@
};
context.JK.clientType = function () {
return context.jamClient.IsNativeClient() ? 'client' : 'browser';
if (context.jamClient) {
return context.jamClient.IsNativeClient() ? 'client' : 'browser';
}
return 'browser';
}
/**
* Returns 'MacOSX' if the os appears to be macintosh,

View File

@ -13,6 +13,12 @@ body.web {
}
}
}
.share_links {
position: absolute;
top: 116px;
left: 1100px;
z-index: 10;
}
.buzz {
width: 300px;

View File

@ -386,7 +386,19 @@ class UsersController < ApplicationController
elsif 'google'==service
url = "https://plus.google.com/share?url=#{url}"
end
redirect_to url
if 'email'==params[:src]
js =<<JS
<script type="text/javascript">
$(function() {
JK.GA.trackJKSocial(JK.GA.Categories.jkLike, '#{service}', 'email');
window.location = "#{url}";
});
</script>
JS
render :inline => js, :layout => 'landing'
else
redirect_to url
end
end
private

View File

@ -5,6 +5,10 @@
= link_to image_tag("web/cta_button.png", :alt => "Sign up now for your free account!"), signup_path, class: "signup", id: "signup"
.clearleft
= link_to "Already have an account?", signin_path, class: "signin", id: "signin"
.share_links
- [:twitter, :facebook, :google].each do |site|
= link_to(image_tag("content/icon_#{site}.png", :style => "vertical-align:top"), "javascript:void(0)", {'data-site' => site, :class => 'like-link'})
= ' '
- content_for :after_black_bar do
- if @jamfest_2014
@ -24,6 +28,12 @@
:javascript
$(function () {
window.JK.WelcomePage();
$('.like-link').click(function() {
var like_site = $(this).data('site');
JK.GA.trackJKSocial(JK.GA.Categories.jkLike, like_site, JK.clientType());
window.open("/endorse/0/"+like_site, '_blank');
});
})
- content_for :extra_dialogs do