Skip to content
Snippets Groups Projects
Commit a43bbfc6 authored by Sebastian Listl's avatar Sebastian Listl :speech_balloon:
Browse files

merged origin/FixClassificationAdminSmallFixes into master

parents 0eb592e8 6cc39cc8
No related branches found
No related tags found
No related merge requests found
Showing with 61 additions and 7 deletions
......@@ -136,10 +136,12 @@
<textInputAllowed v="true" />
<stateProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationgroupdisplayvalue/stateProcess.js</stateProcess>
<valueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationgroupdisplayvalue/valueProcess.js</valueProcess>
<onValueChange>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationgroupdisplayvalue/onValueChange.js</onValueChange>
</entityField>
<entityField>
<name>SCOREPOINTS</name>
<title>Max Points</title>
<contentType>NUMBER</contentType>
<mandatory v="true" />
<mandatoryProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/scorepoints/mandatoryProcess.js</mandatoryProcess>
<stateProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/scorepoints/stateProcess.js</stateProcess>
......
import("system.neon");
import("system.vars");
import("Sql_lib");
if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW)
{
var sorting = newSelect("CLASSIFICATIONGROUP.SORTING")
.from("CLASSIFICATIONGROUP")
.where("CLASSIFICATIONGROUP.CLASSIFICATIONGROUPID", vars.get("$this.value"))
.cell();
if(sorting)
{
neon.setFieldValue("$field.SORTING", sorting)
}
}
\ No newline at end of file
......@@ -9,7 +9,7 @@ var recordCategory = vars.get("$field.recordCategory");
if(recordCategory == $ClassificationRecordCategories.CLASSIFICATION_CLASSIFICATION_TYPE())
state = neon.COMPONENTSTATE_INVISIBLE;
else if(recordCategory == $ClassificationRecordCategories.CLASSIFICATION_GROUP_EXISTS())
state = neon.COMPONENTSTATE_DISABLED;
state = neon.COMPONENTSTATE_EDITABLE;
else
state = neon.COMPONENTSTATE_EDITABLE;
......
import("Classification_lib");
import("system.neon");
import("system.vars");
import("system.result");
......@@ -33,7 +34,16 @@ var sorting = newSelect("CLASSIFICATIONGROUP.SORTING")
.from("CLASSIFICATIONGROUP")
.where("CLASSIFICATIONGROUP.CLASSIFICATIONGROUPID", id)
.cell();
if(sorting)
var fieldValue = vars.get("$this.value");
if((!fieldValue || fieldValue == "") && sorting)
{
result.string(sorting);
}
else if(fieldValue)
{
result.string(fieldValue);
}
else
{
result.string("1");
}
import("system.translate");
import("system.result");
import("system.vars");
......@@ -6,10 +7,16 @@ if(val)
{
var res;
if(!Number.isInteger(Number(val)))
res = "Only Integers allowed";
{
res = translate.text("Only Integers allowed");
}
else if(val < 0 || val > 100)
res = "The Value has to be in the 0-100% range";
{
res = translate.text("The Value has to be in the 0-100% range");
}
if(res)
{
result.string(res);
}
}
\ No newline at end of file
......@@ -86,6 +86,7 @@
<name>SCOREPERCENT</name>
<title>Percent</title>
<contentType>NUMBER</contentType>
<onValidation>%aditoprj%/entity/ClassificationScore_entity/entityfields/scorepercent/onValidation.js</onValidation>
</entityField>
<entityField>
<name>scoreInPoints</name>
......
import("system.translate");
import("system.result");
import("system.vars");
var val = vars.get("$this.value");
if(val)
{
if(val < 0 || val > 100)
result.string(translate.text("The Value has to be in the 0-100% range"));
}
\ No newline at end of file
......@@ -534,8 +534,8 @@ function _buildTreeFromPersistetData()
achievedGroupScoresObj[groupId] = 0
classificationGroups.push(groupId)
}
if(classificationScorePoints != undefined)
achievedGroupScoresObj[groupId] = eMath.addInt(Number(achievedGroupScoresObj[groupId]), Number(classificationScorePoints));
if(classificationScorePoints != undefined || classificationScorePoints != "")
achievedGroupScoresObj[groupId] = eMath.addDec(Number(achievedGroupScoresObj[groupId]), Number(classificationScorePoints));
treeBuilt = true;
resultSet.push([uid, typeId, classificationId, groupId, classificationGroupTitle, classificationTypeScoreType,
......
......@@ -10128,6 +10128,14 @@ Bitte Datumseingabe prüfen</value>
<key>Filter set</key>
<value>Filter gesetzt</value>
</entry>
<entry>
<key>The Value has to be in the 0-100% range</key>
<value>Der Wert muss sich zwischen 0 und 100% liegen</value>
</entry>
<entry>
<key>Only Integers allowed</key>
<value>Nur ganze Zahlen erlaubt</value>
</entry>
<entry>
<key>Sent Offers</key>
</entry>
......
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