Fix eslint no-undef in ES6
[MAILPOET-1085]
This commit is contained in:
@ -77,7 +77,6 @@
|
||||
"space-infix-ops": 0,
|
||||
"no-irregular-whitespace": 0,
|
||||
"padded-blocks": 0,
|
||||
"no-underscore-dangle": 0,
|
||||
"no-undef": 0
|
||||
"no-underscore-dangle": 0
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ define([
|
||||
'form/fields/checkbox.jsx',
|
||||
'form/fields/selection.jsx',
|
||||
'form/fields/date.jsx',
|
||||
'jquery',
|
||||
],
|
||||
(
|
||||
React,
|
||||
@ -16,7 +17,8 @@ define([
|
||||
FormFieldRadio,
|
||||
FormFieldCheckbox,
|
||||
FormFieldSelection,
|
||||
FormFieldDate
|
||||
FormFieldDate,
|
||||
jQuery
|
||||
) => {
|
||||
const FormField = React.createClass({
|
||||
renderField: function (data, inline = false) {
|
||||
|
@ -116,6 +116,7 @@ define([
|
||||
}
|
||||
},
|
||||
handleChange: function (e) {
|
||||
let value;
|
||||
if(this.props.onValueChange !== undefined) {
|
||||
if(this.props.field.multiple) {
|
||||
value = jQuery('#'+this.refs.select.id).val();
|
||||
|
@ -5,13 +5,15 @@ define(
|
||||
'classnames',
|
||||
'react-router',
|
||||
'form/fields/field.jsx',
|
||||
'jquery',
|
||||
],
|
||||
(
|
||||
React,
|
||||
MailPoet,
|
||||
classNames,
|
||||
Router,
|
||||
FormField
|
||||
FormField,
|
||||
jQuery
|
||||
) => {
|
||||
|
||||
const Form = React.createClass({
|
||||
|
@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import MailPoet from 'mailpoet';
|
||||
import jQuery from 'jquery';
|
||||
import Listing from '../listing/listing.jsx';
|
||||
|
||||
const columns = [
|
||||
@ -128,7 +129,7 @@ const FormList = React.createClass({
|
||||
endpoint: 'forms',
|
||||
action: 'create',
|
||||
}).done((response) => {
|
||||
window.location = mailpoet_form_edit_url + response.data.id;
|
||||
window.location = window.mailpoet_form_edit_url + response.data.id;
|
||||
}).fail((response) => {
|
||||
if (response.errors.length > 0) {
|
||||
MailPoet.Notice.error(
|
||||
@ -145,7 +146,7 @@ const FormList = React.createClass({
|
||||
'has-row-actions'
|
||||
);
|
||||
|
||||
let segments = mailpoet_segments.filter((segment) => {
|
||||
let segments = window.mailpoet_segments.filter((segment) => {
|
||||
return (jQuery.inArray(segment.id, form.segments) !== -1);
|
||||
}).map((segment) => {
|
||||
return segment.name;
|
||||
@ -190,7 +191,7 @@ const FormList = React.createClass({
|
||||
</h1>
|
||||
|
||||
<Listing
|
||||
limit={ mailpoet_listing_per_page }
|
||||
limit={ window.mailpoet_listing_per_page }
|
||||
location={ this.props.location }
|
||||
params={ this.props.params }
|
||||
messages={ messages }
|
||||
|
@ -317,7 +317,7 @@ const NewsletterListNotification = React.createClass({
|
||||
<ListingTabs tab="notification" />
|
||||
|
||||
<Listing
|
||||
limit={ mailpoet_listing_per_page }
|
||||
limit={ window.mailpoet_listing_per_page }
|
||||
location={ this.props.location }
|
||||
params={ this.props.params }
|
||||
endpoint="newsletters"
|
||||
|
@ -110,7 +110,7 @@ const NewsletterListNotificationHistory = React.createClass({
|
||||
>{MailPoet.I18n.t('backToPostNotifications')}</Link>
|
||||
|
||||
<Listing
|
||||
limit={ mailpoet_listing_per_page }
|
||||
limit={ window.mailpoet_listing_per_page }
|
||||
location={ this.props.location }
|
||||
params={ this.props.params }
|
||||
endpoint="newsletters"
|
||||
|
@ -218,7 +218,7 @@ const NewsletterListStandard = React.createClass({
|
||||
<ListingTabs tab="standard" />
|
||||
|
||||
<Listing
|
||||
limit={ mailpoet_listing_per_page }
|
||||
limit={ window.mailpoet_listing_per_page }
|
||||
location={ this.props.location }
|
||||
params={ this.props.params }
|
||||
endpoint="newsletters"
|
||||
|
@ -295,7 +295,7 @@ const NewsletterListWelcome = React.createClass({
|
||||
<ListingTabs tab="welcome" />
|
||||
|
||||
<Listing
|
||||
limit={ mailpoet_listing_per_page }
|
||||
limit={ window.mailpoet_listing_per_page }
|
||||
location={ this.props.location }
|
||||
params={ this.props.params }
|
||||
endpoint="newsletters"
|
||||
|
@ -10,6 +10,7 @@ define(
|
||||
'newsletters/send/welcome.jsx',
|
||||
'newsletters/breadcrumb.jsx',
|
||||
'help-tooltip.jsx',
|
||||
'jquery',
|
||||
],
|
||||
(
|
||||
React,
|
||||
@ -21,7 +22,8 @@ define(
|
||||
NotificationNewsletterFields,
|
||||
WelcomeNewsletterFields,
|
||||
Breadcrumb,
|
||||
HelpTooltip
|
||||
HelpTooltip,
|
||||
jQuery
|
||||
) => {
|
||||
|
||||
const NewsletterSend = React.createClass({
|
||||
|
@ -258,7 +258,7 @@ const SegmentList = React.createClass({
|
||||
</h1>
|
||||
|
||||
<Listing
|
||||
limit={ mailpoet_listing_per_page }
|
||||
limit={ window.mailpoet_listing_per_page }
|
||||
location={ this.props.location }
|
||||
params={ this.props.params }
|
||||
messages={ messages }
|
||||
|
@ -83,7 +83,7 @@ const messages = {
|
||||
MailPoet.Notice.success(message);
|
||||
},
|
||||
onNoItemsFound: (group) => {
|
||||
if (group === 'bounced' && !mailpoet_premium_active) {
|
||||
if (group === 'bounced' && !window.mailpoet_premium_active) {
|
||||
return (
|
||||
<div>
|
||||
<p>{MailPoet.I18n.t('bouncedSubscribersHelp')}</p>
|
||||
@ -245,7 +245,7 @@ const item_actions = [
|
||||
const SubscriberList = React.createClass({
|
||||
getSegmentFromId: function (segment_id) {
|
||||
let result = false;
|
||||
mailpoet_segments.map((segment) => {
|
||||
window.mailpoet_segments.map((segment) => {
|
||||
if (segment.id === segment_id) {
|
||||
result = segment;
|
||||
}
|
||||
@ -350,7 +350,7 @@ const SubscriberList = React.createClass({
|
||||
</h1>
|
||||
|
||||
<Listing
|
||||
limit={ mailpoet_listing_per_page }
|
||||
limit={ window.mailpoet_listing_per_page }
|
||||
location={ this.props.location }
|
||||
params={ this.props.params }
|
||||
endpoint="subscribers"
|
||||
|
Reference in New Issue
Block a user