renderToolbar: support empty data i.e. dashboard feed
This commit is contained in:
parent
a2e688fcb2
commit
9f31381bb6
|
@ -141,7 +141,7 @@ class Feeds extends Handler_Protected {
|
|||
|
||||
$reply['toolbar'] = [
|
||||
'site_url' => $feed_site_url,
|
||||
'title' => truncate_string(strip_tags($feed_title), 30),
|
||||
'title' => strip_tags($feed_title),
|
||||
'error' => $last_error,
|
||||
'last_updated' => $last_updated,
|
||||
'plugin_menu_items' => $plugin_menu_items,
|
||||
|
|
|
@ -572,6 +572,7 @@ const Headlines = {
|
|||
const search_query = Feeds._search_query ? Feeds._search_query.query : "";
|
||||
const target = dijit.byId('toolbar-headlines');
|
||||
|
||||
if (tb && typeof tb == 'object') {
|
||||
target.attr('innerHTML',
|
||||
`
|
||||
<span class='left'>
|
||||
|
@ -615,6 +616,9 @@ const Headlines = {
|
|||
${tb.plugin_buttons}
|
||||
</span>
|
||||
`);
|
||||
} else {
|
||||
target.attr('innerHTML', '');
|
||||
}
|
||||
|
||||
dojo.parser.parse(target.domNode);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue