1 (function(angular
, $, _
) {
3 angular
.module('statuspage')
4 .filter('trusted', function($sce
){ return $sce
.trustAsHtml
; })
6 // Todo: abstract this into a generic crmUi directive?
7 .directive('statuspagePopupMenu', function($timeout
) {
9 templateUrl
: '~/statuspage/SnoozeOptions.html',
12 link: function(scope
, element
, attr
) {
13 element
.on('click', '.hush-menu-button', function() {
15 $('ul', element
).show().menu();
16 element
.closest('h3').addClass('menuopen');
17 $('body').one('click', function() {
18 $('ul', element
).menu('destroy').hide();
19 element
.closest('h3').removeClass('menuopen');
23 // TODO: Is there a more "Angular" way to do this animation?
24 element
.on('click', 'button:not(.hush-menu-button), li', function() {
25 $(this).closest('div.crm-status-item').slideUp();
31 })(angular
, CRM
.$, CRM
._
);