diff --git a/www/i18n/locale-en.json b/www/i18n/locale-en.json index 541f7268a8b530ce22ebc409a0c4b6a2e6de29b7..b1b6cc4d1a777c0ff23053e84a83ee75688a9b3c 100644 --- a/www/i18n/locale-en.json +++ b/www/i18n/locale-en.json @@ -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": { diff --git a/www/i18n/locale-fr-FR.json b/www/i18n/locale-fr-FR.json index 52c82241baa6702edf89fa85384728d78d4ec501..597f3c972259955ad7a5cdbd13ce8db551c72596 100644 --- a/www/i18n/locale-fr-FR.json +++ b/www/i18n/locale-fr-FR.json @@ -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": { diff --git a/www/js/controllers/wallet-controllers.js b/www/js/controllers/wallet-controllers.js index ec01d1346b031c15ae43bc108b1ba46ea1e9f3d4..90f980ec08ac10d9d3b22d763448c3568de874ee 100644 --- a/www/js/controllers/wallet-controllers.js +++ b/www/js/controllers/wallet-controllers.js @@ -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, { diff --git a/www/js/controllers/wot-controllers.js b/www/js/controllers/wot-controllers.js index 821db865dfe8af20b94fc4e69fed2934de2b1ce9..585d064135d8bb9a663cf471a4167d8d7124f6e1 100644 --- a/www/js/controllers/wot-controllers.js +++ b/www/js/controllers/wot-controllers.js @@ -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, { diff --git a/www/plugins/es/js/controllers/market-controllers.js b/www/plugins/es/js/controllers/market-controllers.js index 9d8327bf43677c9d06ce76a30bc1e55fbeba89d7..3c390d0436ea349358d4abdab9a5ad703d90e753 100644 --- a/www/plugins/es/js/controllers/market-controllers.js +++ b/www/plugins/es/js/controllers/market-controllers.js @@ -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 } }); }; diff --git a/www/templates/common/popover_share.html b/www/templates/common/popover_share.html index 6abe49904bef0ccc2e1b19ed9160503299e41989..f90d28256659901293f3a4e0992d25913b276f5d 100644 --- a/www/templates/common/popover_share.html +++ b/www/templates/common/popover_share.html @@ -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}}&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}}&text={{postMessage}}" - target="_blank" + href="https://twitter.com/intent/tweet?url={{postUrl|formatEncodeURI}}&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}}&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}}&url={{postUrl|formatEncodeURI}}" - target="_blank" + href="https://sharetodiaspora.github.io/?title={{postMessage|formatEncodeURI}}&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()">