Skip to content
Snippets Groups Projects
Commit e5245357 authored by Elmar Ludwig's avatar Elmar Ludwig Committed by David Siegfried
Browse files

restore JS handler for "mark all news as read", fixes #1362

Closes #1362

Merge request studip/studip!839
parent b320b896
No related branches found
No related tags found
No related merge requests found
......@@ -187,7 +187,7 @@ class NewsController extends StudipController
}
}
$this->render_nothing();
$this->render_json(true);
}
/**
......
......@@ -35,7 +35,7 @@ class NewsWidget extends CorePlugin implements PortalPlugin
if (StudipNews::CountUnread() > 0) {
$navigation = new Navigation('', 'dispatch.php/news/visit_all');
$navigation->setImage(Icon::create('refresh', 'clickable', ["title" => _('Alle als gelesen markieren')]));
$navigation->setImage(Icon::create('refresh', 'clickable', ["title" => _('Alle als gelesen markieren')]), ['class' => 'visit-all']);
$icons[] = $navigation;
}
......
......@@ -5,7 +5,7 @@ STUDIP.domReady(() => {
});
// Add handler for "read all" on news widget
$(document).on('click', '#start-index a[href*="newswidget/read_all"]', function(event) {
$(document).on('click', '#start-index .visit-all', function(event) {
var icon = $(this),
url = icon.attr('href'),
widget = icon.closest('.studip-widget');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment