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

[Projekt: Entwicklung - Neon][TicketNr.: 1048996][Alphabetische Sortierung und...

[Projekt: Entwicklung - Neon][TicketNr.: 1048996][Alphabetische Sortierung und manuelle Sortierung über Pfeile von Schlüsselwortlisten]
Bugfixing
parent 5ef57128
No related branches found
No related tags found
No related merge requests found
Showing
with 81 additions and 31 deletions
......@@ -5,5 +5,8 @@
<addColumn tableName="AB_KEYWORD_ENTRY">
<column name="AB_KEYWORD_CATEGORY_ID" type="CHAR(36)"/>
</addColumn>
<dropNotNullConstraint tableName="AB_KEYWORD_ENTRY"
columnName="CONTAINER"
columnDataType="VARCHAR(80)"/>
</changeSet>
</databaseChangeLog>
......@@ -6550,7 +6550,7 @@
<columnType v="12" />
<size v="80" />
<scale v="0" />
<notNull v="true" />
<notNull v="false" />
<isUnique v="false" />
<index v="true" />
<documentation></documentation>
......
......@@ -286,11 +286,11 @@
<kind v="10077" />
</entityNode>
<entityNode>
<name>KeywordEntry</name>
<name>KeywordCategory</name>
<kind v="10077" />
</entityNode>
<entityNode>
<name>KeywordCategory</name>
<name>KeywordEntry</name>
<kind v="10077" />
</entityNode>
<entityNode>
......
......@@ -6,6 +6,7 @@
<icon>VAADIN:FILE_TREE_SMALL</icon>
<contentTitleProcess>%aditoprj%/entity/KeywordCategory_entity/contentTitleProcess.js</contentTitleProcess>
<iconId>VAADIN:FILE_TREE_SMALL</iconId>
<titlePlural>Keyword Categories</titlePlural>
<recordContainer>db</recordContainer>
<entityFields>
<entityProvider>
......@@ -56,6 +57,7 @@
</entityProvider>
<entityConsumer>
<name>OrderedByNameFieldKeywordsConsumer</name>
<state>INVISIBLE</state>
<stateProcess>%aditoprj%/entity/KeywordCategory_entity/entityfields/orderedbynamefieldkeywordsconsumer/stateProcess.js</stateProcess>
<dependency>
<name>dependency</name>
......@@ -71,6 +73,7 @@
</entityConsumer>
<entityConsumer>
<name>OrderedBySortingFieldKeywordsConsumer</name>
<state>INVISIBLE</state>
<stateProcess>%aditoprj%/entity/KeywordCategory_entity/entityfields/orderedbysortingfieldkeywordsconsumer/stateProcess.js</stateProcess>
<dependency>
<name>dependency</name>
......@@ -100,6 +103,9 @@
<name>db</name>
<isPageable v="true" />
<orderClauseProcess>%aditoprj%/entity/KeywordCategory_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess>
<onDBInsert>%aditoprj%/entity/KeywordCategory_entity/recordcontainers/db/onDBInsert.js</onDBInsert>
<onDBUpdate>%aditoprj%/entity/KeywordCategory_entity/recordcontainers/db/onDBUpdate.js</onDBUpdate>
<onDBDelete>%aditoprj%/entity/KeywordCategory_entity/recordcontainers/db/onDBDelete.js</onDBDelete>
<alias>Data_alias</alias>
<recordFieldMappings>
<dbRecordFieldMapping>
......
......@@ -3,7 +3,7 @@ import("system.vars");
import("system.result");
if (vars.get("$field.SORTINGBY") === "0")
if (vars.get("$field.SORTINGBY") === "0" || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
result.string(neon.COMPONENTSTATE_INVISIBLE);
else
result.string(neon.COMPONENTSTATE_EDITABLE);
......@@ -3,7 +3,7 @@ import("system.vars");
import("system.result");
if (vars.get("$field.SORTINGBY") === "0")
if (vars.get("$field.SORTINGBY") === "0" && vars.get("$sys.recordstate") != neon.OPERATINGSTATE_NEW)
result.string(neon.COMPONENTSTATE_EDITABLE);
else
result.string(neon.COMPONENTSTATE_INVISIBLE);
\ No newline at end of file
import("system.vars");
import("system.entities");
import("Sql_lib");
var categoryId = vars.get("$local.uid");
newWhere("AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ATTRIBUTE_ID", newSelect("AB_KEYWORD_ATTRIBUTE.AB_KEYWORD_ATTRIBUTEID")
.from("AB_KEYWORD_ATTRIBUTE")
.where("AB_KEYWORD_ATTRIBUTE.AB_KEYWORD_CATEGORY_ID", categoryId)
, SqlBuilder.IN()).deleteData();
newWhere("AB_KEYWORD_ATTRIBUTE.AB_KEYWORD_CATEGORY_ID", categoryId).deleteData();
newWhere("AB_KEYWORD_ENTRY.AB_KEYWORD_CATEGORY_ID", categoryId).deleteData();
//dependecies are removed so the cache needs to be updated
entities.invalidateCache("KeywordEntry_entity", "db");
\ No newline at end of file
import("system.entities");
//dependecies are updated so the cache needs to be updated
entities.invalidateCache("KeywordEntry_entity", "db");
\ No newline at end of file
import("system.entities");
//dependecies are updated so the cache needs to be updated
entities.invalidateCache("KeywordEntry_entity", "db");
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.18" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.18">
<name>KeywordEntry_entity</name>
<title>Keyword</title>
<title>Keyword Entry</title>
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/KeywordEntry_entity/documentation.adoc</documentation>
<siblings />
......@@ -11,7 +11,7 @@
<onValidation>%aditoprj%/entity/KeywordEntry_entity/onValidation.js</onValidation>
<iconId>VAADIN:KEY</iconId>
<iconIdProcess>%aditoprj%/entity/KeywordEntry_entity/iconIdProcess.js</iconIdProcess>
<titlePlural>Keywords</titlePlural>
<titlePlural>Keyword Entries</titlePlural>
<recordContainer>db</recordContainer>
<entityFields>
<entityProvider>
......@@ -43,12 +43,7 @@
<name>CONTAINER</name>
<documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/container/documentation.adoc</documentation>
<title>Container</title>
<groupable v="true" />
<mandatory v="true" />
<dropDownProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/container/dropDownProcess.js</dropDownProcess>
<textInputAllowed v="true" />
<state>READONLY</state>
<stateProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/container/stateProcess.js</stateProcess>
</entityField>
<entityField>
<name>AB_KEYWORD_ENTRYID</name>
......@@ -709,10 +704,12 @@
</entityParameter>
<entityField>
<name>AB_KEYWORD_CATEGORY_ID</name>
<title>Container new</title>
<title>Keyword Category</title>
<consumer>KeywordCategoryConsumer</consumer>
<groupable v="true" />
<mandatory v="true" />
<state>READONLY</state>
<stateProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/ab_keyword_category_id/stateProcess.js</stateProcess>
<displayValueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/ab_keyword_category_id/displayValueProcess.js</displayValueProcess>
</entityField>
<entityConsumer>
......@@ -767,6 +764,11 @@
</entityParameter>
</children>
</entityProvider>
<entityField>
<name>KEYID_alwaysReadOnly</name>
<state>READONLY</state>
<valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/keyid_alwaysreadonly/valueProcess.js</valueProcess>
</entityField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......@@ -811,13 +813,16 @@
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>CONTAINER.value</name>
<recordfield>AB_KEYWORD_ENTRY.CONTAINER</recordfield>
<isFilterable v="true" />
<isLookupFilter v="true" />
<expression>%aditoprj%/entity/KeywordEntry_entity/recordcontainers/db/recordfieldmappings/container.value/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>AB_KEYWORD_CATEGORY_ID.value</name>
<recordfield>AB_KEYWORD_ENTRY.AB_KEYWORD_CATEGORY_ID</recordfield>
<isFilterable v="true" />
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>AB_KEYWORD_CATEGORY_ID.displayValue</name>
<expression>%aditoprj%/entity/KeywordEntry_entity/recordcontainers/db/recordfieldmappings/ab_keyword_category_id.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
</recordFieldMappings>
<linkInformation>
......
import("system.result");
import("Keyword_lib");
var res = KeywordUtils.getContainerNames().map(function(e){
return [e, e];//currently the first column is ID, second view value - which is the same because there is no ID for keyword-containers
});
result.object(res);
\ No newline at end of file
import("system.vars");
import("system.result");
result.string(vars.get("$field.KEYID"));
\ No newline at end of file
import("system.result");
import("Sql_lib");
var res = newSelect("AB_KEYWORD_CATEGORY.NAME")
.from("AB_KEYWORD_CATEGORY")
.where("AB_KEYWORD_CATEGORY.AB_KEYWORD_CATEGORYID = AB_KEYWORD_ENTRY.AB_KEYWORD_CATEGORY_ID")
.toString();
result.string(res);
\ No newline at end of file
import("system.result");
import("Sql_lib");
var res = newSelect("AB_KEYWORD_CATEGORY.NAME")
.from("AB_KEYWORD_CATEGORY")
.where("AB_KEYWORD_CATEGORY.AB_KEYWORD_CATEGORYID = AB_KEYWORD_ENTRY.AB_KEYWORD_CATEGORY_ID")
.toString();
result.string(res);
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<neonContext 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/neonContext/1.1.1">
<name>KeywordEntry</name>
<title>Keyword</title>
<title>Keyword Entry</title>
<description>&lt;null value&gt;</description>
<majorModelMode>DISTRIBUTED</majorModelMode>
<filterView>KeywordEntryFilter_view</filterView>
......
......@@ -10,19 +10,20 @@
<children>
<titledListViewTemplate>
<name>KeywordList</name>
<titleField>KEYID</titleField>
<titleField>KEYID_alwaysReadOnly</titleField>
<fixedDrawer v="true" />
<autoNewRow v="false" />
<entityField>#ENTITY</entityField>
<isDeletable v="false" />
<isCreatable v="false" />
<isEditable v="false" />
<columns>
<neonTitledListTableColumn>
<name>53531152-1960-47ec-b9d6-bcee76a81977</name>
<name>059eac66-9187-4d85-bcd3-0b769b63b54c</name>
<entityField>TITLE</entityField>
</neonTitledListTableColumn>
<neonTitledListTableColumn>
<name>059eac66-9187-4d85-bcd3-0b769b63b54c</name>
<name>ec5245a3-69a2-4daa-9fc8-79378c77e5d5</name>
<entityField>TITLE_TRANSLATED</entityField>
</neonTitledListTableColumn>
<neonTitledListTableColumn>
......
......@@ -121,7 +121,7 @@ KeywordUtils.getContainerNames = function()
*/
KeywordUtils.getCategoryNameById = function(pCategoryId)
{
let categoryName = "<unknown>";
let categoryName = "";
if(pCategoryId) {
let resultValue = newSelect("AB_KEYWORD_CATEGORY.NAME")
......@@ -129,12 +129,11 @@ KeywordUtils.getCategoryNameById = function(pCategoryId)
.where("AB_KEYWORD_CATEGORY.AB_KEYWORD_CATEGORYID", pCategoryId)
.cell();
if(resultValue) {
if(resultValue)
categoryName = resultValue;
}
}
return translate.text(categoryName);
return categoryName;
};
/**
......
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