Notifications 关闭或禁用Liferay 7上的警报消息

Notifications 关闭或禁用Liferay 7上的警报消息,notifications,alert,liferay-7,Notifications,Alert,Liferay 7,当请求/响应时间过长或用户会话即将结束时,如何删除或禁用页面右上方显示的警报消息 我在主题的main.js文件中的AUI().ready(){}中添加了ff JavaScript $('.lfr-alert-container .close, .lfr-notification-container .close').click(function() { $(this).parent().parent().addClass('hidden'); }); 但此代码仅适用于我的自定义Se

当请求/响应时间过长或用户会话即将结束时,如何删除或禁用页面右上方显示的警报消息

我在主题的main.js文件中的AUI().ready(){}中添加了ff JavaScript

$('.lfr-alert-container .close, .lfr-notification-container .close').click(function() {
    $(this).parent().parent().addClass('hidden');
});
但此代码仅适用于我的自定义SessionMessages/SessionErrors。警报消息没有响应


任何帮助都将不胜感激。谢谢。

您可以在
portal-ext.properties
中将以下属性设置为
false

#
# Set this to true to enable Single Page Application links.
#

javascript.single.page.application.enabled=false
我知道属性名有点混乱,但它会关闭所提到的消息,并且不会尝试以AJAX的形式提交所有内容

另一个选项是更改超时:

#
# Set the timeout in milliseconds before SPA navigation times out and falls
# back to standard navigation.
#

javascript.single.page.application.timeout=0
会话正在结束消息与此不同,您可以使用以下属性打开它:

#
# Specify the number of minutes before a warning is sent to the user
# informing the user of the session expiration. Specify 0 to disable any
# warnings.
#
session.timeout.warning=0

它有助于学习
/liferay src/portal impl/src/portal.properties
,在这里您可以找到可以使用
portal-ext.properties
配置的所有选项。此外,自Liferay 7以来,一些选项现在在
Liferay/osgi/configs
中配置了文件-如果您查找使用
@ExtendedObjectClassDefinition
注释的类,您应该会有一个想法。

请将以下内容添加到
portal-ext.properties

session.timeout.warning=0
session.timeout.redirect.on.expire=true

我在我的portal-ext.properties中添加了javascript.single.page.application.enabled=false。但仍然会出现错误消息,关闭图标/按钮无法工作。我在帖子中添加了截图。