Skip to content
Snippets Groups Projects
Commit 5dc90d19 authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

added custom properties to keywords

[Projekt: Entwicklung - Neon][TicketNr.: 1022526][Bereitstellung erste Version 5.1 Customizing für Gremium]
parent 10954966
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@
<tableName>COMM</tableName>
<columnName>ADDR</columnName>
<caption>${COMM_ADDRESS}</caption>
<contentTypeProcess>%aditoprj%/entity/Comm_entity/entityfields/addr/contentTypeProcess.js</contentTypeProcess>
</entityField>
<entityField>
<name>COMMID</name>
......
import("Keyword_lib");
import("system.vars");
import("system.result");
import("system.neon");
var keywordUtils, category, medium, contentType;
//TODO: add constants for contentTypes #1022547
medium = vars.get("$field.MEDIUM_ID");
if (medium){
keywordUtils = new KeywordUtils();
category = keywordUtils.createKeyword("COMM.MEDIUM").getPropForKey(medium, "category", true);
switch (category) {
case "PHONE":
contentType = "TELEPHONE";
break;
case "EMAIL":
contentType = "EMAIL";
break;
case "WEBSITE":
contentType = "LINK";
break;
default:
contentType = "TEXT";
break;
}
}
else {
contentType = "TEXT";
}
result.string(contentType);
This diff is collapsed.
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