Skip to content
Snippets Groups Projects
Commit 3bc089f1 authored by Tobias Feldmann's avatar Tobias Feldmann
Browse files

Notification actions with same behavior

parent 060bfcbb
No related branches found
No related tags found
No related merge requests found
......@@ -105,7 +105,7 @@
<title>set Read</title>
<description></description>
<onActionProcess>%aditoprj%/entity/Notification_entity/entityfields/setnotificationstate/children/setread/onActionProcess.js</onActionProcess>
<isSelectionAction v="false" />
<isSelectionAction v="true" />
<iconId>VAADIN:OPEN_BOOK</iconId>
<tooltip></tooltip>
<tooltipProcess>%aditoprj%/entity/Notification_entity/entityfields/setnotificationstate/children/setread/tooltipProcess.js</tooltipProcess>
......
......@@ -8,17 +8,6 @@ import("KeywordRegistry_basic");
var user = tools.getCurrentUser();
var selectedNotifications = vars.get("$sys.selection");
if (selectedNotifications.length == 0)
{
let userid = tools.getCurrentUser()["name"];
selectedNotifications = newSelect("ASYS_NOTIFICATIONS.ID")
.from("ASYS_NOTIFICATIONS")
.where("ASYS_NOTIFICATIONS.STATE", [notification.STATE_SEEN.toString(), notification.STATE_UNSEEN.toString()], SqlBuilder.IN())
.and("ASYS_NOTIFICATIONS.USERID", userid, SqlBuilder.EQUAL())
.arrayColumn();
}
for(var i = 0; i < selectedNotifications.length; i++)
notification.updateUserNotificationState(user["name"], selectedNotifications[i], notification.STATE_CONFIRMED);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment