diff --git a/apps/common/embed/lib/controller/modals.js b/apps/common/embed/lib/controller/modals.js index a3236f3be..579478112 100644 --- a/apps/common/embed/lib/controller/modals.js +++ b/apps/common/embed/lib/controller/modals.js @@ -52,6 +52,8 @@ var createDlgShare = function () { $dlgShare = common.view.modals.create('share'); + var _mailto = 'mailto:?subject=I have shared a document with you: ' + appConfig.docTitle + '&body=I have shared a document with you: ' + appConfig.shareUrl + '"'; + $dlgShare.find('#btn-copyshort').on('click', copytext.bind(this, $dlgShare.find('#id-short-url'))); $dlgShare.find('.share-buttons > span').on('click', function(e){ var _url; @@ -70,12 +72,13 @@ window.open(_url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes'); break; case 'email': - window.open('mailto:?subject=I have shared a document with you: ' + appConfig.docTitle + '&body=I have shared a document with you: ' + appConfig.shareUrl + '"', '_self'); + window.open(_mailto, '_self'); break; } }); $dlgShare.find('#id-short-url').val(appConfig.shareUrl); + $dlgShare.find('.share-buttons > #email.autotest').attr('data-test', _mailto); }; var createDlgEmbed =function () { diff --git a/apps/common/embed/lib/view/modals.js b/apps/common/embed/lib/view/modals.js index cbb3af994..ae35d0234 100644 --- a/apps/common/embed/lib/view/modals.js +++ b/apps/common/embed/lib/view/modals.js @@ -57,6 +57,7 @@ common.view.modals = new(function() { '' + '' + '' + + '
' + ''; var _tplbody_embed = '