fix(sharing): Needed return object

This commit is contained in:
Sabe Jones
2015-10-22 15:08:04 -04:00
parent e2cfd1bd54
commit 152fb72899
4 changed files with 16 additions and 9 deletions

View File

@@ -33,9 +33,6 @@ function($scope, $rootScope, User, $http, Notification, ApiUrl, Social) {
// Stripe
$.getScript('//checkout.stripe.com/v2/checkout.js');
// Social sharing buttons
loadWidgets();
/* Google Content Experiments
if (window.env.NODE_ENV === 'production') {
$.getScript('//www.google-analytics.com/cx/api.js?experiment=boVO4eEyRfysNE5D53nCMQ', function(){

View File

@@ -25,5 +25,9 @@
// Twitter
$.getScript('https://platform.twitter.com/widgets.js');
}
return {
loadWidgets: loadWidgets
}
}
}());

View File

@@ -60,7 +60,7 @@ footer.footer(ng-controller='FooterCtrl')
.col-sm-3
if (env.NODE_ENV === 'production' && !env.IS_MOBILE)
h4=env.t('footerSocial')
.addthis_toolbox.addthis_default_style(addthis:url='https://habitica.com', addthis:title=env.t('socialTitle'))
.addthis_toolbox.addthis_default_style(addthis:url='https://habitica.com', addthis:title=env.t('socialTitle'), ng-init='loadWidgets()')
table
tr
td

View File

@@ -1,22 +1,28 @@
include ../avatar/generated_avatar
script(type='text/ng-template', id='modals/levelUp.html')
div(id='fb-root')
.modal-content(style='min-width:28em')
.modal-body.text-center
h3(style='margin-bottom: 0')=env.t('gainedLevel')
.container-fluid
.row
.herobox(style='margin:auto 8.2em; width: 6em; height: 9em; padding-top: 0')
.herobox(style='margin:auto 8.3em; width: 6em; height: 9em; padding-top: 0')
.character-sprites(style='margin: 0; width: 0')
+generatedAvatar
.row
.herobox(style='margin:auto 8.6em; width: 6em; height: 0; padding-top: 0')
.herobox(style='margin:auto 8.9em; width: 6em; height: 0; padding-top: 0')
.avatar-level(ng-class='userLevelStyle(user)')=env.t('level')+' {{user.stats.lvl}}'
h4(style='margin-top: 1em')!=env.t('leveledUp', {level:'{{user.stats.lvl}}'})
p=env.t('fullyHealed')
br
button.btn.btn-primary(ng-click='$close()')=env.t('huzzah')
.modal-footer(style='margin-top:0', ng-init='loadWidgets()')
.container-fluid
.row
.col-xs-4
a.twitter-share-button(href='https://twitter.com/intent/tweet?text=I+got+to+Level+{{::user.stats.lvl}}+in+Habitica+by+improving+my+real-life+habits!&via=habitica&url=https://habitrpg-gamma.herokuapp.com/social/level-up&count=none')=env.t('tweet')
.col-xs-4
.fb-share-button(data-href='https://habitrpg-gamma.herokuapp.com/social/level-up', data-layout='button')
.col-xs-4
a.tumblr-share-button(data-href='https://habitrpg-gamma.herokuapp.com/social/level-up', data-notes='none')