Skip to content
Snippets Groups Projects
Commit fb872084 authored by S.Leierseder's avatar S.Leierseder
Browse files

Attachments complete

parent eccd27be
No related branches found
No related tags found
No related merge requests found
Showing
with 62 additions and 39 deletions
......@@ -17,7 +17,7 @@
<column name="CONTAINER" value="DocumentTemplateType"/>
<column name="SORTING" valueNumeric="1"/>
<column name="ISACTIVE" valueNumeric="1"/>
<column name="ISESSENTIAL" valueNumeric="0"/>
<column name="ISESSENTIAL" valueNumeric="1"/>
</insert>
<insert tableName="AB_KEYWORD_ENTRY">
<column name="AB_KEYWORD_ENTRYID" value="bb386131-ee36-9771-b458-6751f137a941"/>
......@@ -26,7 +26,7 @@
<column name="CONTAINER" value="DocumentTemplateType"/>
<column name="SORTING" valueNumeric="2"/>
<column name="ISACTIVE" valueNumeric="1"/>
<column name="ISESSENTIAL" valueNumeric="0"/>
<column name="ISESSENTIAL" valueNumeric="1"/>
</insert>
<insert tableName="AB_KEYWORD_ENTRY">
<column name="AB_KEYWORD_ENTRYID" value="bb38aa51-ee36-9771-b458-6751f137a941"/>
......
......@@ -433,6 +433,13 @@
<name>DATE_EDIT</name>
<valueProcess>%aditoprj%/entity/Activity_entity/entityfields/date_edit/valueProcess.js</valueProcess>
</entityField>
<entityActionField>
<name>newMail</name>
<fieldType>ACTION</fieldType>
<title>Mail</title>
<onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/newmail/onActionProcess.js</onActionProcess>
<iconId>VAADIN:PAPERPLANE_O</iconId>
</entityActionField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.logging");
import("system.db");
import("system.vars");
import("system.neon");
var params = {};
//var doctempIds = db.table("select DOCUMENTTEMPLATEID from DOCUMENTTEMPLATE");
//logging.log(vars.getString(doctempIds));
//params["XY_param"] = "Mail";
neon.openContext("DocumentTemplate_context", "DocumentTemplateFilter_view", null, neon.OPERATINGSTATE_VIEW, null);
......@@ -59,6 +59,7 @@
<children>
<entityParameter>
<name>DocumentTemplateType_param</name>
<title></title>
<valueProcess>%aditoprj%/entity/DocumentTemplateLink_entity/entityfields/attachments/children/documenttemplatetype_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
......@@ -98,15 +99,23 @@
<dbRecordContainer>
<name>db</name>
<alias>Data_alias</alias>
<fromClauseProcess>%aditoprj%/entity/DocumentTemplateLink_entity/recordcontainers/db/fromClauseProcess.js</fromClauseProcess>
<conditionProcess>%aditoprj%/entity/DocumentTemplateLink_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
<linkInformation>
<linkInformation>
<name>99ab2840-c45e-4901-8383-91fbb8d82075</name>
<name>05d25e85-1cd8-4897-be48-ecf699322b1f</name>
<tableName>DOCUMENTTEMPLATELINK</tableName>
<primaryKey>DOCUMENTTEMPLATELINKID</primaryKey>
<isUIDTable v="true" />
<readonly v="false" />
</linkInformation>
<linkInformation>
<name>34ca9c71-3de5-48ce-ade2-fa203360ebbd</name>
<tableName>DOCUMENTTEMPLATE</tableName>
<primaryKey>DOCUMENTTEMPLATEID</primaryKey>
<isUIDTable v="false" />
<readonly v="true" />
</linkInformation>
</linkInformation>
<recordFieldMappings>
<dbRecordFieldMapping>
......
import("KeywordRegistry_basic");
import("system.result");
result.string($KeywordRegistry.documentTemplateType$attachment());
\ No newline at end of file
......@@ -5,9 +5,9 @@ import("system.vars");
import("system.db");
var parenttype = vars.get("$param.Type_param");
logging.log(parenttype);
//logging.log(parenttype);
if(vars.exists(parenttype) && paraenttype != null && parenttype != "MAI"){
result.object(neon.COMPONENTSTATE_DISABLED);
}
\ No newline at end of file
//if(vars.exists(parenttype) && paraenttype != null && parenttype != "MAI"){
// result.object(neon.COMPONENTSTATE_DISABLED);
//}
//
\ No newline at end of file
import("system.vars");
import("system.db");
import("system.result");
import("system.db");
import("Sql_lib");
var cond = SqlCondition.begin()
.andPrepareVars("DOCUMENTTEMPLATELINK.DOCUMENTTEMPLATE_ID_PARENT", "$param.DocumentId_param");
//TODO: use a preparedCondition when available #1030812 #1034026
result.string(db.translateCondition(cond.build("1 = 0")));
.andPrepareVars("DOCUMENTTEMPLATELINK.DOCUMENTTEMPLATE_ID_PARENT", "$param.DocumentId_param")
//if(vars.exists("$param.Type_param") && vars.get("$param.Type_param") != null && vars.get("$param.Type_param") == "ATT"){
//
// var cond = SqlCondition.begin()
// .andPrepare("DOCUMENTTEMPLATELINK.ATTACHMENT_TYPE", type)
// .andPrepareVars("DOCUMENTTEMPLATELINK.DOCUMENTTEMPLATE_ID_PARENT", docId)
// .build();
//
// result.string(db.translateCondition(cond));
//}
\ No newline at end of file
result.string(db.translateCondition(cond.build("1=2")));
\ No newline at end of file
import("system.result");
result.string("DOCUMENTTEMPLATELINK join DOCUMENTTEMPLATE on DOCUMENTTEMPLATE.DOCUMENTTEMPLATEID = DOCUMENTTEMPLATELINK.DOCUMENTTEMPLATE_ID_PARENT");
\ No newline at end of file
......@@ -199,6 +199,7 @@
<name>Links</name>
<title>Attachment</title>
<fieldType>DEPENDENCY_OUT</fieldType>
<stateProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/links/stateProcess.js</stateProcess>
<dependency>
<name>dependency</name>
<entityName>DocumentTemplateLink_entity</entityName>
......
import("system.result");
import("KeywordRegistry_basic");
import("system.vars");
import("system.neon");
if(vars.get("$field.TYPE") != $KeywordRegistry.documentTemplateType$mail())
{
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
\ No newline at end of file
import("system.logging");
import("system.result");
import("system.vars");
import("system.db");
import("Sql_lib");
var docTemplateType = vars.get("$param.DocumentTemplateType_param");
var docTemplateTypeClassification = vars.get("$param.DocumentTemplateTypeClassification_param");
var cond = SqlCondition.begin()
.andPrepareVars("DOCUMENTTEMPLATE.TYPE", "$param.DocumentTemplateType_param")
.andPrepareVars("DOCUMENTTEMPLATE.CLASSIFICATION", "$param.DocumentTemplateTypeClassification_param");
if(docTemplateType != null && docTemplateType != "" && docTemplateTypeClassification != null && docTemplateTypeClassification != "")
{
docTemplateType = docTemplateType.trim();
docTemplateTypeClassification = docTemplateTypeClassification.trim();
var cond = SqlCondition.begin()
.andPrepare("DOCUMENTTEMPLATE.TYPE", docTemplateType)
.andPrepare("DOCUMENTTEMPLATE.CLASSIFICATION", docTemplateTypeClassification)
.build();
result.string(db.translateStatement(cond));
}
\ No newline at end of file
result.string(db.translateStatement(cond.build("1=1")));
\ No newline at end of file
......@@ -71,4 +71,6 @@ $KeywordRegistry.contactDepartment = function(){return "ContactDepartment";};
$KeywordRegistry.contactPosition = function(){return "ContactPosition";};
$KeywordRegistry.contactContactrole = function(){return "ContactContactrole";};
$KeywordRegistry.documentTemplateType = function(){return "DocumentTemplateType";};
$KeywordRegistry.documentTemplateType$mail = function(){return "MAI ";};
$KeywordRegistry.documentTemplateType$attachment = function(){return "ATT ";};
$KeywordRegistry.documentTemplateTypeCategory = function(){return "DocumentTemplateTypeCategory";};
\ No newline at end of file
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