Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
c242b15f8b |
@ -191,10 +191,10 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: Download additional WP Plugins for tests
|
name: Download additional WP Plugins for tests
|
||||||
command: |
|
command: |
|
||||||
./do download:woo-commerce-zip 9.2.3
|
./do download:woo-commerce-zip 9.2.2
|
||||||
./do download:woo-commerce-subscriptions-zip 6.6.1
|
./do download:woo-commerce-subscriptions-zip 6.6.0
|
||||||
./do download:woo-commerce-memberships-zip 1.26.5
|
./do download:woo-commerce-memberships-zip 1.26.5
|
||||||
./do download:automate-woo-zip 6.0.33
|
./do download:automate-woo-zip 6.0.32
|
||||||
- run:
|
- run:
|
||||||
name: Dump tests ENV variables for acceptance tests
|
name: Dump tests ENV variables for acceptance tests
|
||||||
command: |
|
command: |
|
||||||
|
@ -5,7 +5,7 @@ on:
|
|||||||
types: [opened, reopened, synchronize]
|
types: [opened, reopened, synchronize]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
add-wp-playground-link:
|
append-description:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@ -20,8 +20,8 @@ jobs:
|
|||||||
BRANCH_NAME="${{ github.head_ref }}"
|
BRANCH_NAME="${{ github.head_ref }}"
|
||||||
DESCRIPTION="$(gh pr view $PR_NUMBER --json body -q .body)"
|
DESCRIPTION="$(gh pr view $PR_NUMBER --json body -q .body)"
|
||||||
HEADING="## Preview"
|
HEADING="## Preview"
|
||||||
CONTENT="$(printf "${HEADING}\n\n[Preview in WordPress Playground](https://account.mailpoet.com/playground/new/branch:${BRANCH_NAME})\n\n_The latest successful build from \`${BRANCH_NAME}\` will be used. If none is available, the link won't work._")"
|
CONTENT="$(printf "\n\n${HEADING}\n\n[Preview in WordPress Playground](https://account.mailpoet.com/playground/new/branch:${BRANCH_NAME})\n\n_The latest successful build from \`${BRANCH_NAME}\` will be used. If none is available, the link won't work._")"
|
||||||
|
|
||||||
if [[ "$DESCRIPTION" != *"$HEADING"* ]]; then
|
if [[ "$DESCRIPTION" != *"$HEADING"* ]]; then
|
||||||
gh pr edit $PR_NUMBER --body "$(printf "${DESCRIPTION}\n\n${CONTENT}")"
|
gh pr edit $PR_NUMBER --body "${DESCRIPTION}\n\n${CONTENT}"
|
||||||
fi
|
fi
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
= 5.1.1 - 2024-09-04 =
|
|
||||||
|
|
||||||
- Fixed: broken email rendering when ALC, Products, or WC content blocks are manually dragged into a column block (since 4.56.0). If you experience this issue, please readd these blocks or drag and drop the existing ones which should fix the issue.
|
|
||||||
|
|
||||||
= 5.1.0 - 2024-09-02 =
|
= 5.1.0 - 2024-09-02 =
|
||||||
|
|
||||||
- Improved: form validation messages;
|
- Improved: form validation messages;
|
||||||
|
@ -110,3 +110,10 @@ span.mailpoet-gap-half {
|
|||||||
height: 6px;
|
height: 6px;
|
||||||
width: 8px;
|
width: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mailpoet-is-dragging {
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
@ -10,7 +10,7 @@ import Marionette from 'backbone.marionette';
|
|||||||
import _ from 'underscore';
|
import _ from 'underscore';
|
||||||
import jQuery from 'jquery';
|
import jQuery from 'jquery';
|
||||||
import { BehaviorsLookup } from 'newsletter-editor/behaviors/behaviors-lookup';
|
import { BehaviorsLookup } from 'newsletter-editor/behaviors/behaviors-lookup';
|
||||||
import interact from 'interact';
|
import interact from 'interactjs';
|
||||||
|
|
||||||
BehaviorsLookup.ContainerDropZoneBehavior = Marionette.Behavior.extend({
|
BehaviorsLookup.ContainerDropZoneBehavior = Marionette.Behavior.extend({
|
||||||
defaults: {
|
defaults: {
|
||||||
@ -67,8 +67,8 @@ BehaviorsLookup.ContainerDropZoneBehavior = Marionette.Behavior.extend({
|
|||||||
// display position visualization there,
|
// display position visualization there,
|
||||||
// remove other visualizations from this container
|
// remove other visualizations from this container
|
||||||
var dropPosition = that.getDropPosition(
|
var dropPosition = that.getDropPosition(
|
||||||
event.dragmove.pageX,
|
event.dragEvent.pageX,
|
||||||
event.dragmove.pageY,
|
event.dragEvent.pageY,
|
||||||
view.$el,
|
view.$el,
|
||||||
view.model.get('orientation'),
|
view.model.get('orientation'),
|
||||||
view.model.get('blocks').length,
|
view.model.get('blocks').length,
|
||||||
|
@ -8,7 +8,7 @@ import Marionette from 'backbone.marionette';
|
|||||||
import _ from 'underscore';
|
import _ from 'underscore';
|
||||||
import jQuery from 'jquery';
|
import jQuery from 'jquery';
|
||||||
import { BehaviorsLookup } from 'newsletter-editor/behaviors/behaviors-lookup';
|
import { BehaviorsLookup } from 'newsletter-editor/behaviors/behaviors-lookup';
|
||||||
import interact from 'interact';
|
import interact from 'interactjs';
|
||||||
import { App } from 'newsletter-editor/app';
|
import { App } from 'newsletter-editor/app';
|
||||||
|
|
||||||
var BL = BehaviorsLookup;
|
var BL = BehaviorsLookup;
|
||||||
@ -40,13 +40,11 @@ BL.DraggableBehavior = Marionette.Behavior.extend({
|
|||||||
// Give instances more control over whether Draggable should be applied
|
// Give instances more control over whether Draggable should be applied
|
||||||
if (!this.options.testAttachToInstance(this.view.model, this.view)) return;
|
if (!this.options.testAttachToInstance(this.view.model, this.view)) return;
|
||||||
|
|
||||||
interactable = interact(this.$el.get(0), {
|
interactable = interact(this.$el.get(0))
|
||||||
ignoreFrom: this.options.ignoreSelector,
|
|
||||||
})
|
|
||||||
.draggable({
|
.draggable({
|
||||||
// allow dragging of multple elements at the same time
|
ignoreFrom: this.options.ignoreSelector,
|
||||||
|
// allow dragging of multiple elements at the same time
|
||||||
max: Infinity,
|
max: Infinity,
|
||||||
|
|
||||||
// Scroll when dragging near edges of a window
|
// Scroll when dragging near edges of a window
|
||||||
autoScroll: true,
|
autoScroll: true,
|
||||||
|
|
||||||
@ -58,6 +56,13 @@ BL.DraggableBehavior = Marionette.Behavior.extend({
|
|||||||
var clone;
|
var clone;
|
||||||
var $clone;
|
var $clone;
|
||||||
|
|
||||||
|
if (event.target.__clone) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prevent text selection while dragging
|
||||||
|
document.body.classList.add('mailpoet-is-dragging');
|
||||||
|
|
||||||
if (that.options.cloneOriginal === true) {
|
if (that.options.cloneOriginal === true) {
|
||||||
// Use substitution instead of a clone
|
// Use substitution instead of a clone
|
||||||
if (_.isFunction(that.options.onDragSubstituteBy)) {
|
if (_.isFunction(that.options.onDragSubstituteBy)) {
|
||||||
@ -65,7 +70,6 @@ BL.DraggableBehavior = Marionette.Behavior.extend({
|
|||||||
}
|
}
|
||||||
// Or use a clone
|
// Or use a clone
|
||||||
clone = tempClone || event.target.cloneNode(true);
|
clone = tempClone || event.target.cloneNode(true);
|
||||||
jQuery(event.target);
|
|
||||||
$clone = jQuery(clone);
|
$clone = jQuery(clone);
|
||||||
|
|
||||||
$clone.addClass('mailpoet_droppable_active');
|
$clone.addClass('mailpoet_droppable_active');
|
||||||
@ -82,7 +86,7 @@ BL.DraggableBehavior = Marionette.Behavior.extend({
|
|||||||
$clone.css('top', event.pageY - centerYOffset);
|
$clone.css('top', event.pageY - centerYOffset);
|
||||||
$clone.css('left', event.pageX - centerXOffset);
|
$clone.css('left', event.pageX - centerXOffset);
|
||||||
|
|
||||||
event.interaction.element = clone;
|
event.target.__clone = clone;
|
||||||
|
|
||||||
if (that.options.hideOriginal === true) {
|
if (that.options.hideOriginal === true) {
|
||||||
that.view.$el.addClass('mailpoet_hidden');
|
that.view.$el.addClass('mailpoet_hidden');
|
||||||
@ -93,10 +97,15 @@ BL.DraggableBehavior = Marionette.Behavior.extend({
|
|||||||
},
|
},
|
||||||
// call this function on every dragmove event
|
// call this function on every dragmove event
|
||||||
onmove: function onmove(event) {
|
onmove: function onmove(event) {
|
||||||
var target = event.target;
|
var target = event.target.__clone;
|
||||||
|
var x;
|
||||||
|
var y;
|
||||||
|
if (!target) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// keep the dragged position in the data-x/data-y attributes
|
// keep the dragged position in the data-x/data-y attributes
|
||||||
var x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx;
|
x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx;
|
||||||
var y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy;
|
y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy;
|
||||||
|
|
||||||
// translate the element
|
// translate the element
|
||||||
target.style.transform = 'translate(' + x + 'px, ' + y + 'px)';
|
target.style.transform = 'translate(' + x + 'px, ' + y + 'px)';
|
||||||
@ -107,17 +116,23 @@ BL.DraggableBehavior = Marionette.Behavior.extend({
|
|||||||
target.setAttribute('data-y', y);
|
target.setAttribute('data-y', y);
|
||||||
},
|
},
|
||||||
onend: function onend(event) {
|
onend: function onend(event) {
|
||||||
var target = event.target;
|
var endEvent = event;
|
||||||
|
var target = endEvent.target.__clone;
|
||||||
|
|
||||||
|
// Allow text selection when not dragging
|
||||||
|
document.body.classList.remove('mailpoet-is-dragging');
|
||||||
|
|
||||||
|
if (!target) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
target.style.transform = '';
|
target.style.transform = '';
|
||||||
target.style.webkitTransform = target.style.transform;
|
target.style.webkitTransform = target.style.transform;
|
||||||
target.removeAttribute('data-x');
|
target.removeAttribute('data-x');
|
||||||
target.removeAttribute('data-y');
|
target.removeAttribute('data-y');
|
||||||
jQuery(event.interaction.element).addClass(
|
|
||||||
'mailpoet_droppable_active',
|
|
||||||
);
|
|
||||||
|
|
||||||
if (that.options.cloneOriginal === true) {
|
if (that.options.cloneOriginal === true) {
|
||||||
jQuery(target).remove();
|
jQuery(target).remove();
|
||||||
|
endEvent.target.__clone = undefined;
|
||||||
|
|
||||||
if (that.options.hideOriginal === true) {
|
if (that.options.hideOriginal === true) {
|
||||||
that.view.$el.removeClass('mailpoet_hidden');
|
that.view.$el.removeClass('mailpoet_hidden');
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
import Marionette from 'backbone.marionette';
|
import Marionette from 'backbone.marionette';
|
||||||
import { BehaviorsLookup } from 'newsletter-editor/behaviors/behaviors-lookup';
|
import { BehaviorsLookup } from 'newsletter-editor/behaviors/behaviors-lookup';
|
||||||
import interact from 'interact';
|
import interact from 'interactjs';
|
||||||
|
|
||||||
var BL = BehaviorsLookup;
|
var BL = BehaviorsLookup;
|
||||||
|
|
||||||
@ -61,6 +61,9 @@ BL.ResizableBehavior = Marionette.Behavior.extend({
|
|||||||
.on('resizestart', function resizestart() {
|
.on('resizestart', function resizestart() {
|
||||||
that.view.model.trigger('startResizing');
|
that.view.model.trigger('startResizing');
|
||||||
document.activeElement.blur();
|
document.activeElement.blur();
|
||||||
|
|
||||||
|
// Prevent text selection while resizing
|
||||||
|
document.body.classList.add('mailpoet-is-dragging');
|
||||||
})
|
})
|
||||||
.on('resizemove', function resizemove(event) {
|
.on('resizemove', function resizemove(event) {
|
||||||
var onResize = that.options.onResize.bind(that);
|
var onResize = that.options.onResize.bind(that);
|
||||||
@ -69,6 +72,9 @@ BL.ResizableBehavior = Marionette.Behavior.extend({
|
|||||||
.on('resizeend', function resizeend(event) {
|
.on('resizeend', function resizeend(event) {
|
||||||
that.view.model.trigger('stopResizing', event);
|
that.view.model.trigger('stopResizing', event);
|
||||||
that.$el.removeClass('mailpoet_resize_active');
|
that.$el.removeClass('mailpoet_resize_active');
|
||||||
|
|
||||||
|
// Allow text selection when not resizing
|
||||||
|
document.body.classList.remove('mailpoet-is-dragging');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Plugin Name: MailPoet
|
* Plugin Name: MailPoet
|
||||||
* Version: 5.1.1
|
* Version: 5.1.0
|
||||||
* Plugin URI: https://www.mailpoet.com
|
* Plugin URI: https://www.mailpoet.com
|
||||||
* Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
|
* Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
|
||||||
* Author: MailPoet
|
* Author: MailPoet
|
||||||
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$mailpoetPlugin = [
|
$mailpoetPlugin = [
|
||||||
'version' => '5.1.1',
|
'version' => '5.1.0',
|
||||||
'filename' => __FILE__,
|
'filename' => __FILE__,
|
||||||
'path' => dirname(__FILE__),
|
'path' => dirname(__FILE__),
|
||||||
'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
|
'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
"handlebars": "^4.7.8",
|
"handlebars": "^4.7.8",
|
||||||
"history": "^4.10.1",
|
"history": "^4.10.1",
|
||||||
"html2canvas": "^1.4.1",
|
"html2canvas": "^1.4.1",
|
||||||
"interact.js": "1.2.8",
|
"interactjs": "^1.10.27",
|
||||||
"jquery": "^3.7.1",
|
"jquery": "^3.7.1",
|
||||||
"js-cookie": "^3.0.5",
|
"js-cookie": "^3.0.5",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
|
@ -3,7 +3,7 @@ Contributors: mailpoet, woocommerce, automattic
|
|||||||
Tags: email marketing, post notification, woocommerce emails, email automation, newsletter
|
Tags: email marketing, post notification, woocommerce emails, email automation, newsletter
|
||||||
Requires at least: 6.5
|
Requires at least: 6.5
|
||||||
Tested up to: 6.6
|
Tested up to: 6.6
|
||||||
Stable tag: 5.1.1
|
Stable tag: 5.1.0
|
||||||
Requires PHP: 7.4
|
Requires PHP: 7.4
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
@ -230,7 +230,8 @@ Check our [Knowledge Base](https://kb.mailpoet.com) or contact us through our [s
|
|||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
= 5.1.1 - 2024-09-04 =
|
= 5.1.0 - 2024-09-02 =
|
||||||
* Fixed: broken email rendering when ALC, Products, or WC content blocks are manually dragged into a column block (since 4.56.0). If you experience this issue, please readd these blocks or drag and drop the existing ones which should fix the issue.
|
* Improved: form validation messages;
|
||||||
|
* Fixed: using ${var} in strings is deprecated, use {$var} instead.
|
||||||
|
|
||||||
[See the changelog for all versions.](https://github.com/mailpoet/mailpoet/blob/trunk/mailpoet/CHANGELOG.md)
|
[See the changelog for all versions.](https://github.com/mailpoet/mailpoet/blob/trunk/mailpoet/CHANGELOG.md)
|
||||||
|
572
pnpm-lock.yaml
generated
572
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user