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

Adds on-close to pf-notification-drawer component #1415

Merged
Merged
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: 1 addition & 5 deletions client/app/core/navigation/navigation-controller.js
Original file line number Diff line number Diff line change
@@ -74,7 +74,7 @@ export function NavigationController (Text, Navigation, Session, API_BASE, Shopp
notificationHTML: 'app/components/notifications/notification-body.html',
notificationFooterHTML: 'app/components/notifications/notification-footer.html',
handleItemClick: handleItemClick,
toggleNotificationsList: toggleNotificationsList,
toggleNotificationsList: () => { vm.notificationsDrawerShown = !vm.notificationsDrawerShown },
updateViewingToast: updateViewingToast,
handleDismissToast: handleDismissToast,
getNotficationStatusIconClass: getNotficationStatusIconClass,
@@ -170,10 +170,6 @@ export function NavigationController (Text, Navigation, Session, API_BASE, Shopp
$state.transitionTo(item.state)
}

function toggleNotificationsList () {
vm.notificationsDrawerShown = !vm.notificationsDrawerShown
}

function getNotficationStatusIconClass (notification) {
var retClass = ''
if (notification && notification.type) {
17 changes: 11 additions & 6 deletions client/app/layouts/application.html
Original file line number Diff line number Diff line change
@@ -5,12 +5,17 @@
<pf-toast-notification-list notifications="vm.toastNotifications" show-close="true"
close-callback="vm.handleDismissToast" update-viewing="vm.updateViewingToast"></pf-toast-notification-list>

<pf-notification-drawer drawer-hidden="!vm.notificationsDrawerShown" notification-groups="vm.notificationGroups"
allow-expand="true"
drawer-title="{{'Notifications' | translate}}" heading-include="{{vm.headingHTML}}"
subheading-include="{{vm.subHeadingHTML}}"
notification-body-include="{{vm.notificationHTML}}" notification-footer-include="{{vm.notificationFooterHTML}}"
custom-scope="vm" />
<pf-notification-drawer
drawer-hidden="!vm.notificationsDrawerShown"
notification-groups="vm.notificationGroups"
allow-expand="true"
on-close="vm.toggleNotificationsList"
drawer-title="{{'Notifications' | translate}}"
heading-include="{{vm.headingHTML}}"
subheading-include="{{vm.subHeadingHTML}}"
notification-body-include="{{vm.notificationHTML}}"
notification-footer-include="{{vm.notificationFooterHTML}}"
custom-scope="vm" >
</pf-notification-drawer>

<pf-about-modal additional-info="vm.about.additionalInfo" is-open="vm.about.isOpen"