Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
c242b15f8b |
@ -191,10 +191,10 @@ jobs:
|
||||
- run:
|
||||
name: Download additional WP Plugins for tests
|
||||
command: |
|
||||
./do download:woo-commerce-zip 9.2.3
|
||||
./do download:woo-commerce-subscriptions-zip 6.6.1
|
||||
./do download:woo-commerce-zip 9.2.2
|
||||
./do download:woo-commerce-subscriptions-zip 6.6.0
|
||||
./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:
|
||||
name: Dump tests ENV variables for acceptance tests
|
||||
command: |
|
||||
|
@ -5,7 +5,7 @@ on:
|
||||
types: [opened, reopened, synchronize]
|
||||
|
||||
jobs:
|
||||
add-wp-playground-link:
|
||||
append-description:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
@ -20,8 +20,8 @@ jobs:
|
||||
BRANCH_NAME="${{ github.head_ref }}"
|
||||
DESCRIPTION="$(gh pr view $PR_NUMBER --json body -q .body)"
|
||||
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
|
||||
gh pr edit $PR_NUMBER --body "$(printf "${DESCRIPTION}\n\n${CONTENT}")"
|
||||
gh pr edit $PR_NUMBER --body "${DESCRIPTION}\n\n${CONTENT}"
|
||||
fi
|
||||
|
@ -1,9 +1,5 @@
|
||||
== 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 =
|
||||
|
||||
- Improved: form validation messages;
|
||||
|
@ -110,3 +110,10 @@ span.mailpoet-gap-half {
|
||||
height: 6px;
|
||||
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 jQuery from 'jquery';
|
||||
import { BehaviorsLookup } from 'newsletter-editor/behaviors/behaviors-lookup';
|
||||
import interact from 'interact';
|
||||
import interact from 'interactjs';
|
||||
|
||||
BehaviorsLookup.ContainerDropZoneBehavior = Marionette.Behavior.extend({
|
||||
defaults: {
|
||||
@ -67,8 +67,8 @@ BehaviorsLookup.ContainerDropZoneBehavior = Marionette.Behavior.extend({
|
||||
// display position visualization there,
|
||||
// remove other visualizations from this container
|
||||
var dropPosition = that.getDropPosition(
|
||||
event.dragmove.pageX,
|
||||
event.dragmove.pageY,
|
||||
event.dragEvent.pageX,
|
||||
event.dragEvent.pageY,
|
||||
view.$el,
|
||||
view.model.get('orientation'),
|
||||
view.model.get('blocks').length,
|
||||
|
@ -8,7 +8,7 @@ import Marionette from 'backbone.marionette';
|
||||
import _ from 'underscore';
|
||||
import jQuery from 'jquery';
|
||||
import { BehaviorsLookup } from 'newsletter-editor/behaviors/behaviors-lookup';
|
||||
import interact from 'interact';
|
||||
import interact from 'interactjs';
|
||||
import { App } from 'newsletter-editor/app';
|
||||
|
||||
var BL = BehaviorsLookup;
|
||||
@ -40,13 +40,11 @@ BL.DraggableBehavior = Marionette.Behavior.extend({
|
||||
// Give instances more control over whether Draggable should be applied
|
||||
if (!this.options.testAttachToInstance(this.view.model, this.view)) return;
|
||||
|
||||
interactable = interact(this.$el.get(0), {
|
||||
ignoreFrom: this.options.ignoreSelector,
|
||||
})
|
||||
interactable = interact(this.$el.get(0))
|
||||
.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,
|
||||
|
||||
// Scroll when dragging near edges of a window
|
||||
autoScroll: true,
|
||||
|
||||
@ -58,6 +56,13 @@ BL.DraggableBehavior = Marionette.Behavior.extend({
|
||||
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) {
|
||||
// Use substitution instead of a clone
|
||||
if (_.isFunction(that.options.onDragSubstituteBy)) {
|
||||
@ -65,7 +70,6 @@ BL.DraggableBehavior = Marionette.Behavior.extend({
|
||||
}
|
||||
// Or use a clone
|
||||
clone = tempClone || event.target.cloneNode(true);
|
||||
jQuery(event.target);
|
||||
$clone = jQuery(clone);
|
||||
|
||||
$clone.addClass('mailpoet_droppable_active');
|
||||
@ -82,7 +86,7 @@ BL.DraggableBehavior = Marionette.Behavior.extend({
|
||||
$clone.css('top', event.pageY - centerYOffset);
|
||||
$clone.css('left', event.pageX - centerXOffset);
|
||||
|
||||
event.interaction.element = clone;
|
||||
event.target.__clone = clone;
|
||||
|
||||
if (that.options.hideOriginal === true) {
|
||||
that.view.$el.addClass('mailpoet_hidden');
|
||||
@ -93,10 +97,15 @@ BL.DraggableBehavior = Marionette.Behavior.extend({
|
||||
},
|
||||
// call this function on every dragmove 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
|
||||
var x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx;
|
||||
var y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy;
|
||||
x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx;
|
||||
y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy;
|
||||
|
||||
// translate the element
|
||||
target.style.transform = 'translate(' + x + 'px, ' + y + 'px)';
|
||||
@ -107,17 +116,23 @@ BL.DraggableBehavior = Marionette.Behavior.extend({
|
||||
target.setAttribute('data-y', y);
|
||||
},
|
||||
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.webkitTransform = target.style.transform;
|
||||
target.removeAttribute('data-x');
|
||||
target.removeAttribute('data-y');
|
||||
jQuery(event.interaction.element).addClass(
|
||||
'mailpoet_droppable_active',
|
||||
);
|
||||
|
||||
if (that.options.cloneOriginal === true) {
|
||||
jQuery(target).remove();
|
||||
endEvent.target.__clone = undefined;
|
||||
|
||||
if (that.options.hideOriginal === true) {
|
||||
that.view.$el.removeClass('mailpoet_hidden');
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
import Marionette from 'backbone.marionette';
|
||||
import { BehaviorsLookup } from 'newsletter-editor/behaviors/behaviors-lookup';
|
||||
import interact from 'interact';
|
||||
import interact from 'interactjs';
|
||||
|
||||
var BL = BehaviorsLookup;
|
||||
|
||||
@ -61,6 +61,9 @@ BL.ResizableBehavior = Marionette.Behavior.extend({
|
||||
.on('resizestart', function resizestart() {
|
||||
that.view.model.trigger('startResizing');
|
||||
document.activeElement.blur();
|
||||
|
||||
// Prevent text selection while resizing
|
||||
document.body.classList.add('mailpoet-is-dragging');
|
||||
})
|
||||
.on('resizemove', function resizemove(event) {
|
||||
var onResize = that.options.onResize.bind(that);
|
||||
@ -69,6 +72,9 @@ BL.ResizableBehavior = Marionette.Behavior.extend({
|
||||
.on('resizeend', function resizeend(event) {
|
||||
that.view.model.trigger('stopResizing', event);
|
||||
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
|
||||
* Version: 5.1.1
|
||||
* Version: 5.1.0
|
||||
* Plugin URI: https://www.mailpoet.com
|
||||
* Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
|
||||
* Author: MailPoet
|
||||
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
$mailpoetPlugin = [
|
||||
'version' => '5.1.1',
|
||||
'version' => '5.1.0',
|
||||
'filename' => __FILE__,
|
||||
'path' => dirname(__FILE__),
|
||||
'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
|
||||
|
@ -77,7 +77,7 @@
|
||||
"handlebars": "^4.7.8",
|
||||
"history": "^4.10.1",
|
||||
"html2canvas": "^1.4.1",
|
||||
"interact.js": "1.2.8",
|
||||
"interactjs": "^1.10.27",
|
||||
"jquery": "^3.7.1",
|
||||
"js-cookie": "^3.0.5",
|
||||
"lodash": "^4.17.21",
|
||||
|
@ -3,7 +3,7 @@ Contributors: mailpoet, woocommerce, automattic
|
||||
Tags: email marketing, post notification, woocommerce emails, email automation, newsletter
|
||||
Requires at least: 6.5
|
||||
Tested up to: 6.6
|
||||
Stable tag: 5.1.1
|
||||
Stable tag: 5.1.0
|
||||
Requires PHP: 7.4
|
||||
License: GPLv3
|
||||
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 ==
|
||||
|
||||
= 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 =
|
||||
* 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)
|
||||
|
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