Skip to content
Snippets Groups Projects
Commit 3a7b49e4 authored by Sebastian Pongratz's avatar Sebastian Pongratz :ping_pong: Committed by Johannes Goderbauer
Browse files

#1044372 adresse formatiert & #1061978 Briefanschrift richtig formatiert

parent 5d8cb7d5
No related branches found
No related tags found
No related merge requests found
Showing
with 184 additions and 12 deletions
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
<entityField> <entityField>
<name>ADDRESSADDITION</name> <name>ADDRESSADDITION</name>
<title>Address addition</title> <title>Address addition</title>
<stateProcess>%aditoprj%/entity/Address_entity/entityfields/addressaddition/stateProcess.js</stateProcess>
</entityField> </entityField>
<entityField> <entityField>
<name>ADDRESSID</name> <name>ADDRESSID</name>
...@@ -31,6 +32,7 @@ ...@@ -31,6 +32,7 @@
<entityField> <entityField>
<name>ADDRIDENTIFIER</name> <name>ADDRIDENTIFIER</name>
<title>{$ADDRESS_IDENTIFIER}</title> <title>{$ADDRESS_IDENTIFIER}</title>
<stateProcess>%aditoprj%/entity/Address_entity/entityfields/addridentifier/stateProcess.js</stateProcess>
</entityField> </entityField>
<entityField> <entityField>
<name>ADDR_TYPE</name> <name>ADDR_TYPE</name>
...@@ -43,6 +45,7 @@ ...@@ -43,6 +45,7 @@
<entityField> <entityField>
<name>BUILDINGNO</name> <name>BUILDINGNO</name>
<title>House number</title> <title>House number</title>
<stateProcess>%aditoprj%/entity/Address_entity/entityfields/buildingno/stateProcess.js</stateProcess>
</entityField> </entityField>
<entityField> <entityField>
<name>CITY</name> <name>CITY</name>
...@@ -57,6 +60,7 @@ ...@@ -57,6 +60,7 @@
<title>Country</title> <title>Country</title>
<consumer>Countries</consumer> <consumer>Countries</consumer>
<mandatory v="true" /> <mandatory v="true" />
<stateProcess>%aditoprj%/entity/Address_entity/entityfields/country/stateProcess.js</stateProcess>
<valueProcess>%aditoprj%/entity/Address_entity/entityfields/country/valueProcess.js</valueProcess> <valueProcess>%aditoprj%/entity/Address_entity/entityfields/country/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/Address_entity/entityfields/country/displayValueProcess.js</displayValueProcess> <displayValueProcess>%aditoprj%/entity/Address_entity/entityfields/country/displayValueProcess.js</displayValueProcess>
</entityField> </entityField>
...@@ -79,6 +83,7 @@ ...@@ -79,6 +83,7 @@
<name>STATE</name> <name>STATE</name>
<title>${ADDRESS_STATE}</title> <title>${ADDRESS_STATE}</title>
<mandatoryProcess>%aditoprj%/entity/Address_entity/entityfields/state/mandatoryProcess.js</mandatoryProcess> <mandatoryProcess>%aditoprj%/entity/Address_entity/entityfields/state/mandatoryProcess.js</mandatoryProcess>
<stateProcess>%aditoprj%/entity/Address_entity/entityfields/state/stateProcess.js</stateProcess>
</entityField> </entityField>
<entityField> <entityField>
<name>ZIP</name> <name>ZIP</name>
...@@ -487,6 +492,11 @@ ...@@ -487,6 +492,11 @@
<name>#PROVIDER_AGGREGATES</name> <name>#PROVIDER_AGGREGATES</name>
<useAggregates v="true" /> <useAggregates v="true" />
</entityProvider> </entityProvider>
<entityField>
<name>formattedAddress</name>
<stateProcess>%aditoprj%/entity/Address_entity/entityfields/formattedaddress/stateProcess.js</stateProcess>
<valueProcess>%aditoprj%/entity/Address_entity/entityfields/formattedaddress/valueProcess.js</valueProcess>
</entityField>
</entityFields> </entityFields>
<recordContainers> <recordContainers>
<dbRecordContainer> <dbRecordContainer>
...@@ -599,10 +609,11 @@ ...@@ -599,10 +609,11 @@
</recordFieldMappings> </recordFieldMappings>
<linkInformation> <linkInformation>
<linkInformation> <linkInformation>
<name>6a0005cc-c64b-4044-9712-c9d00f02d7a8</name> <name>56df9517-4983-430b-bd06-d029007b76b3</name>
<tableName>ADDRESS</tableName> <tableName>ADDRESS</tableName>
<primaryKey>ADDRESSID</primaryKey> <primaryKey>ADDRESSID</primaryKey>
<isUIDTable v="true" /> <isUIDTable v="true" />
<readonly v="false" />
</linkInformation> </linkInformation>
</linkInformation> </linkInformation>
</dbRecordContainer> </dbRecordContainer>
......
import("system.neon");
import("system.vars");
import("system.result"); import("system.result");
import("WsValidation_lib"); import("WsValidation_lib");
result.string(WsValidationFieldUtils.mainFieldStateProcess(WsValidationType.get().TYPE_STREET_NOMINATIM)); // The field is only displayed in edit mode because there is the "formattedAddress" field which one shows the fromated address.
\ No newline at end of file // If the field has a Value it would be displayed next to the formattedAddress field in view mode, so in this case the state is set to invisible.
if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_VIEW)
result.string(neon.COMPONENTSTATE_INVISIBLE);
else
result.string(WsValidationFieldUtils.mainFieldStateProcess(WsValidationType.get().TYPE_STREET_NOMINATIM));
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.result"); import("system.result");
import("WsValidation_lib"); import("WsValidation_lib");
result.string(WsValidationFieldUtils.wsFieldStateProcess(WsValidationType.get().TYPE_STREET_NOMINATIM)); // The field is only displayed in edit mode because there is the "formattedAddress" field which one shows the fromated address.
\ No newline at end of file // If the field has a Value it would be displayed next to the formattedAddress field in view mode, so in this case the state is set to invisible.
if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_VIEW)
result.string(neon.COMPONENTSTATE_INVISIBLE);
else
result.string(WsValidationFieldUtils.wsFieldStateProcess(WsValidationType.get().TYPE_STREET_NOMINATIM));
\ No newline at end of file
import("system.neon");
import("system.result");
import("system.vars");
// The field is only displayed in edit mode because there is the "formattedAddress" field which one shows the fromated address.
// If the field has a Value it would be displayed next to the formattedAddress field in view mode, so in this case the state is set to invisible.
if (vars.get("$sys.recordstate") == "" || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_VIEW)
{
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
\ No newline at end of file
import("system.neon");
import("system.result");
import("system.vars");
// The field is only displayed in edit mode because there is the "formattedAddress" field which one shows the fromated address.
// If the field has a Value it would be displayed next to the formattedAddress field in view mode, so in this case the state is set to invisible.
if (vars.get("$sys.recordstate") == "" || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_VIEW)
{
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
\ No newline at end of file
import("system.neon");
import("system.result");
import("system.vars");
// The field is only displayed in edit mode because there is the "formattedAddress" field which one shows the fromated address.
// If the field has a Value it would be displayed next to the formattedAddress field in view mode, so in this case the state is set to invisible.
if (vars.get("$sys.recordstate") == "" || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_VIEW)
{
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.result"); import("system.result");
import("WsValidation_lib"); import("WsValidation_lib");
result.string(WsValidationFieldUtils.mainFieldStateProcess(WsValidationType.get().TYPE_CITY_NOMINATIM)); // The field is only displayed in edit mode because there is the "formattedAddress" field which one shows the fromated address.
\ No newline at end of file // If the field has a Value it would be displayed next to the formattedAddress field in view mode, so in this case the state is set to invisible.
if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_VIEW)
result.string(neon.COMPONENTSTATE_INVISIBLE);
else
result.string(WsValidationFieldUtils.mainFieldStateProcess(WsValidationType.get().TYPE_CITY_NOMINATIM));
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.result"); import("system.result");
import("WsValidation_lib"); import("WsValidation_lib");
result.string(WsValidationFieldUtils.wsFieldStateProcess(WsValidationType.get().TYPE_CITY_NOMINATIM)); if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_VIEW)
\ No newline at end of file result.string(neon.COMPONENTSTATE_INVISIBLE);
else
result.string(WsValidationFieldUtils.wsFieldStateProcess(WsValidationType.get().TYPE_CITY_NOMINATIM));
\ No newline at end of file
import("system.neon");
import("system.result");
import("system.vars");
// The field is only displayed in edit mode because there is the "formattedAddress" field which one shows the fromated address.
// If the field has a Value it would be displayed next to the formattedAddress field in view mode, so in this case the state is set to invisible.
if (vars.get("$sys.recordstate") == "" || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_VIEW)
{
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
\ No newline at end of file
import("system.neon");
import("system.result");
import("system.vars");
if (vars.get("$sys.recordstate") != "" && vars.get("$sys.recordstate") != neon.OPERATINGSTATE_VIEW)
{
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
\ No newline at end of file
import("system.result");
import("system.vars");
import("Sql_lib");
import("Address_lib");
result.string(setAddressData(
[
[
[
"2",
vars.get("$field.ADDRESS"),
vars.get("$field.BUILDINGNO"),
vars.get("$field.ZIP"),
vars.get("$field.CITY"),
vars.get("$field.COUNTRY"),
"",
"",
vars.get("$field.DISTRICT"),
vars.get("$field.REGION"),
vars.get("$field.STATE"),
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
newSelect("ADDR_FORMAT")
.from("AB_COUNTRYINFO")
.where("AB_COUNTRYINFO.ISO2", vars.get("$field.COUNTRY"))
.cell() + "%n {country}",
""
]
],
[
[
0,
"ADDRESSFORMAT",
""
]
],
[
"{@fullAddress@}"
],
{
length : 28
}
])[1][0]);
import("system.neon");
import("system.result");
import("system.vars");
// The field is only displayed in edit mode because there is the "formattedAddress" field which one shows the fromated address.
// If the field has a Value it would be displayed next to the formattedAddress field in view mode, so in this case the state is set to invisible.
if (vars.get("$sys.recordstate") == "" || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_VIEW)
{
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.result"); import("system.result");
import("WsValidation_lib"); import("WsValidation_lib");
result.string(WsValidationFieldUtils.mainFieldStateProcess(WsValidationType.get().TYPE_ZIP_NOMINATIM)); // The field is only displayed in edit mode because there is the "formattedAddress" field which one shows the fromated address.
\ No newline at end of file // If the field has a Value it would be displayed next to the formattedAddress field in view mode, so in this case the state is set to invisible.
if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_VIEW)
result.string(neon.COMPONENTSTATE_INVISIBLE);
else
result.string(WsValidationFieldUtils.mainFieldStateProcess(WsValidationType.get().TYPE_ZIP_NOMINATIM));
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.result"); import("system.result");
import("WsValidation_lib"); import("WsValidation_lib");
result.string(WsValidationFieldUtils.wsFieldStateProcess(WsValidationType.get().TYPE_ZIP_NOMINATIM)); // The field is only displayed in edit mode because there is the "formattedAddress" field which one shows the fromated address.
\ No newline at end of file // If the field has a Value it would be displayed next to the formattedAddress field in view mode, so in this case the state is set to invisible.
if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_VIEW)
result.string(neon.COMPONENTSTATE_INVISIBLE);
else
result.string(WsValidationFieldUtils.wsFieldStateProcess(WsValidationType.get().TYPE_ZIP_NOMINATIM));
\ No newline at end of file
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
</dependency> </dependency>
</entityConsumer> </entityConsumer>
<entityConsumer> <entityConsumer>
<name>Ussers</name> <name>Users</name>
<dependency> <dependency>
<name>dependency</name> <name>dependency</name>
<entityName>Employee_entity</entityName> <entityName>Employee_entity</entityName>
......
...@@ -78,6 +78,10 @@ ...@@ -78,6 +78,10 @@
<name>9c37669e-e577-44b9-b43f-3734b88de205</name> <name>9c37669e-e577-44b9-b43f-3734b88de205</name>
<entityField>LON</entityField> <entityField>LON</entityField>
</neonTitledListTableColumn> </neonTitledListTableColumn>
<neonTitledListTableColumn>
<name>e8feb907-9f2e-42d9-93fe-ef7ccf11d384</name>
<entityField>formattedAddress</entityField>
</neonTitledListTableColumn>
</columns> </columns>
</titledListViewTemplate> </titledListViewTemplate>
</children> </children>
......
...@@ -516,7 +516,7 @@ function _formatAddrData( pAddrData, pFormat, pCountry ) ...@@ -516,7 +516,7 @@ function _formatAddrData( pAddrData, pFormat, pCountry )
} }
} }
res = res.replace(/^\n/, ""); // CR am Anfang entfernen; res = res.replace(/^ *\n *\n*/, ""); // CR am Anfang entfernen;
res = res.replace(/ /g, " "); // doppelte leerzeichen entfernen res = res.replace(/ /g, " "); // doppelte leerzeichen entfernen
res = res.replace(/\\n/ig, "\n"); // newline marker ersetzen res = res.replace(/\\n/ig, "\n"); // newline marker ersetzen
res = res.replace(/ *\n */g, "\n");// leerzeichen am ende und Anfang entfernen res = res.replace(/ *\n */g, "\n");// leerzeichen am ende und Anfang entfernen
...@@ -538,7 +538,8 @@ function _formatAddrData( pAddrData, pFormat, pCountry ) ...@@ -538,7 +538,8 @@ function _formatAddrData( pAddrData, pFormat, pCountry )
* *
N – Name - salutation N – Name - salutation
O – Organisation - orgname O – Organisation - orgname
A – Street Address Line(s) - address + buildingno A – Street Address Line(s) - address
B – Street Address Line(s) - buildingno
D – Dependent locality - district / region D – Dependent locality - district / region
C – City or Locality - city C – City or Locality - city
S – Administrative area - state S – Administrative area - state
...@@ -549,7 +550,8 @@ function _mapFormatPlaceholderTitles(pFormat, pAddrData, pCountry) ...@@ -549,7 +550,8 @@ function _mapFormatPlaceholderTitles(pFormat, pAddrData, pCountry)
{ {
//gstatic-paceholders //gstatic-paceholders
pFormat = pFormat.replace(new RegExp("%N", "g"), "{salutation_name}"); pFormat = pFormat.replace(new RegExp("%N", "g"), "{salutation_name}");
pFormat = pFormat.replace(new RegExp("%A", "g"), "{street} {buildingno}"); pFormat = pFormat.replace(new RegExp("%A", "g"), "{street}");
pFormat = pFormat.replace(new RegExp("%B", "g"), "{buildingno}");
pFormat = pFormat.replace(new RegExp("%C", "g"), "{city}"); pFormat = pFormat.replace(new RegExp("%C", "g"), "{city}");
pFormat = pFormat.replace(new RegExp("%S", "g"), "{state}"); pFormat = pFormat.replace(new RegExp("%S", "g"), "{state}");
pFormat = pFormat.replace(new RegExp("%Z", "g"), "{zip}"); pFormat = pFormat.replace(new RegExp("%Z", "g"), "{zip}");
......
...@@ -441,7 +441,7 @@ WsValidationFieldUtils.mainFieldStateProcess = function(pWsType) ...@@ -441,7 +441,7 @@ WsValidationFieldUtils.mainFieldStateProcess = function(pWsType)
*/ */
WsValidationFieldUtils.wsFieldStateProcess = function(pWsType) WsValidationFieldUtils.wsFieldStateProcess = function(pWsType)
{ {
if (!WsValidationUtils.isWsEnabled(pWsType)) if (!WsValidationUtils.isWsEnabled(pWsType) )
return neon.COMPONENTSTATE_INVISIBLE; return neon.COMPONENTSTATE_INVISIBLE;
else else
return neon.COMPONENTSTATE_AUTO; return neon.COMPONENTSTATE_AUTO;
......
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