Skip to content

Commit

Permalink
Fix issue 2293: click on read notification focus bug
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminapetersen committed Oct 19, 2017
1 parent a7bc1f0 commit ae57692
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
12 changes: 9 additions & 3 deletions app/views/directives/notifications/notification-body.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<div
class="drawer-pf-notification-inner"
tabindex="0"
ng-click="$ctrl.customScope.markRead(notification)">
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 +87,14 @@
<span ng-if="!$last" class="toast-action-divider">|</span>
</span>
</span>

<a
ng-if="notification.unread"
href=""
class="sr-only sr-only-focusable"
ng-click="$ctrl.customScope.markRead(notification)">
<span class="sr-only">Message Unread. </span>
<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 @@ -7785,7 +7785,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-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 @@ -7825,6 +7825,10 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<span ng-if=\"!$last\" class=\"toast-action-divider\">|</span>\n" +
"</span>\n" +
"</span>\n" +
"<a ng-if=\"notification.unread\" href=\"\" class=\"sr-only sr-only-focusable\" ng-click=\"$ctrl.customScope.markRead(notification)\">\n" +
"<span class=\"sr-only\">Message Unread. </span>\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

0 comments on commit ae57692

Please sign in to comment.