Skip to content
Snippets Groups Projects
Commit 16d4913e authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

- Add facebook and googplus share link

- Fix share popover on firefox
parent 9a6536ca
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,7 @@
"SHARE_ON_TWITTER": "Share on Twitter",
"SHARE_ON_FACEBOOK": "Share on Facebook",
"SHARE_ON_DIASPORA": "Share on Diaspora*",
"SHARE_ON_GOOGLEPLUS": "Share on Google+"
}
},
"SYSTEM": {
......
......@@ -40,9 +40,10 @@
"RESULTS_LIST": "Résultats :",
"POPOVER_SHARE": {
"TITLE": "Partager",
"SHARE_ON_TWITTER": "Partager ce lien sur Twitter",
"SHARE_ON_FACEBOOK": "Partager ce lien sur Facebook",
"SHARE_ON_DIASPORA": "Partager ce lien sur Diaspora*",
"SHARE_ON_TWITTER": "Partager sur Twitter",
"SHARE_ON_FACEBOOK": "Partager sur Facebook",
"SHARE_ON_DIASPORA": "Partager sur Diaspora*",
"SHARE_ON_GOOGLEPLUS": "Partager sur Google+"
}
},
"SYSTEM": {
......
......@@ -311,7 +311,7 @@ function WalletController($scope, $q, $ionicPopup, $timeout, $state, screenmatch
});
};
$scope.showSharePopover = function() {
$scope.showSharePopover = function(event) {
var title = $scope.walletData.name || $scope.walletData.uid || $scope.walletData.pubkey;
var url = $state.href('app.wot_view_identity', {pubkey: $scope.walletData.pubkey, uid: $scope.walletData.name || $scope.walletData.uid}, {absolute: true});
UIUtils.popover.share(event, {
......
......@@ -297,7 +297,7 @@ function WotIdentityViewController($scope, $state, screenmatch, $timeout, UIUtil
});
};
$scope.showSharePopover = function() {
$scope.showSharePopover = function(event) {
var title = $scope.formData.name || $scope.formData.uid || $scope.formData.pubkey;
var url = $state.href('app.wot_view_identity', {pubkey: $scope.formData.pubkey, uid: $scope.formData.name || $scope.formData.uid}, {absolute: true});
UIUtils.popover.share(event, {
......
......@@ -566,7 +566,8 @@ function ESMarketRecordViewController($scope, $anchorScroll, $ionicPopover, $sta
titleKey: 'MARKET.VIEW.POPOVER_SHARE_TITLE',
titleValues: {title: title},
time: $scope.formData.time,
postMessage: title
postMessage: title,
postImage: $scope.pictures.length > 0 ? $scope.pictures[0] : null
}
});
};
......
......@@ -25,22 +25,31 @@
<div class="bar bar-footer ">
<div class="button-bar">
<a class="button button-icon positive icon ion-social-facebook"
href="https://www.facebook.com/sharer/sharer.php?u={{postUrl|formatEncodeURI}}&amp;title={{postMessage|formatEncodeURI}}"
onclick="window.open(this.href, 'facebook-share','menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width=580,height=296');return false;"
title="{{'COMMON.POPOVER_SHARE.SHARE_ON_FACEBOOK'|translate}}">
</a>
<a class="button button-icon positive icon ion-social-twitter"
href="https://twitter.com/intent/tweet?url={{postUrl|formatEncodeURI}}&amp;text={{postMessage}}"
target="_blank"
href="https://twitter.com/intent/tweet?url={{postUrl|formatEncodeURI}}&amp;text={{postMessage|formatEncodeURI}}"
onclick="window.open(this.href, 'twitter-share','menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width=580,height=296');return false;"
title="{{'COMMON.POPOVER_SHARE.SHARE_ON_TWITTER'|translate}}">
</a>
<!--a class="button-icon button-small pull-left"
href="https://twitter.com/intent/tweet?url={{postUrl|formatEncodeURI}}&amp;text={{postMessage}}"
target="_blank"
title="{{'COMMON.POPOVER_SHARE.SHARE_ON_FACEBOOK'|translate}}">
<i class="icon ion-social-facebook"></i>
</a-->
<a class="button button-icon positive icon ion-social-googleplus"
href="https://plus.google.com/share?url={{postUrl|formatEncodeURI}}"
onclick="window.open(this.href, 'google-plus-share', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=296,width=580');return false;"
title="{{'COMMON.POPOVER_SHARE.SHARE_ON_GOOGLEPLUS'|translate}}">
</a>
<a class="button button-icon positive icon ion-social-diaspora"
href="https://sharetodiaspora.github.io/?title={{postMessage}}&amp;url={{postUrl|formatEncodeURI}}"
target="_blank"
href="https://sharetodiaspora.github.io/?title={{postMessage|formatEncodeURI}}&amp;url={{postUrl|formatEncodeURI}}"
onclick="window.open(this.href, 'diaspora-share','menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width=580,height=296');return false;"
title="{{'COMMON.POPOVER_SHARE.SHARE_ON_DIASPORA'|translate}}">
</a>
<a class="button-close"
title="{{'COMMON.BTN_CLOSE'|translate}}"
ng-click="closePopover()">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment