Remove background images editor announcement
[MAILPOET-1672]
This commit is contained in:
@ -37,7 +37,7 @@
|
||||
top: -3px
|
||||
left: 8px
|
||||
|
||||
.mailpoet_in_app_announcement_background_videos, .mailpoet_drag_and_drop_tutorial
|
||||
.mailpoet_drag_and_drop_tutorial
|
||||
text-align: center
|
||||
h2
|
||||
font-size: 28px
|
||||
|
@ -20,8 +20,3 @@
|
||||
|
||||
p
|
||||
margin: 0
|
||||
|
||||
.mailpoet_editor_announcement
|
||||
position: absolute
|
||||
right: 20px
|
||||
top: 90px
|
||||
|
@ -4,7 +4,6 @@ $content-border-color = $structure-border-color
|
||||
#mailpoet_editor
|
||||
width: 100%
|
||||
clear: both
|
||||
position: relative
|
||||
|
||||
#mailpoet_editor_heading
|
||||
padding-left: 15px
|
||||
|
@ -1,27 +0,0 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import MailPoet from 'mailpoet';
|
||||
import InAppAnnouncement from 'announcements/in_app_announcement.jsx';
|
||||
|
||||
const BackgroundImageAnnouncement = props => (
|
||||
<InAppAnnouncement
|
||||
validUntil={new Date('2018-10-06')}
|
||||
height="700px"
|
||||
showOnlyOnceSlug="background_image"
|
||||
>
|
||||
<div className="mailpoet_in_app_announcement_background_videos">
|
||||
<h2>
|
||||
{MailPoet.I18n.t('announcementBackgroundImagesHeading').replace('%username%', props.username)}
|
||||
</h2>
|
||||
<p>{MailPoet.I18n.t('announcementBackgroundImagesMessage')}</p>
|
||||
<video src={props.videoUrl} controls autoPlay><track kind="captions" /></video>
|
||||
</div>
|
||||
</InAppAnnouncement>
|
||||
);
|
||||
|
||||
BackgroundImageAnnouncement.propTypes = {
|
||||
username: PropTypes.string.isRequired,
|
||||
videoUrl: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default BackgroundImageAnnouncement;
|
@ -3,7 +3,6 @@ import Breadcrumb from 'newsletters/breadcrumb.jsx';
|
||||
import MailPoet from 'mailpoet';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import BackgroundImageAnnouncement from './background_image_announcement.jsx';
|
||||
import displayTutorial from './tutorial.jsx';
|
||||
|
||||
const renderBreadcrumb = (newsletterType) => {
|
||||
@ -18,16 +17,6 @@ const renderBreadcrumb = (newsletterType) => {
|
||||
ReactDOM.render(breadcrumb, breadcrumbContainer);
|
||||
};
|
||||
|
||||
const renderAnnouncement = () => {
|
||||
const container = document.getElementById('mailpoet_editor_announcement');
|
||||
ReactDOM.render(
|
||||
<BackgroundImageAnnouncement
|
||||
username={window.config.currentUserFirstName || window.config.currentUserUsername}
|
||||
videoUrl={window.config.backgroundImageDemoUrl}
|
||||
/>, container
|
||||
);
|
||||
};
|
||||
|
||||
const initializeEditor = (config) => {
|
||||
const editorContainer = document.getElementById('mailpoet_editor');
|
||||
const getUrlParam = param => (location.search.split(`${param}=`)[1] || '').split('&')[0];
|
||||
@ -62,7 +51,6 @@ const initializeEditor = (config) => {
|
||||
});
|
||||
|
||||
renderBreadcrumb(newsletter.type);
|
||||
renderAnnouncement();
|
||||
|
||||
if (newsletter.status === 'sending' && newsletter.queue && newsletter.queue.status === null) {
|
||||
MailPoet.Ajax.post({
|
||||
|
Binary file not shown.
@ -248,7 +248,6 @@
|
||||
<h1 style="display:none"><%= __('Newsletter Editor') %></h1>
|
||||
<div id="mailpoet_editor">
|
||||
<div id="mailpoet_editor_breadcrumb" class="mailpoet_breadcrumbs"></div>
|
||||
<div id="mailpoet_editor_announcement" class="mailpoet_editor_announcement"></div>
|
||||
<div id="mailpoet_editor_top"></div>
|
||||
<div id="mailpoet_editor_heading"></div>
|
||||
<div class="clearfix"></div>
|
||||
@ -367,8 +366,6 @@
|
||||
'cancelColorSelection': _x('Cancel', 'cancel color selection'),
|
||||
'newsletterIsPaused': __('Email sending has been paused.'),
|
||||
'tutorialVideoTitle': __('Before you start, this is how you drag and drop in MailPoet'),
|
||||
'announcementBackgroundImagesHeading': __('Hey %username%, you can now put text over any image.'),
|
||||
'announcementBackgroundImagesMessage': __('Simply edit any column block to add a background image. It works in pretty much every email client, even on mobile.'),
|
||||
'selectType': __('Select type'),
|
||||
'events': __('Events'),
|
||||
'conditions': _x('Conditions', 'Configuration options for automatic email events'),
|
||||
@ -1342,14 +1339,10 @@
|
||||
) %>',
|
||||
},
|
||||
dragDemoUrl: '<%= cdn_url('newsletter-editor/editor-drag-demo.20181121-1440.mp4') %>',
|
||||
backgroundImageDemoUrl: '<%= cdn_url('newsletter-editor/background-image-demo.20181121-1440.mp4') %>',
|
||||
currentUserId: '<%= current_wp_user.wp_user_id %>',
|
||||
currentUserFirstName: '<%= current_wp_user.first_name %>',
|
||||
currentUserUsername: '<%= current_wp_user.login %>',
|
||||
dragDemoUrlSettings: '<%= settings["user_seen_editor_tutorial" ~ current_wp_user.wp_user_id] %>',
|
||||
installedAt: '<%= settings["installed_at"] %>',
|
||||
};
|
||||
var mailpoet_in_app_announcements = <%= json_encode(settings.in_app_announcements) %>;
|
||||
wp.hooks.doAction('mailpoet_newsletters_editor_initialize', config);
|
||||
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user