- Fix double HR tag issue on ALC/Posts block settings;
- Change "Drop content here" message to a custom one for Posts/ALC blocks
This commit is contained in:
@@ -154,6 +154,7 @@ define([
|
||||
renderOptions = {
|
||||
disableTextEditor: true,
|
||||
disableDragAndDrop: true,
|
||||
emptyContainerMessage: MailPoet.I18n.t('noPostsToDisplay'),
|
||||
};
|
||||
this.toolsView = new Module.AutomatedLatestContentBlockToolsView({ model: this.model });
|
||||
this.toolsRegion.show(this.toolsView);
|
||||
@@ -315,9 +316,11 @@ define([
|
||||
if (value == 'titleOnly') {
|
||||
this.$('.mailpoet_automated_latest_content_title_as_list').removeClass('mailpoet_hidden');
|
||||
this.$('.mailpoet_automated_latest_content_image_full_width_option').addClass('mailpoet_hidden');
|
||||
this.$('.mailpoet_automated_latest_content_image_separator').addClass('mailpoet_hidden');
|
||||
} else {
|
||||
this.$('.mailpoet_automated_latest_content_title_as_list').addClass('mailpoet_hidden');
|
||||
this.$('.mailpoet_automated_latest_content_image_full_width_option').removeClass('mailpoet_hidden');
|
||||
this.$('.mailpoet_automated_latest_content_image_separator').removeClass('mailpoet_hidden');
|
||||
|
||||
// Reset titleFormat if it was set to List when switching away from displayType=titleOnly
|
||||
if (this.model.get('titleFormat') === 'ul') {
|
||||
|
@@ -294,6 +294,7 @@ define([
|
||||
templateHelpers: function() {
|
||||
return {
|
||||
isRoot: this.renderOptions.depth === 0,
|
||||
emptyContainerMessage: this.renderOptions.emptyContainerMessage || '',
|
||||
};
|
||||
},
|
||||
});
|
||||
|
@@ -175,6 +175,7 @@ define([
|
||||
renderOptions = {
|
||||
disableTextEditor: true,
|
||||
disableDragAndDrop: true,
|
||||
emptyContainerMessage: MailPoet.I18n.t('noPostsToDisplay'),
|
||||
};
|
||||
this.postsRegion.show(new ContainerView({ model: this.model.get('_transformedPosts'), renderOptions: renderOptions }));
|
||||
},
|
||||
@@ -215,6 +216,9 @@ define([
|
||||
var that = this,
|
||||
blockView = this.model.request('blockView');
|
||||
|
||||
this.selectionRegion.show(this.selectionView);
|
||||
this.displayOptionsRegion.show(this.displayOptionsView);
|
||||
|
||||
MailPoet.Modal.panel({
|
||||
element: this.$el,
|
||||
template: '',
|
||||
@@ -226,8 +230,6 @@ define([
|
||||
},
|
||||
});
|
||||
|
||||
this.selectionRegion.show(this.selectionView);
|
||||
this.displayOptionsRegion.show(this.displayOptionsView);
|
||||
},
|
||||
switchToDisplayOptions: function() {
|
||||
// Switch content view
|
||||
@@ -277,9 +279,6 @@ define([
|
||||
Marionette.CompositeView.apply(this, arguments);
|
||||
},
|
||||
onRender: function() {
|
||||
|
||||
},
|
||||
onAttach: function() {
|
||||
var that = this;
|
||||
|
||||
// Dynamically update available post types
|
||||
@@ -462,9 +461,11 @@ define([
|
||||
if (value == 'titleOnly') {
|
||||
this.$('.mailpoet_posts_title_as_list').removeClass('mailpoet_hidden');
|
||||
this.$('.mailpoet_posts_image_full_width_option').addClass('mailpoet_hidden');
|
||||
this.$('.mailpoet_posts_image_separator').addClass('mailpoet_hidden');
|
||||
} else {
|
||||
this.$('.mailpoet_posts_title_as_list').addClass('mailpoet_hidden');
|
||||
this.$('.mailpoet_posts_image_full_width_option').removeClass('mailpoet_hidden');
|
||||
this.$('.mailpoet_posts_image_separator').removeClass('mailpoet_hidden');
|
||||
|
||||
// Reset titleFormat if it was set to List when switching away from displayType=titleOnly
|
||||
if (this.model.get('titleFormat') === 'ul') {
|
||||
|
@@ -328,6 +328,7 @@
|
||||
'templateSaved': __('Template has been saved.'),
|
||||
'templateSaveFailed': __('Template has not been saved, please try again.'),
|
||||
'categoriesAndTags': __('Categories & tags'),
|
||||
'noPostsToDisplay': __('There are no posts to display'),
|
||||
}) %>
|
||||
<% endblock %>
|
||||
|
||||
|
@@ -132,7 +132,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="mailpoet_separator" />
|
||||
<hr class="mailpoet_separator mailpoet_automated_latest_content_image_separator {{#ifCond model.displayType '===' 'titleOnly'}}mailpoet_hidden{{/ifCond}}" />
|
||||
|
||||
<div class="mailpoet_form_field mailpoet_automated_latest_content_featured_image_position_container {{#ifCond model.displayType '!==' 'excerpt'}}mailpoet_hidden{{/ifCond}}">
|
||||
<div class="mailpoet_form_field_title"><%= __('Featured image position') %></div>
|
||||
|
@@ -1,2 +1,2 @@
|
||||
<div class="mailpoet_container_empty">{{#if isRoot}}<%= __('Drop layout here') %>{{else}}<%= __('Drop content here') %>{{/if}}</div>
|
||||
<div class="mailpoet_container_empty">{{#ifCond emptyContainerMessage '!==' ''}}{{emptyContainerMessage}}{{else}}{{#if isRoot}}<%= __('Drop layout here') %>{{else}}<%= __('Drop content here') %>{{/if}}{{/ifCond}}</div>
|
||||
{{debug}}
|
||||
|
@@ -87,7 +87,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="mailpoet_separator" />
|
||||
<hr class="mailpoet_separator mailpoet_posts_image_separator {{#ifCond model.displayType '===' 'titleOnly'}}mailpoet_hidden{{/ifCond}}" />
|
||||
|
||||
<div class="mailpoet_posts_non_title_list_options {{#ifCond model.displayType '==' 'titleOnly'}}{{#ifCond model.titleFormat '==' 'ul'}}mailpoet_hidden{{/ifCond}}{{/ifCond}}">
|
||||
|
||||
|
Reference in New Issue
Block a user