Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue 2293: click on read notification focus bug #2299

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/styles/_notifications.less
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ notification-drawer-wrapper {
}
// the whole block is clickable, need to set pointer on all of these
// for the correct visual
.drawer-pf-notification,
.drawer-pf-notification-info,
.drawer-pf-notification-message {
.drawer-pf-notification-inner.is-clickable,
.is-clickable .drawer-pf-notification-info,
.is-clickable .drawer-pf-notification-message {
cursor: pointer;
}
.drawer-pf-notification {
Expand Down
13 changes: 10 additions & 3 deletions app/views/directives/notifications/notification-body.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div
class="drawer-pf-notification-inner"
tabindex="0"
ng-click="$ctrl.customScope.markRead(notification)">
ng-class="{ 'is-clickable': notification.unread }"
ng-click="notification.unread && $ctrl.customScope.markRead(notification)">
<button
class="btn btn-link pull-right drawer-pf-notification-close"
type="button"
Expand Down Expand Up @@ -88,7 +88,14 @@
<span ng-if="!$last" class="toast-action-divider">|</span>
</span>
</span>

<span class="sr-only">Message Unread. </span>
<a
ng-if="notification.unread"
href=""
class="sr-only sr-only-focusable"
ng-click="$ctrl.customScope.markRead(notification)">
<span>Mark Read</span>
</a>
</div>
<div
ng-if="notification.event.count > 1"
Expand Down
6 changes: 5 additions & 1 deletion dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -7860,7 +7860,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(


$templateCache.put('views/directives/notifications/notification-body.html',
"<div class=\"drawer-pf-notification-inner\" tabindex=\"0\" ng-click=\"$ctrl.customScope.markRead(notification)\">\n" +
"<div class=\"drawer-pf-notification-inner\" ng-class=\"{ 'is-clickable': notification.unread }\" ng-click=\"notification.unread && $ctrl.customScope.markRead(notification)\">\n" +
"<button class=\"btn btn-link pull-right drawer-pf-notification-close\" type=\"button\" ng-if=\"!notification.actions.length\" ng-click=\"$ctrl.customScope.clear(notification, $index, notificationGroup)\">\n" +
"<span class=\"sr-only\">Clear notification</span>\n" +
"<span aria-hidden=\"true\" class=\"pficon pficon-close\"></span>\n" +
Expand Down Expand Up @@ -7900,6 +7900,10 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<span ng-if=\"!$last\" class=\"toast-action-divider\">|</span>\n" +
"</span>\n" +
"</span>\n" +
"<span class=\"sr-only\">Message Unread. </span>\n" +
"<a ng-if=\"notification.unread\" href=\"\" class=\"sr-only sr-only-focusable\" ng-click=\"$ctrl.customScope.markRead(notification)\">\n" +
"<span>Mark Read</span>\n" +
"</a>\n" +
"</div>\n" +
"<div ng-if=\"notification.event.count > 1\" class=\"text-muted small\">\n" +
"{{notification.event.count}} times in the last\n" +
Expand Down
2 changes: 1 addition & 1 deletion dist/styles/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.