Skip to content
Snippets Groups Projects
Commit 9d243126 authored by S.Listl's avatar S.Listl
Browse files

Attribute onUpdate fix, icon in preview

parent 4623fe87
No related branches found
No related tags found
No related merge requests found
......@@ -297,6 +297,7 @@
</entityConsumer>
<entityField>
<name>ICON</name>
<colorProcess>%aditoprj%/entity/Attribute_entity/entityfields/icon/colorProcess.js</colorProcess>
<contentType>IMAGE</contentType>
<valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/icon/valueProcess.js</valueProcess>
</entityField>
......
import("system.vars");
import("system.result");
import("system.neon");
if (vars.getString("$field.ATTRIBUTE_ACTIVE") != "1")
result.string(neon.PRIORITY_LOW_COLOR);
\ No newline at end of file
import("system.logging");
import("Sql_lib");
import("system.db");
import("system.vars");
......@@ -20,4 +21,4 @@ var values = [
];
db.updateData("AB_ATTRIBUTE", columns, null, values,
SqlCondition.equals("AB_ATTRIBUTE.AB_ATTRIBUTEID", "$field.UID", "1=2"));
\ No newline at end of file
SqlCondition.equals("AB_ATTRIBUTE.AB_ATTRIBUTEID", vars.get("$field.UID"), "1=2"));
\ No newline at end of file
......@@ -54,7 +54,7 @@
</neonTableColumn>
<neonTableColumn>
<name>cc88ea53-2673-4c6e-ac2e-6766d2698453</name>
<entityField>ATTRIBUTE_ACTIVE</entityField>
<entityField>USAGELIST</entityField>
</neonTableColumn>
</columns>
</tableViewTemplate>
......
......@@ -11,6 +11,7 @@
<children>
<cardViewTemplate>
<name>Head</name>
<iconField>ICON</iconField>
<titleField>FULL_ATTRIBUTE_NAME</titleField>
<subtitleField>ATTRIBUTE_TYPE</subtitleField>
<entityField>#ENTITY</entityField>
......
......@@ -575,7 +575,10 @@ TreeUtils.sortArrayForTree = function (pArray, pUidIndex, pParentIdIndex)
index : index++
};
}, rows);
} while (oldIndex != index);
/* stop if no new items were added, otherwise incorrect data (for instance
an item that is it's own parent) could cause an infinite loop */
} while (oldIndex != index);
var sortedArray = new Array(index);
for (let i in rows)
sortedArray[rows[i].index] = rows[i].data;
......
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