Fix semi eslint rule
[MAILPOET-985]
This commit is contained in:
@ -49,7 +49,6 @@
|
|||||||
"prefer-template": 0,
|
"prefer-template": 0,
|
||||||
"eol-last": 0,
|
"eol-last": 0,
|
||||||
"no-unused-vars": 0,
|
"no-unused-vars": 0,
|
||||||
"semi": 0,
|
|
||||||
"keyword-spacing": 0,
|
"keyword-spacing": 0,
|
||||||
"default-case": 0,
|
"default-case": 0,
|
||||||
"quote-props": 0,
|
"quote-props": 0,
|
||||||
|
@ -105,7 +105,7 @@ define([
|
|||||||
year: '',
|
year: '',
|
||||||
month: '',
|
month: '',
|
||||||
day: ''
|
day: ''
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.extractDateParts();
|
this.extractDateParts();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import _ from 'underscore'
|
import _ from 'underscore';
|
||||||
|
|
||||||
const FormFieldSelect = React.createClass({
|
const FormFieldSelect = React.createClass({
|
||||||
render() {
|
render() {
|
||||||
@ -38,7 +38,7 @@ const FormFieldSelect = React.createClass({
|
|||||||
(item) => item[0]
|
(item) => item[0]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
keys = Object.keys(this.props.field.values)
|
keys = Object.keys(this.props.field.values);
|
||||||
}
|
}
|
||||||
|
|
||||||
const options = keys.map(
|
const options = keys.map(
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
|
|
||||||
const FormFieldText = React.createClass({
|
const FormFieldText = React.createClass({
|
||||||
render() {
|
render() {
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from 'react-dom';
|
||||||
import { Router, Route, IndexRoute, Link, useRouterHistory } from 'react-router'
|
import { Router, Route, IndexRoute, Link, useRouterHistory } from 'react-router';
|
||||||
import { createHashHistory } from 'history'
|
import { createHashHistory } from 'history';
|
||||||
import FormList from 'forms/list.jsx'
|
import FormList from 'forms/list.jsx';
|
||||||
|
|
||||||
const history = useRouterHistory(createHashHistory)({ queryKey: false });
|
const history = useRouterHistory(createHashHistory)({ queryKey: false });
|
||||||
|
|
||||||
const App = React.createClass({
|
const App = React.createClass({
|
||||||
render() {
|
render() {
|
||||||
return this.props.children
|
return this.props.children;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from 'react-dom';
|
||||||
import { Router, Link } from 'react-router'
|
import { Router, Link } from 'react-router';
|
||||||
import Listing from 'listing/listing.jsx'
|
import Listing from 'listing/listing.jsx';
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames';
|
||||||
import MailPoet from 'mailpoet'
|
import MailPoet from 'mailpoet';
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from 'react-dom';
|
||||||
import { Router, Route, IndexRedirect, useRouterHistory } from 'react-router'
|
import { Router, Route, IndexRedirect, useRouterHistory } from 'react-router';
|
||||||
import { createHashHistory } from 'history'
|
import { createHashHistory } from 'history';
|
||||||
|
|
||||||
import KnowledgeBase from 'help/knowledge_base.jsx'
|
import KnowledgeBase from 'help/knowledge_base.jsx';
|
||||||
import SystemInfo from 'help/system_info.jsx'
|
import SystemInfo from 'help/system_info.jsx';
|
||||||
|
|
||||||
const history = useRouterHistory(createHashHistory)({ queryKey: false });
|
const history = useRouterHistory(createHashHistory)({ queryKey: false });
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import MailPoet from 'mailpoet'
|
import MailPoet from 'mailpoet';
|
||||||
|
|
||||||
import Tabs from './tabs.jsx'
|
import Tabs from './tabs.jsx';
|
||||||
|
|
||||||
function KnowledgeBase() {
|
function KnowledgeBase() {
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import MailPoet from 'mailpoet'
|
import MailPoet from 'mailpoet';
|
||||||
import _ from 'underscore'
|
import _ from 'underscore';
|
||||||
|
|
||||||
import Tabs from './tabs.jsx'
|
import Tabs from './tabs.jsx';
|
||||||
|
|
||||||
function handleFocus(event) {
|
function handleFocus(event) {
|
||||||
event.target.select();
|
event.target.select();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import { Link } from 'react-router'
|
import { Link } from 'react-router';
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames';
|
||||||
import MailPoet from 'mailpoet'
|
import MailPoet from 'mailpoet';
|
||||||
|
|
||||||
const tabs = [
|
const tabs = [
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ function(
|
|||||||
return {
|
return {
|
||||||
action: false,
|
action: false,
|
||||||
extra: false
|
extra: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
handleChangeAction: function(e) {
|
handleChangeAction: function(e) {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
@ -12,7 +12,7 @@ function(
|
|||||||
handleFilterAction: function() {
|
handleFilterAction: function() {
|
||||||
let filters = {};
|
let filters = {};
|
||||||
this.getAvailableFilters().map((filter, i) => {
|
this.getAvailableFilters().map((filter, i) => {
|
||||||
filters[this.refs['filter-'+i].name] = this.refs['filter-'+i].value
|
filters[this.refs['filter-'+i].name] = this.refs['filter-'+i].value;
|
||||||
});
|
});
|
||||||
return this.props.onSelectFilter(filters);
|
return this.props.onSelectFilter(filters);
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import MailPoet from 'mailpoet'
|
import MailPoet from 'mailpoet';
|
||||||
import React from 'react'
|
import React from 'react';
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames';
|
||||||
|
|
||||||
const ListingHeader = React.createClass({
|
const ListingHeader = React.createClass({
|
||||||
handleSelectItems: function() {
|
handleSelectItems: function() {
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import MailPoet from 'mailpoet'
|
import MailPoet from 'mailpoet';
|
||||||
import jQuery from 'jquery'
|
import jQuery from 'jquery';
|
||||||
import React from 'react'
|
import React from 'react';
|
||||||
import _ from 'underscore'
|
import _ from 'underscore';
|
||||||
import { Router, Link } from 'react-router'
|
import { Router, Link } from 'react-router';
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames';
|
||||||
import ListingBulkActions from 'listing/bulk_actions.jsx'
|
import ListingBulkActions from 'listing/bulk_actions.jsx';
|
||||||
import ListingHeader from 'listing/header.jsx'
|
import ListingHeader from 'listing/header.jsx';
|
||||||
import ListingPages from 'listing/pages.jsx'
|
import ListingPages from 'listing/pages.jsx';
|
||||||
import ListingSearch from 'listing/search.jsx'
|
import ListingSearch from 'listing/search.jsx';
|
||||||
import ListingGroups from 'listing/groups.jsx'
|
import ListingGroups from 'listing/groups.jsx';
|
||||||
import ListingFilters from 'listing/filters.jsx'
|
import ListingFilters from 'listing/filters.jsx';
|
||||||
|
|
||||||
const ListingItem = React.createClass({
|
const ListingItem = React.createClass({
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
@ -324,8 +324,8 @@ const Listing = React.createClass({
|
|||||||
case 'filter':
|
case 'filter':
|
||||||
let filters = {};
|
let filters = {};
|
||||||
value.split('&').map(function(pair) {
|
value.split('&').map(function(pair) {
|
||||||
let [k, v] = pair.split('=')
|
let [k, v] = pair.split('=');
|
||||||
filters[k] = v
|
filters[k] = v;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -380,21 +380,21 @@ const Listing = React.createClass({
|
|||||||
'sort_by',
|
'sort_by',
|
||||||
'sort_order'
|
'sort_order'
|
||||||
].indexOf(key) !== -1
|
].indexOf(key) !== -1
|
||||||
)
|
);
|
||||||
})
|
})
|
||||||
.map(key => {
|
.map(key => {
|
||||||
let value = this.state[key];
|
let value = this.state[key];
|
||||||
if (value === Object(value)) {
|
if (value === Object(value)) {
|
||||||
value = jQuery.param(value)
|
value = jQuery.param(value);
|
||||||
} else if (value === Boolean(value)) {
|
} else if (value === Boolean(value)) {
|
||||||
value = value.toString()
|
value = value.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value !== '' && value !== null) {
|
if (value !== '' && value !== null) {
|
||||||
return `${key}[${value}]`
|
return `${key}[${value}]`;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.filter(key => { return (key !== undefined) })
|
.filter(key => { return (key !== undefined); })
|
||||||
.join('/');
|
.join('/');
|
||||||
|
|
||||||
// set url
|
// set url
|
||||||
@ -616,7 +616,7 @@ const Listing = React.createClass({
|
|||||||
filter: this.state.filter,
|
filter: this.state.filter,
|
||||||
group: this.state.group,
|
group: this.state.group,
|
||||||
search: this.state.search
|
search: this.state.search
|
||||||
}
|
};
|
||||||
if (selected_ids !== 'all') {
|
if (selected_ids !== 'all') {
|
||||||
data.listing.selection = selected_ids;
|
data.listing.selection = selected_ids;
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ define([
|
|||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
return {
|
return {
|
||||||
page: null
|
page: null
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
setPage: function(page) {
|
setPage: function(page) {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
@ -14,7 +14,7 @@ define([
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
componentWillReceiveProps: function(nextProps) {
|
componentWillReceiveProps: function(nextProps) {
|
||||||
this.refs.search.value = nextProps.search
|
this.refs.search.value = nextProps.search;
|
||||||
},
|
},
|
||||||
render: function() {
|
render: function() {
|
||||||
if(this.props.search === false) {
|
if(this.props.search === false) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames';
|
||||||
import ReactTooltip from 'react-tooltip'
|
import ReactTooltip from 'react-tooltip';
|
||||||
|
|
||||||
class Badge extends React.Component {
|
class Badge extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import MailPoet from 'mailpoet'
|
import MailPoet from 'mailpoet';
|
||||||
import React from 'react'
|
import React from 'react';
|
||||||
|
|
||||||
import Badge from './badge.jsx'
|
import Badge from './badge.jsx';
|
||||||
|
|
||||||
const badges = {
|
const badges = {
|
||||||
excellent: {
|
excellent: {
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from 'react-dom';
|
||||||
import ReactStringReplace from 'react-string-replace'
|
import ReactStringReplace from 'react-string-replace';
|
||||||
import { Link } from 'react-router'
|
import { Link } from 'react-router';
|
||||||
import MailPoet from 'mailpoet'
|
import MailPoet from 'mailpoet';
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames';
|
||||||
import moment from 'moment'
|
import moment from 'moment';
|
||||||
import jQuery from 'jquery'
|
import jQuery from 'jquery';
|
||||||
import Hooks from 'wp-js-hooks'
|
import Hooks from 'wp-js-hooks';
|
||||||
import StatsBadge from 'newsletters/badges/stats.jsx'
|
import StatsBadge from 'newsletters/badges/stats.jsx';
|
||||||
|
|
||||||
const _QueueMixin = {
|
const _QueueMixin = {
|
||||||
pauseSending: function(newsletter) {
|
pauseSending: function(newsletter) {
|
||||||
@ -58,14 +58,14 @@ const _QueueMixin = {
|
|||||||
} else if (mailer_log.status === 'paused' && newsletter.queue.status !== 'completed') {
|
} else if (mailer_log.status === 'paused' && newsletter.queue.status !== 'completed') {
|
||||||
return (
|
return (
|
||||||
<span>{MailPoet.I18n.t('paused')}</span>
|
<span>{MailPoet.I18n.t('paused')}</span>
|
||||||
)
|
);
|
||||||
} else {
|
} else {
|
||||||
if (newsletter.queue.status === 'scheduled') {
|
if (newsletter.queue.status === 'scheduled') {
|
||||||
return (
|
return (
|
||||||
<span>
|
<span>
|
||||||
{ MailPoet.I18n.t('scheduledFor') } { MailPoet.Date.format(newsletter.queue.scheduled_at) }
|
{ MailPoet.I18n.t('scheduledFor') } { MailPoet.Date.format(newsletter.queue.scheduled_at) }
|
||||||
</span>
|
</span>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
const progressClasses = classNames(
|
const progressClasses = classNames(
|
||||||
'mailpoet_progress',
|
'mailpoet_progress',
|
||||||
@ -149,7 +149,7 @@ const _StatisticsMixin = {
|
|||||||
// condition for standard and post notification listings
|
// condition for standard and post notification listings
|
||||||
is_sent = newsletter.statistics
|
is_sent = newsletter.statistics
|
||||||
&& newsletter.queue
|
&& newsletter.queue
|
||||||
&& newsletter.queue.status !== 'scheduled'
|
&& newsletter.queue.status !== 'scheduled';
|
||||||
}
|
}
|
||||||
if (!is_sent) {
|
if (!is_sent) {
|
||||||
return (
|
return (
|
||||||
@ -301,7 +301,7 @@ const _StatisticsMixin = {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
const _MailerMixin = {
|
const _MailerMixin = {
|
||||||
checkMailerStatus: function(state) {
|
checkMailerStatus: function(state) {
|
||||||
@ -369,7 +369,7 @@ const _MailerMixin = {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import { Router, Route, IndexRoute, Link, useRouterHistory } from 'react-router'
|
import { Router, Route, IndexRoute, Link, useRouterHistory } from 'react-router';
|
||||||
import { createHashHistory } from 'history'
|
import { createHashHistory } from 'history';
|
||||||
|
|
||||||
import Listing from 'listing/listing.jsx'
|
import Listing from 'listing/listing.jsx';
|
||||||
import ListingTabs from 'newsletters/listings/tabs.jsx'
|
import ListingTabs from 'newsletters/listings/tabs.jsx';
|
||||||
|
|
||||||
import { MailerMixin } from 'newsletters/listings/mixins.jsx'
|
import { MailerMixin } from 'newsletters/listings/mixins.jsx';
|
||||||
|
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames';
|
||||||
import jQuery from 'jquery'
|
import jQuery from 'jquery';
|
||||||
import MailPoet from 'mailpoet'
|
import MailPoet from 'mailpoet';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
timeOfDayValues,
|
timeOfDayValues,
|
||||||
weekDayValues,
|
weekDayValues,
|
||||||
monthDayValues,
|
monthDayValues,
|
||||||
nthWeekDayValues
|
nthWeekDayValues
|
||||||
} from 'newsletters/scheduling/common.jsx'
|
} from 'newsletters/scheduling/common.jsx';
|
||||||
|
|
||||||
const mailpoet_settings = window.mailpoet_settings || {};
|
const mailpoet_settings = window.mailpoet_settings || {};
|
||||||
|
|
||||||
@ -203,7 +203,7 @@ const NewsletterListNotification = React.createClass({
|
|||||||
|
|
||||||
// get list of segments' name
|
// get list of segments' name
|
||||||
const segments = newsletter.segments.map(function(segment) {
|
const segments = newsletter.segments.map(function(segment) {
|
||||||
return segment.name
|
return segment.name;
|
||||||
});
|
});
|
||||||
|
|
||||||
// check if the user has specified segments to send to
|
// check if the user has specified segments to send to
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import { Router, Link } from 'react-router'
|
import { Router, Link } from 'react-router';
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames';
|
||||||
import jQuery from 'jquery'
|
import jQuery from 'jquery';
|
||||||
import MailPoet from 'mailpoet'
|
import MailPoet from 'mailpoet';
|
||||||
import Hooks from 'wp-js-hooks'
|
import Hooks from 'wp-js-hooks';
|
||||||
|
|
||||||
import Listing from 'listing/listing.jsx'
|
import Listing from 'listing/listing.jsx';
|
||||||
import ListingTabs from 'newsletters/listings/tabs.jsx'
|
import ListingTabs from 'newsletters/listings/tabs.jsx';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
QueueMixin,
|
QueueMixin,
|
||||||
StatisticsMixin,
|
StatisticsMixin,
|
||||||
MailerMixin
|
MailerMixin
|
||||||
} from 'newsletters/listings/mixins.jsx'
|
} from 'newsletters/listings/mixins.jsx';
|
||||||
|
|
||||||
const mailpoet_tracking_enabled = (!!(window['mailpoet_tracking_enabled']));
|
const mailpoet_tracking_enabled = (!!(window['mailpoet_tracking_enabled']));
|
||||||
const mailpoet_settings = window.mailpoet_settings || {};
|
const mailpoet_settings = window.mailpoet_settings || {};
|
||||||
@ -61,7 +61,7 @@ const NewsletterListNotificationHistory = React.createClass({
|
|||||||
renderSentDate: function(newsletter) {
|
renderSentDate: function(newsletter) {
|
||||||
return (newsletter.queue.status === 'completed')
|
return (newsletter.queue.status === 'completed')
|
||||||
? ( <abbr>{ MailPoet.Date.format(newsletter.updated_at) }</abbr> )
|
? ( <abbr>{ MailPoet.Date.format(newsletter.updated_at) }</abbr> )
|
||||||
: MailPoet.I18n.t('notSentYet')
|
: MailPoet.I18n.t('notSentYet');
|
||||||
},
|
},
|
||||||
renderItem: function(newsletter, actions, meta) {
|
renderItem: function(newsletter, actions, meta) {
|
||||||
const rowClasses = classNames(
|
const rowClasses = classNames(
|
||||||
@ -71,7 +71,7 @@ const NewsletterListNotificationHistory = React.createClass({
|
|||||||
);
|
);
|
||||||
|
|
||||||
const segments = newsletter.segments.map(function(segment) {
|
const segments = newsletter.segments.map(function(segment) {
|
||||||
return segment.name
|
return segment.name;
|
||||||
}).join(', ');
|
}).join(', ');
|
||||||
|
|
||||||
const mailer_log = window.mailpoet_settings.mta_log || {};
|
const mailer_log = window.mailpoet_settings.mta_log || {};
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import { Link } from 'react-router'
|
import { Link } from 'react-router';
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames';
|
||||||
import MailPoet from 'mailpoet'
|
import MailPoet from 'mailpoet';
|
||||||
import Hooks from 'wp-js-hooks'
|
import Hooks from 'wp-js-hooks';
|
||||||
|
|
||||||
import Listing from 'listing/listing.jsx'
|
import Listing from 'listing/listing.jsx';
|
||||||
import ListingTabs from 'newsletters/listings/tabs.jsx'
|
import ListingTabs from 'newsletters/listings/tabs.jsx';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
QueueMixin,
|
QueueMixin,
|
||||||
StatisticsMixin,
|
StatisticsMixin,
|
||||||
MailerMixin
|
MailerMixin
|
||||||
} from 'newsletters/listings/mixins.jsx'
|
} from 'newsletters/listings/mixins.jsx';
|
||||||
|
|
||||||
const mailpoet_tracking_enabled = (!!(window['mailpoet_tracking_enabled']));
|
const mailpoet_tracking_enabled = (!!(window['mailpoet_tracking_enabled']));
|
||||||
const mailpoet_settings = window.mailpoet_settings || {};
|
const mailpoet_settings = window.mailpoet_settings || {};
|
||||||
@ -164,7 +164,7 @@ const NewsletterListStandard = React.createClass({
|
|||||||
);
|
);
|
||||||
|
|
||||||
const segments = newsletter.segments.map(function(segment) {
|
const segments = newsletter.segments.map(function(segment) {
|
||||||
return segment.name
|
return segment.name;
|
||||||
}).join(', ');
|
}).join(', ');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import { Link } from 'react-router'
|
import { Link } from 'react-router';
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames';
|
||||||
import MailPoet from 'mailpoet'
|
import MailPoet from 'mailpoet';
|
||||||
|
|
||||||
const ListingTabs = React.createClass({
|
const ListingTabs = React.createClass({
|
||||||
getInitialState() {
|
getInitialState() {
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import { Router, Route, IndexRoute, Link, useRouterHistory } from 'react-router'
|
import { Router, Route, IndexRoute, Link, useRouterHistory } from 'react-router';
|
||||||
import { createHashHistory } from 'history'
|
import { createHashHistory } from 'history';
|
||||||
|
|
||||||
import Listing from 'listing/listing.jsx'
|
import Listing from 'listing/listing.jsx';
|
||||||
import ListingTabs from 'newsletters/listings/tabs.jsx'
|
import ListingTabs from 'newsletters/listings/tabs.jsx';
|
||||||
|
|
||||||
import { StatisticsMixin, MailerMixin } from 'newsletters/listings/mixins.jsx'
|
import { StatisticsMixin, MailerMixin } from 'newsletters/listings/mixins.jsx';
|
||||||
|
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames';
|
||||||
import jQuery from 'jquery'
|
import jQuery from 'jquery';
|
||||||
import MailPoet from 'mailpoet'
|
import MailPoet from 'mailpoet';
|
||||||
import _ from 'underscore'
|
import _ from 'underscore';
|
||||||
import Hooks from 'wp-js-hooks'
|
import Hooks from 'wp-js-hooks';
|
||||||
|
|
||||||
const mailpoet_roles = window.mailpoet_roles || {};
|
const mailpoet_roles = window.mailpoet_roles || {};
|
||||||
const mailpoet_segments = window.mailpoet_segments || {};
|
const mailpoet_segments = window.mailpoet_segments || {};
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from 'react-dom';
|
||||||
import { Router, Route, IndexRedirect, Link, useRouterHistory } from 'react-router'
|
import { Router, Route, IndexRedirect, Link, useRouterHistory } from 'react-router';
|
||||||
import { createHashHistory } from 'history'
|
import { createHashHistory } from 'history';
|
||||||
import Hooks from 'wp-js-hooks'
|
import Hooks from 'wp-js-hooks';
|
||||||
|
|
||||||
import NewsletterTypes from 'newsletters/types.jsx'
|
import NewsletterTypes from 'newsletters/types.jsx';
|
||||||
import NewsletterTemplates from 'newsletters/templates.jsx'
|
import NewsletterTemplates from 'newsletters/templates.jsx';
|
||||||
import NewsletterSend from 'newsletters/send.jsx'
|
import NewsletterSend from 'newsletters/send.jsx';
|
||||||
|
|
||||||
import NewsletterTypeStandard from 'newsletters/types/standard.jsx'
|
import NewsletterTypeStandard from 'newsletters/types/standard.jsx';
|
||||||
import NewsletterTypeNotification from 'newsletters/types/notification/notification.jsx'
|
import NewsletterTypeNotification from 'newsletters/types/notification/notification.jsx';
|
||||||
|
|
||||||
import NewsletterListStandard from 'newsletters/listings/standard.jsx'
|
import NewsletterListStandard from 'newsletters/listings/standard.jsx';
|
||||||
import NewsletterListWelcome from 'newsletters/listings/welcome.jsx'
|
import NewsletterListWelcome from 'newsletters/listings/welcome.jsx';
|
||||||
import NewsletterListNotification from 'newsletters/listings/notification.jsx'
|
import NewsletterListNotification from 'newsletters/listings/notification.jsx';
|
||||||
import NewsletterListNotificationHistory from 'newsletters/listings/notification_history.jsx'
|
import NewsletterListNotificationHistory from 'newsletters/listings/notification_history.jsx';
|
||||||
|
|
||||||
const history = useRouterHistory(createHashHistory)({ queryKey: false });
|
const history = useRouterHistory(createHashHistory)({ queryKey: false });
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import _ from 'underscore'
|
import _ from 'underscore';
|
||||||
import MailPoet from 'mailpoet'
|
import MailPoet from 'mailpoet';
|
||||||
|
|
||||||
const timeFormat = window.mailpoet_time_format || 'H:i';
|
const timeFormat = window.mailpoet_time_format || 'H:i';
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ define(
|
|||||||
},
|
},
|
||||||
_buildStateFromProps: function(props) {
|
_buildStateFromProps: function(props) {
|
||||||
let value = props.value || defaultDateTime;
|
let value = props.value || defaultDateTime;
|
||||||
const [date, time] = value.split(this._DATE_TIME_SEPARATOR)
|
const [date, time] = value.split(this._DATE_TIME_SEPARATOR);
|
||||||
return {
|
return {
|
||||||
date: date,
|
date: date,
|
||||||
time: time,
|
time: time,
|
||||||
@ -227,7 +227,7 @@ define(
|
|||||||
name: this.props.name || '',
|
name: this.props.name || '',
|
||||||
value: this.getDateTime(),
|
value: this.getDateTime(),
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getDateTime: function() {
|
getDateTime: function() {
|
||||||
|
@ -53,7 +53,7 @@ define(
|
|||||||
<a className="button button-primary" onClick={ this.createNewsletter.bind(null, 'standard') }>
|
<a className="button button-primary" onClick={ this.createNewsletter.bind(null, 'standard') }>
|
||||||
{MailPoet.I18n.t('create')}
|
{MailPoet.I18n.t('create')}
|
||||||
</a>
|
</a>
|
||||||
)
|
);
|
||||||
}.bind(this)()
|
}.bind(this)()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -67,7 +67,7 @@ define(
|
|||||||
{MailPoet.I18n.t('getPremiumVersion')}
|
{MailPoet.I18n.t('getPremiumVersion')}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}()
|
}()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -79,7 +79,7 @@ define(
|
|||||||
<a className="button button-primary" onClick={ this.setupNewsletter.bind(null, 'notification') }>
|
<a className="button button-primary" onClick={ this.setupNewsletter.bind(null, 'notification') }>
|
||||||
{MailPoet.I18n.t('setUp')}
|
{MailPoet.I18n.t('setUp')}
|
||||||
</a>
|
</a>
|
||||||
)
|
);
|
||||||
}.bind(this)()
|
}.bind(this)()
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@ -109,7 +109,7 @@ define(
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
)
|
);
|
||||||
}, this)}
|
}, this)}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import _ from 'underscore'
|
import _ from 'underscore';
|
||||||
import React from 'react'
|
import React from 'react';
|
||||||
import Select from 'form/fields/select.jsx'
|
import Select from 'form/fields/select.jsx';
|
||||||
import {
|
import {
|
||||||
intervalValues,
|
intervalValues,
|
||||||
timeOfDayValues,
|
timeOfDayValues,
|
||||||
weekDayValues,
|
weekDayValues,
|
||||||
monthDayValues,
|
monthDayValues,
|
||||||
nthWeekDayValues
|
nthWeekDayValues
|
||||||
} from 'newsletters/scheduling/common.jsx'
|
} from 'newsletters/scheduling/common.jsx';
|
||||||
|
|
||||||
const intervalField = {
|
const intervalField = {
|
||||||
name: 'intervalType',
|
name: 'intervalType',
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import _ from 'underscore'
|
import _ from 'underscore';
|
||||||
import React from 'react'
|
import React from 'react';
|
||||||
import MailPoet from 'mailpoet'
|
import MailPoet from 'mailpoet';
|
||||||
import Select from 'form/fields/select.jsx'
|
import Select from 'form/fields/select.jsx';
|
||||||
import Text from 'form/fields/text.jsx'
|
import Text from 'form/fields/text.jsx';
|
||||||
import {
|
import {
|
||||||
timeDelayValues,
|
timeDelayValues,
|
||||||
intervalValues
|
intervalValues
|
||||||
} from 'newsletters/scheduling/common.jsx'
|
} from 'newsletters/scheduling/common.jsx';
|
||||||
|
|
||||||
const availableRoles = window.mailpoet_roles || {};
|
const availableRoles = window.mailpoet_roles || {};
|
||||||
const availableSegments = _.filter(
|
const availableSegments = _.filter(
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import { Router, Link } from 'react-router'
|
import { Router, Link } from 'react-router';
|
||||||
import jQuery from 'jquery'
|
import jQuery from 'jquery';
|
||||||
import MailPoet from 'mailpoet'
|
import MailPoet from 'mailpoet';
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames';
|
||||||
|
|
||||||
import Listing from 'listing/listing.jsx'
|
import Listing from 'listing/listing.jsx';
|
||||||
|
|
||||||
var columns = [
|
var columns = [
|
||||||
{
|
{
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from 'react-dom';
|
||||||
import { Router, Route, IndexRoute, Link, useRouterHistory } from 'react-router'
|
import { Router, Route, IndexRoute, Link, useRouterHistory } from 'react-router';
|
||||||
import { createHashHistory } from 'history'
|
import { createHashHistory } from 'history';
|
||||||
|
|
||||||
import SegmentList from 'segments/list.jsx'
|
import SegmentList from 'segments/list.jsx';
|
||||||
import SegmentForm from 'segments/form.jsx'
|
import SegmentForm from 'segments/form.jsx';
|
||||||
|
|
||||||
const history = useRouterHistory(createHashHistory)({ queryKey: false });
|
const history = useRouterHistory(createHashHistory)({ queryKey: false });
|
||||||
|
|
||||||
const App = React.createClass({
|
const App = React.createClass({
|
||||||
render() {
|
render() {
|
||||||
return this.props.children
|
return this.props.children;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ define(
|
|||||||
</strong> { MailPoet.I18n.t('customFieldsTip') }
|
</strong> { MailPoet.I18n.t('customFieldsTip') }
|
||||||
</p>
|
</p>
|
||||||
);
|
);
|
||||||
}
|
};
|
||||||
|
|
||||||
var Link = Router.Link;
|
var Link = Router.Link;
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import { Router, Route, Link } from 'react-router'
|
import { Router, Route, Link } from 'react-router';
|
||||||
|
|
||||||
import jQuery from 'jquery'
|
import jQuery from 'jquery';
|
||||||
import MailPoet from 'mailpoet'
|
import MailPoet from 'mailpoet';
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames';
|
||||||
|
|
||||||
import Listing from 'listing/listing.jsx'
|
import Listing from 'listing/listing.jsx';
|
||||||
import Selection from 'form/fields/selection.jsx'
|
import Selection from 'form/fields/selection.jsx';
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
@ -123,7 +123,7 @@ const bulk_actions = [
|
|||||||
getData: function() {
|
getData: function() {
|
||||||
return {
|
return {
|
||||||
segment_id: ~~(jQuery('#move_to_segment').val())
|
segment_id: ~~(jQuery('#move_to_segment').val())
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
onSuccess: function(response) {
|
onSuccess: function(response) {
|
||||||
MailPoet.Notice.success(
|
MailPoet.Notice.success(
|
||||||
@ -155,7 +155,7 @@ const bulk_actions = [
|
|||||||
getData: function() {
|
getData: function() {
|
||||||
return {
|
return {
|
||||||
segment_id: ~~(jQuery('#add_to_segment').val())
|
segment_id: ~~(jQuery('#add_to_segment').val())
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
onSuccess: function(response) {
|
onSuccess: function(response) {
|
||||||
MailPoet.Notice.success(
|
MailPoet.Notice.success(
|
||||||
@ -187,7 +187,7 @@ const bulk_actions = [
|
|||||||
getData: function() {
|
getData: function() {
|
||||||
return {
|
return {
|
||||||
segment_id: ~~(jQuery('#remove_from_segment').val())
|
segment_id: ~~(jQuery('#remove_from_segment').val())
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
onSuccess: function(response) {
|
onSuccess: function(response) {
|
||||||
MailPoet.Notice.success(
|
MailPoet.Notice.success(
|
||||||
@ -377,7 +377,7 @@ const SubscriberList = React.createClass({
|
|||||||
sort_order={ 'desc' }
|
sort_order={ 'desc' }
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from 'react-dom';
|
||||||
import { Router, Route, IndexRoute, Link, useRouterHistory } from 'react-router'
|
import { Router, Route, IndexRoute, Link, useRouterHistory } from 'react-router';
|
||||||
import { createHashHistory } from 'history'
|
import { createHashHistory } from 'history';
|
||||||
import SubscriberList from 'subscribers/list.jsx'
|
import SubscriberList from 'subscribers/list.jsx';
|
||||||
import SubscriberForm from 'subscribers/form.jsx'
|
import SubscriberForm from 'subscribers/form.jsx';
|
||||||
|
|
||||||
const history = useRouterHistory(createHashHistory)({ queryKey: false });
|
const history = useRouterHistory(createHashHistory)({ queryKey: false });
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ const App = React.createClass({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const container = document.getElementById('subscribers_container')
|
const container = document.getElementById('subscribers_container');
|
||||||
|
|
||||||
if(container) {
|
if(container) {
|
||||||
ReactDOM.render((
|
ReactDOM.render((
|
||||||
|
Reference in New Issue
Block a user