<%-- /** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */ --%> <%@ include file="/init.jsp" %>
<% Map> userNotificationDefinitionsMap = new TreeMap>(new PortletIdComparator(locale)); userNotificationDefinitionsMap.putAll(UserNotificationManagerUtil.getUserNotificationDefinitions()); for (Map.Entry> entry : userNotificationDefinitionsMap.entrySet()) { %> <% List userNotificationDefinitions = entry.getValue(); for (UserNotificationDefinition userNotificationDefinition : userNotificationDefinitions) { %> <% Map userNotificationDeliveryTypesMap = userNotificationDefinition.getUserNotificationDeliveryTypes(); for (Map.Entry userNotificationDeliveryTypeEntry : userNotificationDeliveryTypesMap.entrySet()) { UserNotificationDeliveryType userNotificationDeliveryType = userNotificationDeliveryTypeEntry.getValue(); UserNotificationDelivery userNotificationDelivery = UserNotificationDeliveryLocalServiceUtil.getUserNotificationDelivery(themeDisplay.getUserId(), entry.getKey(), userNotificationDefinition.getClassNameId(), userNotificationDefinition.getNotificationType(), userNotificationDeliveryType.getType(), userNotificationDeliveryType.isDefault()); %> <% } %> <% } %>
<%= PortalUtil.getPortletTitle(entry.getKey(), locale) %>
<% } %>
var userNotifications = A.one('#portlet_<%= PortletKeys.NOTIFICATIONS %>'); var notificationDelivery = userNotifications.one('.manage-notifications'); if (notificationDelivery) { notificationDelivery.delegate( 'change', function(event) { event.preventDefault(); var currentTarget = event.currentTarget; A.io.request( '', { data: { deliver: currentTarget.attr('checked'), userNotificationDeliveryId: currentTarget.attr('data-userNotificationDeliveryId') } } ); }, '.notification-deliveries .notification-delivery' ); }