Skip to content

Commit

Permalink
use checkAndDisplaySizeWarning inside getErrorsForControlQuality
Browse files Browse the repository at this point in the history
  • Loading branch information
omar-bear committed Apr 29, 2024
1 parent cd34a39 commit 7e11f0a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/editor/src/js/ext/badsender-control-quality.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ function isElementEmpty(element) {
}

function getErrorsForControlQuality(viewModel) {
checkAndDisplaySizeWarning(viewModel)
const htmlToExport = viewModel.exportHTML()
const parsedHtml = $.parseHTML(htmlToExport);
const extraItems = [];
Expand Down Expand Up @@ -149,5 +150,4 @@ function displaySizeWarning(viewModel) {
module.exports = {
getErrorsForControlQuality,
displayErrors,
checkAndDisplaySizeWarning,
}
3 changes: 1 addition & 2 deletions packages/editor/src/js/ext/badsender-server-storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const console = require('console');
const $ = require('jquery');
const ko = require('knockout');
const _omit = require('lodash.omit');
const { getErrorsForControlQuality, displayErrors, checkAndDisplaySizeWarning } = require('../ext/badsender-control-quality');
const { getErrorsForControlQuality, displayErrors } = require('../ext/badsender-control-quality');

function getData(viewModel) {
// gather meta
Expand Down Expand Up @@ -90,7 +90,6 @@ function loader(opts) {

const dlDefault = { forCdn: false, forFtp: false };
downloadCmd.execute = function downloadMail(downloadOptions = dlDefault) {
checkAndDisplaySizeWarning(viewModel);
// ====================================
// Check for missing input values
const errors = getErrorsForControlQuality(viewModel);
Expand Down
4 changes: 0 additions & 4 deletions packages/editor/src/js/vue/components/esp/esp-send-mail.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const { ESP_TYPE } = require('../../constant/esp-type');
const {
getErrorsForControlQuality,
displayErrors,
checkAndDisplaySizeWarning,
} = require('../../../ext/badsender-control-quality');

const {
Expand Down Expand Up @@ -159,9 +158,6 @@ const EspComponent = Vue.component('EspForm', {
this.isLoadingExport = true;
const unprocessedHtml = this.vm.exportHTML();

// Check for HTML size warning
checkAndDisplaySizeWarning(this.vm);

axios
.post(this.vm.metadata.url.sendCampaignMail, {
html: unprocessedHtml,
Expand Down

0 comments on commit 7e11f0a

Please sign in to comment.