Skip to content

Commit

Permalink
Merge pull request #39 from YetiForceCompany/developer
Browse files Browse the repository at this point in the history
Developer
  • Loading branch information
mariuszkrzaczkowski authored Sep 13, 2019
2 parents 2ef861e + 680b467 commit 6e0e237
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
23 changes: 15 additions & 8 deletions plugins/yetiforce/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function registerEvents(content) {
registerSelectRecord(content);
registerRemoveRecord(content);
registerImportMail(content);

window.crm.app.registerPopover(content.closest('body'));
var block = content.find('.ytHeader .js-data');
content.find('.hideBtn').click(function () {
var button = $(this);
Expand All @@ -63,7 +63,10 @@ function registerEvents(content) {
}

function registerImportMail(content) {
content.find('.importMail').click(function (e) {
let clicked = false;
content.find('.importMail').click(function(e) {
if (clicked) return false;
clicked = true;
window.crm.Vtiger_Helper_Js.showPnotify({
text: window.crm.app.vtranslate('StartedDownloadingEmail'),
type: 'info'
Expand All @@ -74,13 +77,17 @@ function registerImportMail(content) {
uid: rcmail.env.uid,
folder: rcmail.env.mailbox,
rcId: rcmail.env.user_id
}).done(function (data) {
loadActionBar();
window.crm.Vtiger_Helper_Js.showPnotify({
text: window.crm.app.vtranslate('AddFindEmailInRecord'),
type: 'success'
});
})
.done(function(data) {
loadActionBar();
window.crm.Vtiger_Helper_Js.showPnotify({
text: window.crm.app.vtranslate('AddFindEmailInRecord'),
type: 'success'
});
})
.fail(function() {
clicked = false;
});
});
}

Expand Down
2 changes: 1 addition & 1 deletion plugins/yetiforce/preview.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6e0e237

Please sign in to comment.