Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
basic
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xrm
basic
Commits
7d62fb8f
Commit
7d62fb8f
authored
6 years ago
by
Johannes Hörmann
Browse files
Options
Downloads
Patches
Plain Diff
Object relation fixes & documentation
parent
e955b198
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
entity/Object_entity/recordcontainers/jdito/contentProcess.js
+8
-7
8 additions, 7 deletions
...ty/Object_entity/recordcontainers/jdito/contentProcess.js
process/Context_lib/process.js
+43
-0
43 additions, 0 deletions
process/Context_lib/process.js
with
51 additions
and
7 deletions
entity/Object_entity/recordcontainers/jdito/contentProcess.js
+
8
−
7
View file @
7d62fb8f
import
(
"
system.db
"
);
import
(
"
system.vars
"
);
import
(
"
system.logging
"
);
import
(
"
system.result
"
);
import
(
"
Context_lib
"
);
logging
.
log
(
vars
.
get
(
"
$param.ObjectType_param
"
).
toSource
())
if
(
vars
.
exists
(
"
$param.ObjectType_param
"
)
&&
vars
.
get
(
"
$param.ObjectType_param
"
))
{
if
(
vars
.
exists
(
"
$param.ObjectRowId_param
"
)
&&
vars
.
get
(
"
$param.ObjectRowId_param
"
))
{
result
.
object
(
db
.
table
(
vars
.
get
(
"
$param.ObjectRowId_param
"
),
ContextUtils
.
getContextDataSql
(
vars
.
get
(
"
$param.ObjectType_param
"
),
vars
.
get
(
"
$param.ObjectRowId_param
"
))));
}
result
.
object
(
db
.
table
(
ContextUtils
.
getContextDataSql
(
vars
.
get
(
"
$param.ObjectType_param
"
))))
}
else
{
result
.
object
([]);
else
{
result
.
object
(
db
.
table
(
ContextUtils
.
getContextDataSql
(
vars
.
get
(
"
$param.ObjectType_param
"
))))
}
}
else
{
result
.
object
([]);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
process/Context_lib/process.js
+
43
−
0
View file @
7d62fb8f
...
...
@@ -36,6 +36,49 @@ ContextUtils.getContextName = function(pContextId)
return
pContextId
;
}
ContextUtils
.
getContexts
=
function
(
pFilter
)
{
if
(
pFilter
==
undefined
)
pFilter
=
false
;
var
contexts
=
project
.
getDataModels
(
project
.
DATAMODEL_KIND_CONTEXT
);
if
(
pFilter
)
{
contexts
=
contexts
.
filter
(
function
(
pContext
)
{
// filter only contexts which have defined mappings in Context_lib
return
ContextUtils
.
_getSelectMap
()[
pContext
[
0
]]
!=
undefined
;
});
}
return
contexts
.
map
(
ContextUtils
.
_contextDataMapping
).
sort
(
function
(
pContext1
,
pContext2
)
{
// sort after ContextTitle
if
(
pContext1
[
2
]
>
pContext2
[
2
])
return
1
;
if
(
pContext1
[
2
]
<
pContext2
[
2
])
return
-
1
;
return
0
;
});
}
ContextUtils
.
getContext
=
function
(
pContextId
)
{
return
ContextUtils
.
_contextDataMapping
(
project
.
getDataModel
(
project
.
DATAMODEL_KIND_CONTEXT
,
pContextId
));
}
ContextUtils
.
_contextDataMapping
=
function
(
pContext
)
{
var
contextName
=
ContextUtils
.
getContextName
(
pContext
[
0
]);
return
[
pContext
[
0
],
contextName
,
(
pContext
[
1
]
?
pContext
[
1
]
:
contextName
)];
}
/**
* TODO: !!!temporary function until you can get fields from another Entity!!!
*/
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
Next
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment