function FluidbookShare(fluidbook) {
this.fluidbook = fluidbook;
- if(this.isEnabled()){
- var $this=this;
+ if (this.isEnabled()) {
+ var $this = this;
$(document).on('click', '.share', function () {
var f = 'send' + ucfirst($(this).data('service'));
$this[f]();
return res;
},
- getShareLinks: function(hideLabels) {
+ getShareLinks: function (hideLabels) {
var shareLinks = {},
shareHTML = '';
},
openShare: function (p1, p2, callback) {
-
+
var view;
view = '<div class="caption">' + this.fluidbook.menu.closeButton() + '<h2>' + this.fluidbook.l10n.__('share') + '</h2></div>';
view += '<div class="content">';
view += this.getShareLinks();
- view += '</div>';;
+ view += '</div>';
+ ;
$("#view").append('<div class="mview" data-menu="share">' + view + '</div>');
if (callback != undefined) {
body = this.fluidbook.datas.title + ' : ' + this.getShareURL();
}
+ // Normalize new lines
+ body = body.replace(/\r\n/g, "\n");
+ body = body.replace(/\r/g, "\n");
+ body = body.replace(/\n/g, "\r\n");
+
if (this.fluidbook.datas.phonegap == 'android') {
var extras = {};
extras[window.plugins.webintent.EXTRA_SUBJECT] = subject;