From ffa476190f90bdc449f1dcc016836ba1a0bd5b38 Mon Sep 17 00:00:00 2001 From: Nicolas Wendling Date: Wed, 17 Mar 2021 22:42:26 +0100 Subject: =?UTF-8?q?=E2=99=BB=EF=B8=8F=20use=20Share.getEmailUrl=20method?= =?UTF-8?q?=20to=20share=20an=20article=20via=20an=20email.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicolas Wendling --- js/controller/ShareController.js | 4 ++++ templates/part.content.php | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/js/controller/ShareController.js b/js/controller/ShareController.js index eb056ce19..e1255e92a 100644 --- a/js/controller/ShareController.js +++ b/js/controller/ShareController.js @@ -158,4 +158,8 @@ app.controller('ShareController', function (ShareResource, Loading) { this.getTwitterUrl = function(url){ return 'https://twitter.com/intent/tweet?url='+url; }; + + this.getEmailUrl = function(url, object, body){ + return encodeURI('mailto:?subject=' + object + '&body=' + body + ' ' + url); + }; }); diff --git a/templates/part.content.php b/templates/part.content.php index 9bfc86e6d..554382fd1 100644 --- a/templates/part.content.php +++ b/templates/part.content.php @@ -163,11 +163,10 @@
+ ng-href="{{ Share.getEmailUrl(item.url, 't('I wanted you to see this article')) ?>', 't('Check out this article')) ?>') }}">
- -- cgit v1.2.3