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 @@
<entityField>
<name>ADDRESSADDITION</name>
<title>Address addition</title>
<stateProcess>%aditoprj%/entity/Address_entity/entityfields/addressaddition/stateProcess.js</stateProcess>
</entityField>
<entityField>
<name>ADDRESSID</name>
......@@ -31,6 +32,7 @@
<entityField>
<name>ADDRIDENTIFIER</name>
<title>{$ADDRESS_IDENTIFIER}</title>
<stateProcess>%aditoprj%/entity/Address_entity/entityfields/addridentifier/stateProcess.js</stateProcess>
</entityField>
<entityField>
<name>ADDR_TYPE</name>
......@@ -43,6 +45,7 @@
<entityField>
<name>BUILDINGNO</name>
<title>House number</title>
<stateProcess>%aditoprj%/entity/Address_entity/entityfields/buildingno/stateProcess.js</stateProcess>
</entityField>
<entityField>
<name>CITY</name>
......@@ -57,6 +60,7 @@
<title>Country</title>
<consumer>Countries</consumer>
<mandatory v="true" />
<stateProcess>%aditoprj%/entity/Address_entity/entityfields/country/stateProcess.js</stateProcess>
<valueProcess>%aditoprj%/entity/Address_entity/entityfields/country/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/Address_entity/entityfields/country/displayValueProcess.js</displayValueProcess>
</entityField>
......@@ -79,6 +83,7 @@
<name>STATE</name>
<title>${ADDRESS_STATE}</title>
<mandatoryProcess>%aditoprj%/entity/Address_entity/entityfields/state/mandatoryProcess.js</mandatoryProcess>
<stateProcess>%aditoprj%/entity/Address_entity/entityfields/state/stateProcess.js</stateProcess>
</entityField>
<entityField>
<name>ZIP</name>
......@@ -487,6 +492,11 @@
<name>#PROVIDER_AGGREGATES</name>
<useAggregates v="true" />
</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>
<recordContainers>
<dbRecordContainer>
......@@ -599,10 +609,11 @@
</recordFieldMappings>
<linkInformation>
<linkInformation>
<name>6a0005cc-c64b-4044-9712-c9d00f02d7a8</name>
<name>56df9517-4983-430b-bd06-d029007b76b3</name>
<tableName>ADDRESS</tableName>
<primaryKey>ADDRESSID</primaryKey>
<isUIDTable v="true" />
<readonly v="false" />
</linkInformation>
</linkInformation>
</dbRecordContainer>
......
import("system.neon");
import("system.vars");
import("system.result");
import("WsValidation_lib");
result.string(WsValidationFieldUtils.mainFieldStateProcess(WsValidationType.get().TYPE_STREET_NOMINATIM));
\ No newline at end of file
// 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.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("WsValidation_lib");
result.string(WsValidationFieldUtils.wsFieldStateProcess(WsValidationType.get().TYPE_STREET_NOMINATIM));
\ No newline at end of file
// 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.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("WsValidation_lib");
result.string(WsValidationFieldUtils.mainFieldStateProcess(WsValidationType.get().TYPE_CITY_NOMINATIM));
\ No newline at end of file
// 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.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("WsValidation_lib");
result.string(WsValidationFieldUtils.wsFieldStateProcess(WsValidationType.get().TYPE_CITY_NOMINATIM));
\ No newline at end of file
if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_VIEW)
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("WsValidation_lib");
result.string(WsValidationFieldUtils.mainFieldStateProcess(WsValidationType.get().TYPE_ZIP_NOMINATIM));
\ No newline at end of file
// 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.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("WsValidation_lib");
result.string(WsValidationFieldUtils.wsFieldStateProcess(WsValidationType.get().TYPE_ZIP_NOMINATIM));
\ No newline at end of file
// 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.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 @@
</dependency>
</entityConsumer>
<entityConsumer>
<name>Ussers</name>
<name>Users</name>
<dependency>
<name>dependency</name>
<entityName>Employee_entity</entityName>
......
......@@ -78,6 +78,10 @@
<name>9c37669e-e577-44b9-b43f-3734b88de205</name>
<entityField>LON</entityField>
</neonTitledListTableColumn>
<neonTitledListTableColumn>
<name>e8feb907-9f2e-42d9-93fe-ef7ccf11d384</name>
<entityField>formattedAddress</entityField>
</neonTitledListTableColumn>
</columns>
</titledListViewTemplate>
</children>
......
......@@ -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(/\\n/ig, "\n"); // newline marker ersetzen
res = res.replace(/ *\n */g, "\n");// leerzeichen am ende und Anfang entfernen
......@@ -538,7 +538,8 @@ function _formatAddrData( pAddrData, pFormat, pCountry )
*
N – Name - salutation
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
C – City or Locality - city
S – Administrative area - state
......@@ -549,7 +550,8 @@ function _mapFormatPlaceholderTitles(pFormat, pAddrData, pCountry)
{
//gstatic-paceholders
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("%S", "g"), "{state}");
pFormat = pFormat.replace(new RegExp("%Z", "g"), "{zip}");
......
......@@ -441,7 +441,7 @@ WsValidationFieldUtils.mainFieldStateProcess = function(pWsType)
*/
WsValidationFieldUtils.wsFieldStateProcess = function(pWsType)
{
if (!WsValidationUtils.isWsEnabled(pWsType))
if (!WsValidationUtils.isWsEnabled(pWsType) )
return neon.COMPONENTSTATE_INVISIBLE;
else
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