facebook page link and logging

This commit is contained in:
Peter Cottle 2013-07-27 15:05:23 -07:00
parent 740a94ccf6
commit af3d440874
10 changed files with 59 additions and 7 deletions

View file

@ -760,9 +760,18 @@ var MainHelperBar = HelperBar.extend({
}, {
icon: 'globe',
id: 'intl'
}, {
newPageLink: true,
icon: 'facebook',
id: 'fb',
href: 'https://www.facebook.com/LearnGitBranching'
}];
},
onFbClick: function() {
log.viewInteracted('fbPageLink');
},
onIntlClick: function() {
this.showDeferMe(this.intlHelper);
log.viewInteracted('openIntlBar');

View file

@ -27,7 +27,8 @@ exports.levelSequences = {
]
};
if (window.location && window.location.href.indexOf('showRemote') !== -1) {
if (typeof window !== 'undefined' && window.location &&
window.location.href.indexOf('showRemote') !== -1) {
exports.levelSequences.remote = [
require('../../levels/remote/clone').level
];

View file

@ -549,6 +549,8 @@ li.rebaseEntry,
.helperBar a {
cursor: pointer;
color: white;
text-decoration: none;
font-style: italic;
}
@ -557,6 +559,10 @@ li.rebaseEntry,
font-style: normal;
}
.helperBar a:last-child {
padding-right: 10px;
}
.helperBar a:last-child:after {
content: '';
}

View file

@ -116,6 +116,11 @@
<% for(var i = 0; i < items.length; i++) { %>
<% if (items[i].text) { %>
<a data-id="<%= items[i].id %>"><%= items[i].text %></a>
<% } else if (items[i].newPageLink) { %>
<a data-id="<%= items[i].id %>"
target="_blank" href="<%= items[i].href %>">
<i data-id="<%= items[i].id %>" class="icon-<%= items[i].icon %>"></i>
</a>
<% } else { %>
<a data-id="<%= items[i].id %>">
<i data-id="<%= items[i].id %>" class="icon-<%= items[i].icon %>"></i>