(function(){this.NotificationsDropdown=(function(){functionNotificationsDropdown(){$(document).off('click','.update-notification').on('click','.update-notification',function(e){varform,label,notificationLevel;e.preventDefault();if($(this).is('.is-active')&&$(this).data('notification-level')==='custom'){return;}notificationLevel=$(this).data('notification-level');label=$(this).data('notification-title');form=$(this).parents('.notification-form:first');form.find('.js-notification-loading').toggleClass('fa-bell fa-spin fa-spinner');form.find('#notification_setting_level').val(notificationLevel);returnform.submit();});$(document).off('ajax:success','.notification-form').on('ajax:success','.notification-form',function(e,data){if(data.saved){return$(e.currentTarget).closest('.notification-dropdown').replaceWith(data.html);}else{returnnewFlash('Failed to save new settings','alert');}});}returnNotificationsDropdown;})();}).call(this);