Skip to content
Snippets Groups Projects
Commit 701541df authored by Benjamin Ulrich's avatar Benjamin Ulrich :speech_balloon: Committed by Sebastian Pongratz
Browse files

[Projekt: xRM-Sales][TicketNr.: 1085759][Themenbaum Paging der Nodes einbauen...

[Projekt: xRM-Sales][TicketNr.: 1085759][Themenbaum Paging der Nodes einbauen und Filter manuell implementieren]
parent cf475c81
No related branches found
No related tags found
No related merge requests found
Showing
with 230 additions and 0 deletions
import("system.neon");
import("TopicTree_lib");
import("system.vars");
var selection = vars.get("$sys.selectionRows")[0];
var topicTreeid = selection["#UID"];
var sortingHelper = JSON.parse(selection.sortingHelper);
var currentLayer = TopicTreeUtils.getLayer(selection.SORTING_LAYER_1, selection.SORTING_LAYER_2, selection.SORTING_LAYER_3, selection.SORTING_LAYER_4, selection.SORTING_LAYER_5, selection.SORTING_LAYER_6);
var assignedTo = selection.ASSIGNEDTO == "" ? $TopicTreeConstants.TOPTOPIC() : selection.ASSIGNEDTO;
TopicTreeUtils.movePosition(topicTreeid, $TopicTreeMoveDirections.TOP(), sortingHelper.maxSortingValue, assignedTo, sortingHelper.ownSortingValue, currentLayer);
neon.refreshAll();
\ No newline at end of file
import("system.result");
import("system.eMath");
import("system.neon");
import("system.vars");
var operatingState = vars.get("$sys.operatingstate");
var state = neon.COMPONENTSTATE_DISABLED;
if(operatingState != neon.OPERATINGSTATE_NEW && operatingState != neon.OPERATINGSTATE_EDIT)
{
var selection = vars.get("$sys.selectionRows")[0];
if(selection && selection.sortingHelper != "")
{
var sortingObj = JSON.parse(selection.sortingHelper);
var ownSortingValue = sortingObj.ownSortingValue;
if(ownSortingValue != 1)
{
state = neon.COMPONENTSTATE_EDITABLE;
}
}
}
result.string(state);
\ No newline at end of file
import("system.neon");
import("TopicTree_lib");
import("system.vars");
var selection = vars.get("$sys.selectionRows")[0];
var topicTreeid = selection["#UID"];
var sortingHelper = JSON.parse(selection.sortingHelper);
var currentLayer = TopicTreeUtils.getLayer(selection.SORTING_LAYER_1, selection.SORTING_LAYER_2, selection.SORTING_LAYER_3, selection.SORTING_LAYER_4, selection.SORTING_LAYER_5, selection.SORTING_LAYER_6);
var assignedTo = selection.ASSIGNEDTO == "" ? $TopicTreeConstants.TOPTOPIC() : selection.ASSIGNEDTO;
TopicTreeUtils.movePosition(topicTreeid, $TopicTreeMoveDirections.BOTTOM(), sortingHelper.maxSortingValue, assignedTo, sortingHelper.ownSortingValue, currentLayer);
neon.refreshAll();
\ No newline at end of file
import("system.result");
import("system.eMath");
import("system.neon");
import("system.vars");
var operatingState = vars.get("$sys.operatingstate");
var state = neon.COMPONENTSTATE_DISABLED;
if(operatingState != neon.OPERATINGSTATE_NEW && operatingState != neon.OPERATINGSTATE_EDIT)
{
var selection = vars.get("$sys.selectionRows")[0];
if(selection && selection.sortingHelper != "")
{
var sortingObj = JSON.parse(selection.sortingHelper);
var maxSorting = sortingObj.maxSortingValue;
var ownSortingValue = sortingObj.ownSortingValue;
if(eMath.addInt(ownSortingValue, 1) <= maxSorting)
{
state = neon.COMPONENTSTATE_EDITABLE;
}
}
}
result.string(state);
\ No newline at end of file
import("system.neon");
import("TopicTree_lib");
import("system.vars");
var selection = vars.get("$sys.selectionRows")[0];
var topicTreeid = selection["#UID"];
var sortingHelper = JSON.parse(selection.sortingHelper);
var currentLayer = TopicTreeUtils.getLayer(selection.SORTING_LAYER_1, selection.SORTING_LAYER_2, selection.SORTING_LAYER_3, selection.SORTING_LAYER_4, selection.SORTING_LAYER_5, selection.SORTING_LAYER_6);
var assignedTo = selection.ASSIGNEDTO == "" ? $TopicTreeConstants.TOPTOPIC() : selection.ASSIGNEDTO;
TopicTreeUtils.movePosition(topicTreeid, $TopicTreeMoveDirections.DOWN(), sortingHelper.maxSortingValue, assignedTo, sortingHelper.ownSortingValue, currentLayer);
neon.refreshAll();
\ No newline at end of file
import("system.result");
import("system.eMath");
import("system.neon");
import("system.vars");
var operatingState = vars.get("$sys.operatingstate");
var state = neon.COMPONENTSTATE_DISABLED;
if(operatingState != neon.OPERATINGSTATE_NEW && operatingState != neon.OPERATINGSTATE_EDIT)
{
var selection = vars.get("$sys.selectionRows")[0];
if(selection && selection.sortingHelper != "")
{
var sortingObj = JSON.parse(selection.sortingHelper);
var maxSorting = sortingObj.maxSortingValue;
var ownSortingValue = sortingObj.ownSortingValue;
if(eMath.addInt(ownSortingValue, 1) <= maxSorting)
{
state = neon.COMPONENTSTATE_EDITABLE;
}
}
}
result.string(state);
\ No newline at end of file
import("system.neon");
import("TopicTree_lib");
import("system.vars");
var selection = vars.get("$sys.selectionRows")[0];
var topicTreeid = selection["#UID"];
var sortingHelper = JSON.parse(selection.sortingHelper);
var currentLayer = TopicTreeUtils.getLayer(selection.SORTING_LAYER_1, selection.SORTING_LAYER_2, selection.SORTING_LAYER_3, selection.SORTING_LAYER_4, selection.SORTING_LAYER_5, selection.SORTING_LAYER_6);
var assignedTo = selection.ASSIGNEDTO == "" ? $TopicTreeConstants.TOPTOPIC() : selection.ASSIGNEDTO;
TopicTreeUtils.movePosition(topicTreeid, $TopicTreeMoveDirections.UP(), sortingHelper.maxSortingValue, assignedTo, sortingHelper.ownSortingValue, currentLayer);
neon.refreshAll();
\ No newline at end of file
import("system.result");
import("system.eMath");
import("system.neon");
import("system.vars");
var operatingState = vars.get("$sys.operatingstate");
var state = neon.COMPONENTSTATE_DISABLED;
if(operatingState != neon.OPERATINGSTATE_NEW && operatingState != neon.OPERATINGSTATE_EDIT)
{
var selection = vars.get("$sys.selectionRows")[0];
if(selection && selection.sortingHelper != "")
{
var sortingObj = JSON.parse(selection.sortingHelper);
var ownSortingValue = sortingObj.ownSortingValue;
if(ownSortingValue != 1)
{
state = neon.COMPONENTSTATE_EDITABLE;
}
}
}
result.string(state);
\ No newline at end of file
import("TopicTree_lib");
TopicTreeUtils.paste();
\ No newline at end of file
import("system.eMath");
import("TopicTree_lib");
import("system.db");
import("system.neon");
import("system.result");
import("system.vars");
var selection = vars.get("$sys.selectionRows")[0];
var state = neon.COMPONENTSTATE_DISABLED;
if(selection && vars.exists("$context.Copied"))
{
var layer = TopicTreeUtils.returnNumberOfLayerName(JSON.parse(selection["sortingHelper"])["sortingLayer"]);
var amountOfLayers = JSON.parse(vars.get("$context.Copied"))["amountOfLayers"];
if(eMath.addInt(amountOfLayers, layer) <= TopicTreeUtils.getArrayLayers().length)//this tree doesn't work endlessly, so we can*t allow the user to create more layers than we allow
{
if(vars.get("$context.Cut"))
{
var copiedTopicTreeId = JSON.parse(vars.get("$context.Copied"))["dataset"];
var topicTreeIds = TopicTreeUtils.getSubTopicIds(copiedTopicTreeId);
topicTreeIds.push(copiedTopicTreeId);
var pasteTopicTreeId = selection["#UID"];
if(!topicTreeIds.includes(pasteTopicTreeId))
{
state = neon.COMPONENTSTATE_EDITABLE;
}
}
else
{
state = neon.COMPONENTSTATE_EDITABLE;
}
}
}
result.string(state);
\ No newline at end of file
import("TopicTree_lib");
TopicTreeUtils.paste(true);
\ No newline at end of file
= OnlyActive_param
If set to true you only get to see the active ones.
-> make sure that every subtopic has the same status as the above one and vice versa.
Get's used by Topic Tree Relation.
\ No newline at end of file
= OnlyFiveLayers_param
Used to limit how many layers of the tree you get to see. (if set to true you only see the first 5 layers)
In the assignedTo lookup we don't want to return the whole tree but instead only show 5 layers (to make it impossible to create a seventh layer using the assignee).
import("system.result");
result.string(true);
\ No newline at end of file
import("system.result");
result.string(true);
\ No newline at end of file
import("system.result");
import("system.neon");
import("system.vars");
if(!vars.get("$this.value") && vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW)
{
result.string(vars.get("$field.UID"));
}
\ No newline at end of file
import("system.result");
import("system.neon");
import("system.vars");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT)
{
result.string(vars.get("$sys.user"));
}
\ No newline at end of file
import("system.neon");
import("system.result");
import("system.vars");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
{
result.string(vars.get("$sys.user"));
}
\ No newline at end of file
import("system.result");
import("system.vars");
import("system.neon");
var state = neon.COMPONENTSTATE_INVISIBLE;
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT)
{
state = neon.COMPONENTSTATE_EDITABLE;
}
result.string(state);
\ No newline at end of file
import("system.result");
result.string("Änderung wirken sich auf die bestehenden Themeneinträge der Aktivität aus, in der dieses Thema bereits verwendet wird.");
\ 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