Commit e5902b97 authored by Maxim Kadushkin's avatar Maxim Kadushkin

[embed] changes for autotests

parent ba56ef92
...@@ -52,6 +52,8 @@ ...@@ -52,6 +52,8 @@
var createDlgShare = function () { var createDlgShare = function () {
$dlgShare = common.view.modals.create('share'); $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('#btn-copyshort').on('click', copytext.bind(this, $dlgShare.find('#id-short-url')));
$dlgShare.find('.share-buttons > span').on('click', function(e){ $dlgShare.find('.share-buttons > span').on('click', function(e){
var _url; var _url;
...@@ -70,12 +72,13 @@ ...@@ -70,12 +72,13 @@
window.open(_url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes'); window.open(_url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes');
break; break;
case 'email': 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; break;
} }
}); });
$dlgShare.find('#id-short-url').val(appConfig.shareUrl); $dlgShare.find('#id-short-url').val(appConfig.shareUrl);
$dlgShare.find('.share-buttons > #email.autotest').attr('data-test', _mailto);
}; };
var createDlgEmbed =function () { var createDlgEmbed =function () {
......
...@@ -57,6 +57,7 @@ common.view.modals = new(function() { ...@@ -57,6 +57,7 @@ common.view.modals = new(function() {
'<span class="svg big-twitter" data-name="twitter"></span>' + '<span class="svg big-twitter" data-name="twitter"></span>' +
'<span class="svg big-gplus" data-name="gplus"></span>' + '<span class="svg big-gplus" data-name="gplus"></span>' +
'<span class="svg big-email" data-name="email"></span>' + '<span class="svg big-email" data-name="email"></span>' +
'<div class="autotest" id="email" style="display: none"></div>' +
'</div>'; '</div>';
var _tplbody_embed = '<div class="size-manual">' + var _tplbody_embed = '<div class="size-manual">' +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment