rebasing on master

This commit is contained in:
Amine Ben hammou
2017-09-27 12:29:19 +00:00
parent c29dc8b4c7
commit 4e2e9f6f8f
38 changed files with 249 additions and 249 deletions

View File

@@ -93,7 +93,7 @@ define([
});
};
Module.saveTemplate = function(options) {
Module.saveTemplate = function (options) {
var promise = jQuery.Deferred();
promise.then(function (thumbnail) {
@@ -119,7 +119,7 @@ define([
return promise;
};
Module.exportTemplate = function(options) {
Module.exportTemplate = function (options) {
return Module.getThumbnail(
jQuery('#mailpoet_editor_content > .mailpoet_block').get(0)
).then(function (thumbnail) {
@@ -152,7 +152,7 @@ define([
'click .mailpoet_save_export': 'toggleExportTemplate',
'click .mailpoet_export_template': 'exportTemplate'
},
initialize: function() {
initialize: function () {
App.getChannel().on('beforeEditorSave', this.beforeSave, this);
App.getChannel().on('afterEditorSave', this.afterSave, this);
},
@@ -167,7 +167,7 @@ define([
// TODO: Add a loading animation instead
this.$('.mailpoet_autosaved_at').text(MailPoet.I18n.t('saving'));
},
afterSave: function(json) {
afterSave: function (json) {
this.validateNewsletter(json);
// Update 'Last saved timer'
this.$('.mailpoet_editor_last_saved').removeClass('mailpoet_hidden');
@@ -188,7 +188,7 @@ define([
hideSaveAsTemplate: function () {
this.$('.mailpoet_save_as_template_container').addClass('mailpoet_hidden');
},
saveAsTemplate: function() {
saveAsTemplate: function () {
var templateName = this.$('.mailpoet_save_as_template_name').val();
var templateDescription = this.$('.mailpoet_save_as_template_description').val();
var that = this;
@@ -244,7 +244,7 @@ define([
hideExportTemplate: function () {
this.$('.mailpoet_export_template_container').addClass('mailpoet_hidden');
},
exportTemplate: function() {
exportTemplate: function () {
var templateName = this.$('.mailpoet_export_template_name').val();
var templateDescription = this.$('.mailpoet_export_template_description').val();
var that = this;
@@ -282,12 +282,12 @@ define([
this.hideOptionContents();
if (!this.$('.mailpoet_save_next').hasClass('button-disabled')) {
Module._cancelAutosave();
Module.save().done(function() {
Module.save().done(function () {
window.location.href = App.getConfig().get('urls.send');
});
}
},
validateNewsletter: function(jsonObject) {
validateNewsletter: function (jsonObject) {
var contents;
if (!App._contentContainer.isValid()) {
this.showValidationError(App._contentContainer.validationError);
@@ -337,7 +337,7 @@ define([
saveTimeout = undefined;
};
Module.beforeExitWithUnsavedChanges = function(e) {
Module.beforeExitWithUnsavedChanges = function (e) {
var message;
var event;
if (saveTimeout) {
@@ -352,7 +352,7 @@ define([
}
};
App.on('before:start', function(App) {
App.on('before:start', function (App) {
var Application = App;
Application.save = Module.save;
Application.getChannel().on('autoSave', Module.autoSave);
@@ -362,7 +362,7 @@ define([
Application.getChannel().reply('save', Application.save);
});
App.on('start', function(App) {
App.on('start', function (App) {
var saveView = new Module.SaveView();
App._appView.showChildView('bottomRegion', saveView);
});