return this.fluidbook.datas.title;
},
+ getEmailSubject: function () {
+ if (this.fluidbook.datas.email_title == '') {
+ return this.fluidbook.datas.title;
+ }
+ return this.fluidbook.datas.email_title;
+ },
+
+ getEmailBody: function (url) {
+ var body;
+ var u = this.getShareURL(url);
+ if (this.fluidbook.datas.email_body == '') {
+ body = this.fluidbook.l10n.__('Veuillez cliquer sur le lien suivant pour ouvrir %title%\n%link%');
+ } else {
+ body = this.fluidbook.datas.email_body;
+ }
+ body = body.trim();
+ body = body.replace(/\%title\%/g, this.fluidbook.datas.title);
+
+ if (body.indexOf('%link%') === -1) {
+ body += "\n\n" + u;
+ } else {
+ body = body.replace(/\%link\%/g, u);
+ }
+
+ return body;
+ },
+
getSEOArticle: function (title) {
return this.fluidbook.datas.seoArticles[title];
},
sendEmail: function (url) {
- window.location = 'mailto:?subject=' + encodeURIComponent(this.getShareTitle(url)) + '&body=' + encodeURIComponent(this.getShareTitle(url) + ' : ' + this.getShareURL(url));
+ window.location = 'mailto:?subject=' + encodeURIComponent(this.getEmailSubject()) + '&body=' + encodeURIComponent(this.getEmailBody(url));
this.fluidbook.stats.track(5);
},
sendTwitter: function (url) {