Skip to content

Commit

Permalink
Render the notification drawer footer synchronously, remove its haml
Browse files Browse the repository at this point in the history
  • Loading branch information
skateman committed Oct 18, 2018
1 parent e4fc7df commit 9d502ea
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
Expand Up @@ -14,7 +14,6 @@ angular.module('miq.notifications').directive('miqNotificationDrawer', ['$window
headingInclude: '@',
subheadingInclude: '@',
notificationBodyInclude: '@',
notificationFooterInclude: '@',
customScope: '=?',
},
templateUrl: '/static/notification_drawer/notification-drawer.html',
Expand Down
1 change: 0 additions & 1 deletion app/views/layouts/_notifications_drawer.html.haml
Expand Up @@ -8,5 +8,4 @@
"heading-include" => "/static/notification_drawer/notification-heading.html",
"subheading-include" => "/static/notification_drawer/notification-subheading.html",
"notification-body-include" => "/static/notification_drawer/notification-body.html",
"notification-footer-include" => "/static/notification_drawer/notification-footer.html",
"custom-scope" => "vm.customScope"}
16 changes: 14 additions & 2 deletions app/views/static/notification_drawer/notification-drawer.html.haml
Expand Up @@ -46,5 +46,17 @@
%a.btn.btn-link.btn-block{'ng-click' => "actionButtonCallback(notificationGroup)"}
{{actionButtonTitle}}

%div{'ng-if' => "notificationFooterInclude",
'ng-include' => "notificationFooterInclude"}
%div
.drawer-pf-action.footer-actions
.footer-button-left
%a.btn.btn-link{"role" => "button",
"ng-class" => "{'disabled': !notificationGroup.notifications || notificationGroup.notifications.length === 0}",
"ng-click" => "customScope.markAllRead(notificationGroup)"}
%span
= _('Mark All Read')
.footer-button-right
%a.btn.btn-link{"role" => "button",
"ng-class" => "{'disabled': !notificationGroup.notifications || notificationGroup.notifications.length === 0}",
"ng-click" => "customScope.clearAllNotifications(notificationGroup)"}
%span
= _('Clear All')
13 changes: 0 additions & 13 deletions app/views/static/notification_drawer/notification-footer.html.haml

This file was deleted.

0 comments on commit 9d502ea

Please sign in to comment.