Remove console.log statements from newsletter editor
This commit is contained in:
@ -12,9 +12,19 @@ define([
|
||||
'newsletter_editor/blocks/button',
|
||||
'newsletter_editor/blocks/divider',
|
||||
'newsletter_editor/components/communication',
|
||||
'mailpoet',
|
||||
'underscore',
|
||||
'jquery'
|
||||
], function(App, BaseBlock, ButtonBlock, DividerBlock, CommunicationComponent, _, jQuery) {
|
||||
], function(
|
||||
App,
|
||||
BaseBlock,
|
||||
ButtonBlock,
|
||||
DividerBlock,
|
||||
CommunicationComponent,
|
||||
MailPoet,
|
||||
_,
|
||||
jQuery
|
||||
) {
|
||||
|
||||
"use strict";
|
||||
|
||||
@ -73,7 +83,7 @@ define([
|
||||
that.get('_container').get('blocks').reset(content, {parse: true});
|
||||
that.trigger('postsChanged');
|
||||
}).fail(function(error) {
|
||||
console.log('ALC fetchPosts error', arguments);
|
||||
MailPoet.Notice(MailPoetI18n.failedToFetchRenderedPosts);
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -101,7 +101,7 @@ define([
|
||||
that.get('_selectedPosts').reset(); // Empty out the collection
|
||||
that.trigger('change:_availablePosts');
|
||||
}).fail(function() {
|
||||
console.log('Posts fetchPosts error', arguments);
|
||||
MailPoet.Notice(MailPoetI18n.failedToFetchAvailablePosts);
|
||||
});
|
||||
},
|
||||
_refreshTransformedPosts: function() {
|
||||
@ -118,7 +118,7 @@ define([
|
||||
CommunicationComponent.getTransformedPosts(data).done(function(posts) {
|
||||
that.get('_transformedPosts').get('blocks').reset(posts, {parse: true});
|
||||
}).fail(function() {
|
||||
console.log('Posts _refreshTransformedPosts error', arguments);
|
||||
MailPoet.Notice(MailPoetI18n.failedToFetchRenderedPosts);
|
||||
});
|
||||
},
|
||||
_insertSelectedPosts: function() {
|
||||
@ -134,7 +134,7 @@ define([
|
||||
CommunicationComponent.getTransformedPosts(data).done(function(posts) {
|
||||
collection.add(posts, { at: index });
|
||||
}).fail(function() {
|
||||
console.log('Posts fetchPosts error', arguments);
|
||||
MailPoet.Notice(MailPoetI18n.failedToFetchRenderedPosts);
|
||||
});
|
||||
},
|
||||
});
|
||||
|
@ -206,12 +206,10 @@ define([
|
||||
}
|
||||
);
|
||||
} else {
|
||||
console.log('Saving template with ', templateName, templateDescription);
|
||||
Module.saveTemplate({
|
||||
name: templateName,
|
||||
description: templateDescription,
|
||||
}).done(function() {
|
||||
console.log('Template saved', arguments);
|
||||
MailPoet.Notice.success(
|
||||
MailPoetI18n.templateSaved,
|
||||
{
|
||||
@ -220,7 +218,6 @@ define([
|
||||
}
|
||||
);
|
||||
}).fail(function() {
|
||||
console.log('Template save failed', arguments);
|
||||
MailPoet.Notice.error(
|
||||
MailPoetI18n.templateSaveFailed,
|
||||
{
|
||||
@ -262,7 +259,6 @@ define([
|
||||
}
|
||||
);
|
||||
} else {
|
||||
console.log('Exporting template with ', templateName, templateDescription);
|
||||
Module.exportTemplate({
|
||||
name: templateName,
|
||||
description: templateDescription,
|
||||
@ -278,7 +274,6 @@ define([
|
||||
next: function() {
|
||||
this.hideOptionContents();
|
||||
if(!this.$('.mailpoet_save_next').hasClass('button-disabled')) {
|
||||
console.log('Next');
|
||||
window.location.href = App.getConfig().get('urls.send');
|
||||
}
|
||||
},
|
||||
|
@ -245,8 +245,6 @@ define([
|
||||
});
|
||||
},
|
||||
sendPreview: function() {
|
||||
// testing sending method
|
||||
console.log('trying to send a preview');
|
||||
// get form data
|
||||
var $emailField = this.$('#mailpoet_preview_to_email');
|
||||
var data = {
|
||||
|
@ -313,6 +313,8 @@
|
||||
</div>
|
||||
|
||||
<%= localize({
|
||||
'failedToFetchAvailablePosts': __('Failed to fetch available posts'),
|
||||
'failedToFetchRenderedPosts': __('Failed to fetch rendered posts'),
|
||||
'customFieldsWindowTitle': __('Select a shortcode'),
|
||||
'unsubscribeLinkMissing': __('All newsletters must include an "unsubscribe" link. Add a footer widget to your newsletter to continue.'),
|
||||
'newsletterPreviewEmailMissing': __('Please enter an email where newsletter preview should be sent to.'),
|
||||
|
Reference in New Issue
Block a user