Skip to content

Commit

Permalink
Merge pull request #2270 from himdel/notification-update-bz1445762
Browse files Browse the repository at this point in the history
miq.notifications - update accordion sizing when opening/closing an accordion
(cherry picked from commit 1b72a2b)

https://bugzilla.redhat.com/show_bug.cgi?id=1498525
https://bugzilla.redhat.com/show_bug.cgi?id=1498524
  • Loading branch information
Martin Povolny authored and simaishi committed Nov 13, 2017
1 parent a0ca93f commit e4b17e8
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -39,11 +39,13 @@ angular.module('miq.notifications').directive('miqNotificationDrawer', ['$window
});
});

scope.$watch('drawerHidden', function() {
scope.$watch('drawerHidden', updateAccordionSizing);

function updateAccordionSizing() {
$timeout(function() {
angular.element($window).triggerHandler('resize');
}, 100);
});
}

scope.toggleCollapse = function(selectedGroup) {
if (selectedGroup.open) {
Expand All @@ -54,6 +56,8 @@ angular.module('miq.notifications').directive('miqNotificationDrawer', ['$window
});
selectedGroup.open = true;
}

updateAccordionSizing();
};

scope.toggleExpandDrawer = function() {
Expand Down

0 comments on commit e4b17e8

Please sign in to comment.