Fixed issue#313 - Admin -> Channels -> Email -> Filters not shown / no name shown.
This commit is contained in:
parent
51683d9859
commit
0a83811479
4 changed files with 26 additions and 10 deletions
|
@ -38,11 +38,10 @@ class App.ChannelEmailFilter extends App.Controller
|
|||
|
||||
constructor: ->
|
||||
super
|
||||
|
||||
App.PostmasterFilter.subscribe( @render, initFetch: true )
|
||||
App.PostmasterFilter.subscribe(@render, initFetch: true)
|
||||
|
||||
render: =>
|
||||
data = App.PostmasterFilter.search( sortBy: 'name' )
|
||||
data = App.PostmasterFilter.search(sortBy: 'name')
|
||||
|
||||
template = $( '<div><div class="overview"></div><a data-type="new" class="btn btn--success">' + App.i18n.translateContent('New') + '</a></div>' )
|
||||
|
||||
|
@ -131,11 +130,10 @@ class App.ChannelEmailSignature extends App.Controller
|
|||
|
||||
constructor: ->
|
||||
super
|
||||
|
||||
App.Signature.subscribe( @render, initFetch: true )
|
||||
App.Signature.subscribe(@render, initFetch: true)
|
||||
|
||||
render: =>
|
||||
data = App.Signature.search( sortBy: 'name' )
|
||||
data = App.Signature.search(sortBy: 'name')
|
||||
|
||||
template = $( '<div><div class="overview"></div><a data-type="new" class="btn btn--success">' + App.i18n.translateContent('New') + '</a></div>' )
|
||||
|
||||
|
|
|
@ -544,6 +544,10 @@ class App.Model extends Spine.Model
|
|||
if data.assets
|
||||
App.Collection.loadAssets(data.assets)
|
||||
|
||||
# in case of no record_ids are there, no inital render is fired
|
||||
if _.isEmpty(data.record_ids)
|
||||
App[@className].trigger('refresh')
|
||||
|
||||
# find / load object
|
||||
else
|
||||
App[@className].refresh(data)
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
<th style="width: 40px" class="table-radio"></th>
|
||||
<% end %>
|
||||
<% for item, i in @header: %>
|
||||
<th class="js-tableHead<%= " #{ item.className }" if item.className %><%= " align-#{ item.align }" if item.align %>" style="width:<%= item.displayWidth %>px" data-column-key="<%= item.name %>">
|
||||
<th class="js-tableHead<%= " #{ item.className }" if item.className %><%= " align-#{ item.align }" if item.align %>" style="<% if item.displayWidth: %>width:<%= item.displayWidth %>px<% end %>" data-column-key="<%= item.name %>">
|
||||
<div class="table-column-head<%= ' js-sort' if @table_id %>">
|
||||
<div class="table-column-title">
|
||||
<%- @T( item.display ) %>
|
||||
<%- @T(item.display) %>
|
||||
</div>
|
||||
<div class="table-column-sortIcon">
|
||||
<% if item.sortOrderIcon: %>
|
||||
|
|
|
@ -23,10 +23,24 @@ class AdminChannelEmailTest < TestCase
|
|||
click(css: 'a[href="#manage"]')
|
||||
click(css: '.content.active a[href="#channels/email"]')
|
||||
|
||||
# check if postmaster filter are shown
|
||||
click(css: '.content.active a[href="#c-filter"]')
|
||||
match(
|
||||
css: '.content.active #c-filter .overview',
|
||||
value: 'No Entries',
|
||||
)
|
||||
|
||||
# check if signatures are shown
|
||||
click(css: '.content.active a[href="#c-signature"]')
|
||||
match(
|
||||
css: '.content.active #c-signature .overview',
|
||||
value: 'default',
|
||||
)
|
||||
|
||||
click(css: '.content.active a[href="#c-account"]')
|
||||
click(css: '.content.active .js-channelNew')
|
||||
|
||||
modal_ready()
|
||||
|
||||
set(
|
||||
css: '.modal input[name="realname"]',
|
||||
value: 'My System',
|
||||
|
|
Loading…
Reference in a new issue