Skip to content

Commit

Permalink
dev/mail#20 : Preview screen don't open until recipients list is buil…
Browse files Browse the repository at this point in the history
…t on mail compose screen
  • Loading branch information
monishdeb committed Jul 18, 2018
1 parent d77cfac commit c54bcbd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ang/crmMailing/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,15 @@
}
},

// @param mailing Object (per APIv3)
// @return preview content
quickPreview: function quickPreview(mailing) {
var backend = crmApi.backend || CRM.api3;
return backend('Mailing', 'preview', {id: mailing.id}).then(function(result) {
return result.values;
});
},

// @param mailing Object (per APIv3)
// @param int previewLimit
// @return Promise for a list of recipients (mailing_id, contact_id, api.contact.getvalue, api.email.getvalue)
Expand Down Expand Up @@ -451,7 +460,7 @@
};
var result = null;
var p = crmMailingMgr
.preview(mailing)
.quickPreview(mailing)
.then(function (content) {
var options = CRM.utils.adjustDialogDefaults({
autoOpen: false,
Expand Down

0 comments on commit c54bcbd

Please sign in to comment.