Skip to content
Snippets Groups Projects
Commit 1492047b authored by Andreas Schindlbeck's avatar Andreas Schindlbeck
Browse files

NotificatinCenter: actionProzesse und fixes

parent 3eef35fe
No related branches found
No related tags found
No related merge requests found
Showing
with 61 additions and 67 deletions
......@@ -7,7 +7,7 @@
</column>
<column name="BACKPACK" type="CLOB"/>
<column name="CAPTION" type="VARCHAR(512)"/>
<column name="CREATIONDATE" type="BIGINT"/>
<column name="CREATIONDATE" type="TIMESTAMP"/>
<column name="DESCRIPTION" type="VARCHAR(1023)"/>
<column name="FORCEDPRIORITY" type="VARCHAR(15)"/>
<column name="ICON_INFO" type="VARCHAR(1023)"/>
......
......@@ -24,18 +24,26 @@
</entityField>
<entityField>
<name>STATE</name>
<title>State</title>
<displayValueProcess>%aditoprj%/entity/Notification_entity/entityfields/state/displayValueProcess.js</displayValueProcess>
</entityField>
<entityField>
<name>BACKPACK</name>
</entityField>
<entityField>
<name>CAPTION</name>
<title>title</title>
</entityField>
<entityField>
<name>CREATIONDATE</name>
<title>Date</title>
<contentType>DATE</contentType>
<resolution>MINUTE</resolution>
<valueProcess>%aditoprj%/entity/Notification_entity/entityfields/creationdate/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>DESCRIPTION</name>
<title>description</title>
</entityField>
<entityField>
<name>FORCEDPRIORITY</name>
......@@ -73,6 +81,15 @@
<entityActionGroup>
<name>setNotificationState</name>
<children>
<entityActionField>
<name>archieve</name>
<fieldType>ACTION</fieldType>
<description></description>
<onActionProcess>%aditoprj%/entity/Notification_entity/entityfields/setnotificationstate/children/archieve/onActionProcess.js</onActionProcess>
<isSelectionAction v="true" />
<iconId>VAADIN:ARCHIVE</iconId>
<tooltip>archieve</tooltip>
</entityActionField>
<entityActionField>
<name>setRead</name>
<fieldType>ACTION</fieldType>
......@@ -80,7 +97,7 @@
<onActionProcess>%aditoprj%/entity/Notification_entity/entityfields/setnotificationstate/children/setread/onActionProcess.js</onActionProcess>
<isSelectionAction v="true" />
<iconId>VAADIN:OPEN_BOOK</iconId>
<tooltip>gelesen setzen</tooltip>
<tooltip>set read</tooltip>
</entityActionField>
<entityActionField>
<name>setUnread</name>
......@@ -89,19 +106,15 @@
<onActionProcess>%aditoprj%/entity/Notification_entity/entityfields/setnotificationstate/children/setunread/onActionProcess.js</onActionProcess>
<isSelectionAction v="true" />
<iconId>VAADIN:BOOK</iconId>
<tooltip>ungelesen setzen</tooltip>
</entityActionField>
<entityActionField>
<name>archieve</name>
<fieldType>ACTION</fieldType>
<description></description>
<onActionProcess>%aditoprj%/entity/Notification_entity/entityfields/setnotificationstate/children/archieve/onActionProcess.js</onActionProcess>
<isSelectionAction v="true" />
<iconId>VAADIN:ARCHIVE</iconId>
<tooltip>archivieren</tooltip>
<tooltip>set unread</tooltip>
</entityActionField>
</children>
</entityActionGroup>
<entityActionField>
<name>rowClickAction</name>
<fieldType>ACTION</fieldType>
<onActionProcess>%aditoprj%/entity/Notification_entity/entityfields/rowclickaction/onActionProcess.js</onActionProcess>
</entityActionField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......@@ -109,6 +122,7 @@
<alias>_____SYSTEMALIAS</alias>
<isPageable v="false" />
<conditionProcess>%aditoprj%/entity/Notification_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
<orderClauseProcess>%aditoprj%/entity/Notification_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess>
<linkInformation>
<linkInformation>
<name>33b9740c-cd3d-43ec-97e6-65c9e880655a</name>
......
......@@ -6,7 +6,5 @@ import("system.notification");
if(vars.get("$field.TYPECODE"))
{
var type = notification.getType(vars.get("$field.TYPECODE"));
logging.log("type: " + type);
result.string(type["icon"]);
}
\ No newline at end of file
import("system.vars");
import("system.tools");
import("system.notification");
import("system.neon");
var user = tools.getCurrentUser();
var selectedNotifications = JSON.parse(vars.get("$sys.selection"));
for(var i = 0; i < selectedNotifications.length; i++)
notification.updateUserNotificationState(user["name"], selectedNotifications[i], notification.STATE_CONFIRMED);
neon.refreshAll();
\ No newline at end of file
import("system.logging");
import("system.vars");
import("system.tools");
import("system.notification");
......@@ -7,20 +6,7 @@ import("system.neon");
var user = tools.getCurrentUser();
var selectedNotifications = JSON.parse(vars.get("$sys.selection"));
var userNotis = notification.getUserNotifications(user["name"], null);
var contentId;
for(var x = 0; x < selectedNotifications.length; x++)
{
for(var i = 0; i < userNotis.length; i++)
{
if(userNotis[i][notification.PROP_ID] == selectedNotifications[x])
{
contentId = userNotis[i][notification.PROP_CONTENTID];
notification.updateUserNotificationState(user["name"], contentId, notification.STATE_ARCHIVE);
break;
}
}
}
for(var i = 0; i < selectedNotifications.length; i++)
notification.updateUserNotificationState(user["name"], selectedNotifications[i], notification.STATE_ARCHIVE);
neon.refreshAll();
\ No newline at end of file
import("system.logging");
import("system.vars");
import("system.tools");
import("system.notification");
......@@ -7,20 +6,7 @@ import("system.neon");
var user = tools.getCurrentUser();
var selectedNotifications = JSON.parse(vars.get("$sys.selection"));
var userNotis = notification.getUserNotifications(user["name"], null);
var contentId;
for(var x = 0; x < selectedNotifications.length; x++)
{
for(var i = 0; i < userNotis.length; i++)
{
if(userNotis[i][notification.PROP_ID] == selectedNotifications[x])
{
contentId = userNotis[i][notification.PROP_CONTENTID];
notification.updateUserNotificationState(user["name"], contentId, notification.STATE_CONFIRMED);
break;
}
}
}
for(var i = 0; i < selectedNotifications.length; i++)
notification.updateUserNotificationState(user["name"], selectedNotifications[i], notification.STATE_CONFIRMED);
neon.refreshAll();
\ No newline at end of file
import("system.logging");
import("system.vars");
import("system.tools");
import("system.notification");
......@@ -7,20 +6,7 @@ import("system.neon");
var user = tools.getCurrentUser();
var selectedNotifications = JSON.parse(vars.get("$sys.selection"));
var userNotis = notification.getUserNotifications(user["name"], null);
var contentId;
for(var x = 0; x < selectedNotifications.length; x++)
{
for(var i = 0; i < userNotis.length; i++)
{
if(userNotis[i][notification.PROP_ID] == selectedNotifications[x])
{
contentId = userNotis[i][notification.PROP_CONTENTID];
notification.updateUserNotificationState(user["name"], contentId, notification.STATE_UNSEEN);
break;
}
}
}
for(var i = 0; i < selectedNotifications.length; i++)
notification.updateUserNotificationState(user["name"], selectedNotifications[i], notification.STATE_UNSEEN);
neon.refreshAll();
\ No newline at end of file
import("system.translate");
import("system.result");
import("system.vars");
result.string(translate.text(vars.get("$this.value")));
\ No newline at end of file
import("system.result");
import("system.db");
result.object({
"ASYS_NOTIFICATIONS.STATE": db.DESCENDING,
"ASYS_NOTIFICATIONCONTENTS.CREATIONDATE": db.DESCENDING
});
\ No newline at end of file
......@@ -12,6 +12,7 @@
<tableViewTemplate>
<name>Table</name>
<favoriteActionGroup1>setNotificationState</favoriteActionGroup1>
<entryAction>rowClickAction</entryAction>
<showHeader v="true" />
<isSaveable v="false" />
<isEditable v="false" />
......@@ -19,7 +20,7 @@
<columns>
<neonTableColumn>
<name>0ed20b46-be6a-424c-a583-a3f7496ec3f9</name>
<entityField>ICON</entityField>
<entityField>CREATIONDATE</entityField>
</neonTableColumn>
<neonTableColumn>
<name>3bf425ed-227c-4768-b339-4794aa0d6063</name>
......@@ -29,10 +30,6 @@
<name>ff33a6c1-7ac6-4acd-a083-e56a36f89977</name>
<entityField>DESCRIPTION</entityField>
</neonTableColumn>
<neonTableColumn>
<name>63df503b-2502-4123-917a-77c932f61268</name>
<entityField>ORIGINATORNAME</entityField>
</neonTableColumn>
<neonTableColumn>
<name>5cb09de4-4413-41e5-8a7c-4970a3cf6a62</name>
<entityField>STATE</entityField>
......
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