Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clinicaltrials
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
david Chavalarias
clinicaltrials
Commits
718c9b2b
Commit
718c9b2b
authored
Sep 18, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include user legend in metric choices + comex default settings adapted for few job-related keywords
parent
4b40520a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
extras_explorerjs.js
twmain/extras_explorerjs.js
+22
-4
settings_explorerjs.comex.js
twpresets/settings_explorerjs.comex.js
+1
-1
No files found.
twmain/extras_explorerjs.js
View file @
718c9b2b
...
...
@@ -1000,9 +1000,10 @@ function activateModules() {
// cf. doc/developer_manual.md autodiagnose remark)
function
fillAttrsInForm
(
menuId
,
optionalAttTypeConstraint
)
{
var
actypes
=
getActivetypesNames
()
let
elChooser
=
document
.
getElementById
(
menuId
)
// 1- remove any previous
fromFacets
options from possible previous graphs
let
autoOptions
=
document
.
getElementById
(
menuId
).
querySelectorAll
(
'option
[data-opttype=fromFacets]
'
)
// 1- remove any previous options from possible previous graphs
let
autoOptions
=
document
.
getElementById
(
menuId
).
querySelectorAll
(
'option'
)
for
(
var
i
=
0
;
i
<=
autoOptions
.
length
-
1
;
i
++
)
{
elChooser
.
removeChild
(
autoOptions
[
i
])
}
...
...
@@ -1021,7 +1022,6 @@ function fillAttrsInForm(menuId, optionalAttTypeConstraint) {
}
// 3- write to DOM
let
elChooser
=
document
.
getElementById
(
menuId
)
for
(
var
att
in
uniqOptions
)
{
// <option> creation
// -------------------
...
...
@@ -1029,6 +1029,12 @@ function fillAttrsInForm(menuId, optionalAttTypeConstraint) {
let
opt
=
document
.
createElement
(
'option'
)
opt
.
value
=
att
opt
.
innerText
=
att
if
(
att
in
TW
.
facetOptions
&&
TW
.
facetOptions
[
att
].
legend
)
{
opt
.
innerText
=
TW
.
facetOptions
[
att
].
legend
+
" ("
+
att
+
")"
}
else
{
opt
.
innerText
=
"("
+
att
+
")"
}
if
(
att
in
TW
.
sigmaAttributes
)
{
opt
.
dataset
.
opttype
=
"auto"
}
...
...
@@ -1102,6 +1108,12 @@ function showAttrConf() {
function
newAttrConfAndColor
()
{
let
attrTitle
=
document
.
getElementById
(
'choose-attr'
).
value
let
legendChanged
=
(
(
!
"legend"
in
TW
.
facetOptions
[
attrTitle
]
&&
document
.
getElementById
(
'attr-translation'
).
value
)
||
(
TW
.
facetOptions
[
attrTitle
].
legend
!=
document
.
getElementById
(
'attr-translation'
).
value
)
)
// read values from GUI
TW
.
facetOptions
[
attrTitle
]
=
{
'col'
:
document
.
getElementById
(
'attr-col'
).
value
,
...
...
@@ -1111,7 +1123,13 @@ function newAttrConfAndColor() {
// only for clusterings (ie currently <=> (col == "cluster"))
'titlingMetric'
:
document
.
getElementById
(
'attr-titling-metric'
).
value
,
'titlingNTerms'
:
document
.
getElementById
(
'attr-titling-n'
).
value
||
1
'titlingNTerms'
:
document
.
getElementById
(
'attr-titling-n'
).
value
||
2
}
// case where we need to update dialog displays because of new legend
if
(
legendChanged
)
{
fillAttrsInForm
(
'choose-attr'
)
fillAttrsInForm
(
'attr-titling-metric'
,
'num'
)
}
// dynamic attribute case
...
...
twpresets/settings_explorerjs.comex.js
View file @
718c9b2b
...
...
@@ -94,7 +94,7 @@ TW.conf = (function(TW){
'nbjobs'
:{
'col'
:
"heatmap"
,
'binmode'
:
'samerange'
,
'n'
:
5
,
'n'
:
2
,
'legend'
:
'Number of related job ads'
},
'total_occurrences'
:{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment