diff --git a/entity/Notification_entity/Notification_entity.aod b/entity/Notification_entity/Notification_entity.aod index 4d32b33ed19d501fd7a3f78227cde7712a5bc680..7fffae481c5ce4d5d91aa21b2416d35b0a557434 100644 --- a/entity/Notification_entity/Notification_entity.aod +++ b/entity/Notification_entity/Notification_entity.aod @@ -136,6 +136,12 @@ <fieldType>ACTION</fieldType> <onActionProcess>%aditoprj%/entity/Notification_entity/entityfields/rowclickaction/onActionProcess.js</onActionProcess> </entityActionField> + <entityField> + <name>CALCULATEDPRIORITY</name> + <title>Priority</title> + <contentType>IMAGE</contentType> + <valueProcess>%aditoprj%/entity/Notification_entity/entityfields/calculatedpriority/valueProcess.js</valueProcess> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Notification_entity/entityfields/calculatedpriority/valueProcess.js b/entity/Notification_entity/entityfields/calculatedpriority/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..7ff3a5ee122e56bb34f9a0180430b4a45c8d824c --- /dev/null +++ b/entity/Notification_entity/entityfields/calculatedpriority/valueProcess.js @@ -0,0 +1,48 @@ +import("system.notification"); +import("system.vars"); +import("system.logging"); +import("system.result"); + +var typecode = vars.get("$field.TYPECODE"); +var typeObject = notification.getType(typecode); + + logging.log("2"); +if(typeObject != null) +{ + + logging.log("1"); + var defaultPrio = typeObject[notification.TYPEPROP_DEFAULT_PRIO]; + var userPrio = typeObject[notification.TYPEPROP_USER_PRIO]; + var forcedPrio = vars.get("$field.FORCEDPRIORITY"); + + var realPrio; + + if(forcedPrio && forcedPrio != notification.PRIO_NONE) + realPrio = forcedPrio; + + else if(userPrio && userPrio != notification.PRIO_NONE) + realPrio = userPrio; + + else if(defaultPrio && defaultPrio != notification.PRIO_NONE) + realPrio = defaultPrio; + + + switch(realPrio) + { + case "LOW": + result.string(notification.PRIO_LOW_BASE64); + break; + case "NORMAL": + result.string(notification.PRIO_NORMAL_BASE64); + break; + case "HIGH": + result.string(notification.PRIO_HIGH_BASE64); + break; + case "MAX": + result.string(notification.PRIO_MAX_BASE64); + break; + default: + result.string(notification.PRIO_NONE_BASE64); + break; + } +} \ No newline at end of file diff --git a/entity/Notification_entity/entityfields/icon/valueProcess.js b/entity/Notification_entity/entityfields/icon/valueProcess.js index 9aec602ea95e60ee0c177bdc001ff48ac0b1d0e2..71475bd8b0d56a28254a1556f1cb8e2718b0bcf2 100644 --- a/entity/Notification_entity/entityfields/icon/valueProcess.js +++ b/entity/Notification_entity/entityfields/icon/valueProcess.js @@ -5,5 +5,5 @@ import("system.notification"); if(vars.get("$field.TYPECODE")) { var type = notification.getType(vars.get("$field.TYPECODE")); - result.string(type["icon"]); + result.string(type[notification.TYPEPROP_ICON]); } \ No newline at end of file diff --git a/neonNotificationType/Andis/Andis.aod b/neonNotificationType/Andis/Andis.aod index 9f75b4b3d537fc8fb18ec5cad4796841fc2287b9..21f410c7abb41c053896833de4f6610795df1ef5 100644 --- a/neonNotificationType/Andis/Andis.aod +++ b/neonNotificationType/Andis/Andis.aod @@ -1,8 +1,10 @@ -<?xml version="1.0" encoding="UTF-8"?> -<neonNotificationType xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonNotificationType/1.1.0"> - <name>Andis</name> - <title>Andis Noti</title> - <majorModelMode>DISTRIBUTED</majorModelMode> - <icon>VAADIN:COMMENT_ELLIPSIS_O</icon> - <resultFrameNeon></resultFrameNeon> -</neonNotificationType> +<?xml version="1.0" encoding="UTF-8"?> +<neonNotificationType xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonNotificationType/1.1.0"> + <name>Andis</name> + <title>Andis Noti</title> + <name>Andis</name> + <title>Andis Noti</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <name>Andis</name> + <title>Andis Noti</title> + <majorModelMode>DISTRIBUTED</majorModelMode> diff --git a/neonNotificationType/Geburtstag/Geburtstag.aod b/neonNotificationType/Geburtstag/Geburtstag.aod new file mode 100644 index 0000000000000000000000000000000000000000..bc107def870703fb536efd35a56fa5e6b0f2836b --- /dev/null +++ b/neonNotificationType/Geburtstag/Geburtstag.aod @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonNotificationType xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonNotificationType/1.1.0"> + <name>Geburtstag</name> + <title>Geburtstag</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <icon>VAADIN:COFFEE</icon> + <defaultPriority>LOW</defaultPriority> +</neonNotificationType> diff --git a/neonView/NotificationFilter_view/NotificationFilter_view.aod b/neonView/NotificationFilter_view/NotificationFilter_view.aod index 013dec87c327a5bc4150e79f87d91ba5bc236441..135de7aa272c03e4ce4676d4e1e7f98e5e53267e 100644 --- a/neonView/NotificationFilter_view/NotificationFilter_view.aod +++ b/neonView/NotificationFilter_view/NotificationFilter_view.aod @@ -1,48 +1,54 @@ -<?xml version="1.0" encoding="UTF-8"?> -<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> - <name>NotificationFilter_view</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <filterable v="true" /> - <layout> - <boxLayout> - <name>layout</name> - </boxLayout> - </layout> - <children> - <tableViewTemplate> - <name>Table</name> - <favoriteActionGroup1>setNotificationState</favoriteActionGroup1> - <entryAction>rowClickAction</entryAction> - <entityField>#ENTITY</entityField> - <isEditable v="false" /> - <showHeader v="true" /> - <isSaveable v="false" /> - <columns> - <neonTableColumn> - <name>1cff3be1-523d-4a5a-b7d1-389d7cbb726f</name> - <entityField>ICON</entityField> - </neonTableColumn> - <neonTableColumn> - <name>ebf8b6d5-1057-425d-a57b-d02e25dbd2a4</name> - <entityField>TYPECODE</entityField> - </neonTableColumn> - <neonTableColumn> - <name>0ed20b46-be6a-424c-a583-a3f7496ec3f9</name> - <entityField>CREATIONDATE</entityField> - </neonTableColumn> - <neonTableColumn> - <name>3bf425ed-227c-4768-b339-4794aa0d6063</name> - <entityField>CAPTION</entityField> - </neonTableColumn> - <neonTableColumn> - <name>ff33a6c1-7ac6-4acd-a083-e56a36f89977</name> - <entityField>DESCRIPTION</entityField> - </neonTableColumn> - <neonTableColumn> - <name>5cb09de4-4413-41e5-8a7c-4970a3cf6a62</name> - <entityField>STATE</entityField> - </neonTableColumn> - </columns> - </tableViewTemplate> - </children> -</neonView> +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> + <name>NotificationFilter_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <filterable v="true" /> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <tableViewTemplate> + <name>Table</name> + <favoriteActionGroup1>setNotificationState</favoriteActionGroup1> + <entryAction>rowClickAction</entryAction> + <entityField>#ENTITY</entityField> + <isEditable v="false" /> + <showHeader v="true" /> + <isSaveable v="false" /> + <columns> + <neonTableColumn> + <name>1cff3be1-523d-4a5a-b7d1-389d7cbb726f</name> + <entityField>ICON</entityField> + </neonTableColumn> + <neonTableColumn> + <name>ebf8b6d5-1057-425d-a57b-d02e25dbd2a4</name> + <entityField>TYPECODE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>e6296097-b6cc-4eb3-a32a-eed56a046ff0</name> + <entityField>CALCULATEDPRIORITY</entityField> + <width v="30" /> + <expandRatio v="0" /> + </neonTableColumn> + <neonTableColumn> + <name>0ed20b46-be6a-424c-a583-a3f7496ec3f9</name> + <entityField>CREATIONDATE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>3bf425ed-227c-4768-b339-4794aa0d6063</name> + <entityField>CAPTION</entityField> + </neonTableColumn> + <neonTableColumn> + <name>ff33a6c1-7ac6-4acd-a083-e56a36f89977</name> + <entityField>DESCRIPTION</entityField> + </neonTableColumn> + <neonTableColumn> + <name>5cb09de4-4413-41e5-8a7c-4970a3cf6a62</name> + <entityField>STATE</entityField> + </neonTableColumn> + </columns> + </tableViewTemplate> + </children> +</neonView>