Skip to content
Snippets Groups Projects
Commit 5b52efd7 authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

360Grad fixes

parent fba2a914
No related branches found
No related tags found
No related merge requests found
......@@ -3,13 +3,21 @@ import("system.neon");
import("system.result");
var contextList = JSON.parse(vars.getString("$param.ObjectType_param"));
var found = false;
contextList.forEach(function (context)
if (contextList)
{
if(context == "Campaign")
found = true;
});
if(found)
result.string(neon.COMPONENTSTATE_AUTO);
var found = false;
contextList.forEach(function (context)
{
if(context == "Campaign")
found = true;
});
if(found)
result.string(neon.COMPONENTSTATE_AUTO);
else
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
else
result.string(neon.COMPONENTSTATE_INVISIBLE);
\ No newline at end of file
{
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
\ No newline at end of file
......@@ -3,13 +3,20 @@ import("system.vars");
import("system.neon");
var contextList = JSON.parse(vars.getString("$param.ObjectType_param"));
var found = false;
contextList.forEach(function (context)
if (contextList)
{
if(context == "Contract")
found = true;
});
if(found)
result.string(neon.COMPONENTSTATE_AUTO);
var found = false;
contextList.forEach(function (context)
{
if(context == "Contract")
found = true;
});
if(found)
result.string(neon.COMPONENTSTATE_AUTO);
else
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
else
result.string(neon.COMPONENTSTATE_INVISIBLE);
\ No newline at end of file
{
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
\ No newline at end of file
......@@ -3,13 +3,20 @@ import("system.neon");
import("system.result");
var contextList = JSON.parse(vars.getString("$param.ObjectType_param"));
var found = false;
contextList.forEach(function (context)
if (contextList)
{
if(context == "Offer")
found = true;
});
if(found)
result.string(neon.COMPONENTSTATE_AUTO);
var found = false;
contextList.forEach(function (context)
{
if(context == "Offer")
found = true;
});
if(found)
result.string(neon.COMPONENTSTATE_AUTO);
else
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
else
result.string(neon.COMPONENTSTATE_INVISIBLE);
\ No newline at end of file
{
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
\ No newline at end of file
......@@ -3,13 +3,21 @@ import("system.neon");
import("system.result");
var contextList = JSON.parse(vars.getString("$param.ObjectType_param"));
var found = false;
contextList.forEach(function (context)
if (contextList)
{
if(context == "Salesproject")
found = true;
});
if(found)
result.string(neon.COMPONENTSTATE_AUTO);
var found = false;
contextList.forEach(function (context)
{
if(context == "Salesproject")
found = true;
});
if(found)
result.string(neon.COMPONENTSTATE_AUTO);
else
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
else
result.string(neon.COMPONENTSTATE_INVISIBLE);
\ No newline at end of file
{
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
import("system.logging");
import("system.util");
import("system.db");
import("system.vars");
......@@ -19,7 +20,7 @@ if (vars.exists("$param.ObjectType_param") && vars.get("$param.ObjectType_param"
filter.childs.forEach(function(child)
{
if(child.name === "ACTIVE")
active = JSON.parse(child.key);
active = child.key;
});
}
}
......
......@@ -2,6 +2,7 @@
<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.0">
<name>ClassificationAdmin</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<icon>VAADIN:ABACUS</icon>
<mainview>ClassificationAdminMain_view</mainview>
<filterview>ClassificationAdminFilter_view</filterview>
<entity>ClassificationAdmin_entity</entity>
......
......@@ -451,9 +451,9 @@ ContextUtils.getContextDataSql = function(pContextId, pContactId, pWithDate, pAc
activeStates.forEach(function (state)
{
if(pActive)
condSub.orPrepare(ownContextSelector.tableName + "." + ownContextSelector.stateField, state)
condSub.orPrepare(ownContextSelector.getFullField(ownContextSelector.stateField), state)
else
condSub.andPrepare(ownContextSelector.tableName + "." + ownContextSelector.stateField, state, "# != ?")
condSub.andPrepare(ownContextSelector.getFullField(ownContextSelector.stateField), state, "# != ?")
});
cond.andSqlCondition(condSub);
}
......@@ -473,10 +473,10 @@ ContextUtils.getContextDataSql = function(pContextId, pContactId, pWithDate, pAc
var dateColumn = "";
if (pWithDate === true)
dateColumn = ", " + (ownContextSelector.creationDateField || "''");
dateColumn = ", " + (ownContextSelector.getFullField(ownContextSelector.creationDateField) || "''");
var stateColumn = "";
if (pWithState === true)
stateColumn = ", " + (ownContextSelector.stateField || "''");
stateColumn = ", " + (ownContextSelector.getFullField(ownContextSelector.stateField) || "''");
if (ownContextSelector.condition)
cond.andSqlCondition(ownContextSelector.condition);
var res = cond.buildSql("select " + ownContextSelector.getFullIdField() + ", " + ownContextSelector.titleExpression + dateColumn + stateColumn
......
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