[embed] changes for autotests

This commit is contained in:
Maxim Kadushkin 2016-11-18 17:49:10 +03:00
parent ba56ef921c
commit e5902b973e
2 changed files with 5 additions and 1 deletions

View file

@ -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 () {

View file

@ -57,6 +57,7 @@ common.view.modals = new(function() {
'<span class="svg big-twitter" data-name="twitter"></span>' +
'<span class="svg big-gplus" data-name="gplus"></span>' +
'<span class="svg big-email" data-name="email"></span>' +
'<div class="autotest" id="email" style="display: none"></div>' +
'</div>';
var _tplbody_embed = '<div class="size-manual">' +