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
c3d79cbf
Commit
c3d79cbf
authored
Feb 02, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
forgot new separate controller...
parent
87912a69
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
79 additions
and
0 deletions
+79
-0
comex_page_claim_profile_controllers.js
static/js/comex_page_claim_profile_controllers.js
+79
-0
No files found.
static/js/comex_page_claim_profile_controllers.js
0 → 100644
View file @
c3d79cbf
/**we have all
* @fileoverview
* Profile 1/overview and 2/completing
* @todo
* - package.json
*
* @version 1
* @copyright ISCPIF-CNRS 2016
* @author romain.loth@iscpif.fr
*
* @requires comex_user_shared
*
* NB The uinfo variable should be set to template's user.json_info value.
*
* THIS IS A SIMPLE COPY OF comex_page_profile_controllers
* with the old input re-fills
* but without the new input validations
*/
// first menu setup from DB values
function
selectSavedMenus
(
uinfo
)
{
for
(
var
i
in
cmxClt
.
COLS
)
{
var
colType
=
cmxClt
.
COLS
[
i
][
3
]
// m <=> menu
if
(
colType
==
'm'
)
{
var
colName
=
cmxClt
.
COLS
[
i
][
0
]
var
chosenV
=
uinfo
[
colName
]
var
selectElt
=
document
.
getElementById
(
colName
)
if
(
selectElt
)
{
var
myOption
=
selectElt
.
querySelector
(
`option[value="
${
chosenV
}
"]`
)
if
(
myOption
)
{
selectElt
.
selectedIndex
=
myOption
.
index
}
else
{
console
.
warn
(
`selectSavedMenus: couldn't find option:
${
chosenV
}
for element:
${
colName
}
`
)
}
}
else
{
console
.
warn
(
"selectSavedMenus: couldn't find element: "
+
colName
)
}
}
}
}
// initialize form controllers
var
theUForm
=
cmxClt
.
uform
.
Form
(
// id
"comex_claim_profile_form"
,
// onkeyup function
null
,
// other params
{
'multiTextinputs'
:
[{
'id'
:
'keywords'
,
'prevals'
:
uinfo
.
keywords
},
{
'id'
:
'hashtags'
,
'prevals'
:
uinfo
.
hashtags
,
'color'
:
"#23A"
}]
}
)
var
deleteUser
=
document
.
getElementById
(
'delete_user'
)
deleteUser
.
checked
=
false
selectSavedMenus
(
uinfo
)
// memory
var
formValid
=
false
// 2 exposed vars for inline js controls
var
teamCityDivStyle
=
document
.
getElementById
(
'team_city_div'
).
style
var
otherInstDivStyle
=
document
.
getElementById
(
'other_org_div'
).
style
// open middlename if there is one
if
(
uinfo
.
middle_name
!=
""
&&
uinfo
.
middle_name
!=
"None"
)
{
cmxClt
.
uform
.
displayMidName
()
}
console
.
log
(
"profile controllers load OK"
)
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