From 4f408a26d5660a6964e0067353649b747706a721 Mon Sep 17 00:00:00 2001 From: Tomas Bures Date: Sun, 20 Jan 2019 16:31:17 +0000 Subject: [PATCH] Some fixes --- client/package-lock.json | 18 +++++++----------- client/package.json | 4 ++-- client/src/lib/form.js | 2 +- client/src/lib/sandboxed-codeeditor-root.js | 1 + client/src/lib/styles.scss | 4 ++-- mvis/ivis-core | 2 +- server/lib/tools.js | 3 +-- server/models/campaigns.js | 4 ++-- server/models/forms.js | 3 +-- 9 files changed, 18 insertions(+), 23 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index fda401e6..afcc9efe 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -2214,7 +2214,7 @@ }, "underscore": { "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "resolved": "http://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" } } @@ -4507,13 +4507,11 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -4530,8 +4528,7 @@ }, "concat-map": { "version": "0.0.1", - "bundled": true, - "optional": true + "bundled": true }, "console-control-strings": { "version": "1.1.0", @@ -4660,7 +4657,6 @@ "minimatch": { "version": "3.0.4", "bundled": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -6757,7 +6753,7 @@ }, "keymaster": { "version": "1.6.2", - "resolved": "https://registry.npmjs.org/keymaster/-/keymaster-1.6.2.tgz", + "resolved": "http://registry.npmjs.org/keymaster/-/keymaster-1.6.2.tgz", "integrity": "sha1-4a5U0OqUiPn2C2a2aPAumhlGxus=" }, "kind-of": { @@ -7896,9 +7892,9 @@ } }, "mjml4-in-browser": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mjml4-in-browser/-/mjml4-in-browser-1.0.1.tgz", - "integrity": "sha512-k2kczYb28cCsL2ebi0cv2ui4UiF1V5r8KDqAKZA8dedOtPKvOJ7Y+hWhJlMDzrnOtQzs1kGbU4BWZmOu+2CcTQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/mjml4-in-browser/-/mjml4-in-browser-1.0.2.tgz", + "integrity": "sha512-E/pgBIy0RNgFUrncEjEZb83jpFQyF913x55lNANahGTCWjEn85h0fiMuw045wv7ZnzTV9coBhRnY34m4rM/pog==", "requires": { "html-minifier": "^3.5.3", "htmlparser2": "^3.9.2", diff --git a/client/package.json b/client/package.json index 5eae7de8..06fb2659 100644 --- a/client/package.json +++ b/client/package.json @@ -26,14 +26,14 @@ "bootstrap": "^4.2.1", "datatables.net": "^1.10.19", "datatables.net-bs4": "^1.10.19", - "grapesjs": "0.14.49", + "grapesjs": "^0.14.49", "grapesjs-mjml": "0.0.27", "grapesjs-preset-newsletter": "^0.2.20", "i18next": "^13.1.0", "i18next-browser-languagedetector": "^2.2.4", "immutable": "^4.0.0-rc.12", "juice": "^5.1.0", - "mjml4-in-browser": "^1.0.1", + "mjml4-in-browser": "^1.0.2", "moment": "^2.23.0", "moment-timezone": "^0.5.23", "popper.js": "^1.14.6", diff --git a/client/src/lib/form.js b/client/src/lib/form.js index 27cc9ed6..6cda6538 100644 --- a/client/src/lib/form.js +++ b/client/src/lib/form.js @@ -132,7 +132,7 @@ class Form extends Component { {props.children} {!props.noStatus && statusMessageText && - +

{statusMessageText}

} diff --git a/client/src/lib/sandboxed-codeeditor-root.js b/client/src/lib/sandboxed-codeeditor-root.js index b3e403af..9c09236c 100644 --- a/client/src/lib/sandboxed-codeeditor-root.js +++ b/client/src/lib/sandboxed-codeeditor-root.js @@ -33,6 +33,7 @@ import {CodeEditorSourceType} from "./sandboxed-codeeditor-shared"; import mjml2html from "mjml4-in-browser"; + import juice from "juice"; import {withComponentMixins} from "./decorator-helpers"; diff --git a/client/src/lib/styles.scss b/client/src/lib/styles.scss index 61f2c162..10356f30 100644 --- a/client/src/lib/styles.scss +++ b/client/src/lib/styles.scss @@ -166,11 +166,11 @@ :global .modal-dialog { @media (min-width: 768px) { - width: 700px; + max-width: 700px; } @media (min-width: 1000px) { - width: 900px; + max-width: 900px; } } diff --git a/mvis/ivis-core b/mvis/ivis-core index 9adbb722..a9ad4bab 160000 --- a/mvis/ivis-core +++ b/mvis/ivis-core @@ -1 +1 @@ -Subproject commit 9adbb72253e29a014dc791a7ac976f1ade080ec6 +Subproject commit a9ad4bab17475ab8646a0294338df59aa3864cb9 diff --git a/server/lib/tools.js b/server/lib/tools.js index f1cd68dc..c7d35f28 100644 --- a/server/lib/tools.js +++ b/server/lib/tools.js @@ -9,8 +9,7 @@ const bluebird = require('bluebird'); const hasher = require('node-object-hash')(); -const mjml = require('mjml'); -const mjml2html = mjml.default; +const mjml2html = require('mjml'); const hbs = require('hbs'); const juice = require('juice'); diff --git a/server/models/campaigns.js b/server/models/campaigns.js index 3be43381..97a7dc66 100644 --- a/server/models/campaigns.js +++ b/server/models/campaigns.js @@ -651,7 +651,7 @@ async function enforceSendPermissionTx(tx, context, campaignId) { const requiredPermission = getSendConfigurationPermissionRequiredForSend(campaign, sendConfiguration); await shares.enforceEntityPermissionTx(tx, context, 'sendConfiguration', campaign.send_configuration, requiredPermission); - await shares.enforceEntityPermissionTx(tx, context, 'campaign', campaignId, 'send'); + await shares.enforceEntityPermissionTx(tx, context, 'campaign', campaign.id, 'send'); } @@ -853,7 +853,7 @@ async function _changeStatus(context, campaignId, permittedCurrentStates, newSta throw new interoperableErrors.NotFoundError(); } - await enforceSendPermissionTx(tx, context, campaign); + await enforceSendPermissionTx(tx, context, entity); if (!permittedCurrentStates.includes(entity.status)) { throw new interoperableErrors.InvalidStateError(invalidStateMessage); diff --git a/server/models/forms.js b/server/models/forms.js index 62fa57bd..1bfade5e 100644 --- a/server/models/forms.js +++ b/server/models/forms.js @@ -10,8 +10,7 @@ const namespaceHelpers = require('../lib/namespace-helpers'); const fs = require('fs-extra'); const path = require('path'); -const mjml = require('mjml'); -const mjml2html = mjml.default; +const mjml2html = require('mjml'); const lists = require('./lists'); const dependencyHelpers = require('../lib/dependency-helpers');