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
f3ff539b
Commit
f3ff539b
authored
Jan 23, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hashtags as multi text input + fixResidue on reg like profile
parent
45882952
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
74 additions
and
56 deletions
+74
-56
comex_page_profile_controllers.js
static/js/comex_page_profile_controllers.js
+1
-0
comex_page_reg_controllers.js
static/js/comex_page_reg_controllers.js
+5
-1
comex_user_shared.js
static/js/comex_user_shared.js
+54
-43
profile.html
templates/profile.html
+4
-3
registration_full_form.html
templates/registration_full_form.html
+5
-5
registration_short_form.html
templates/registration_short_form.html
+5
-4
No files found.
static/js/comex_page_profile_controllers.js
View file @
f3ff539b
...
@@ -46,6 +46,7 @@ cmxClt.uform.initialize("comex_profile_form", completionAsYouGo)
...
@@ -46,6 +46,7 @@ cmxClt.uform.initialize("comex_profile_form", completionAsYouGo)
// activate multiTextinput
// activate multiTextinput
cmxClt
.
uform
.
multiTextinput
(
'keywords'
,
uinfo
.
keywords
)
cmxClt
.
uform
.
multiTextinput
(
'keywords'
,
uinfo
.
keywords
)
cmxClt
.
uform
.
multiTextinput
(
'hashtags'
,
uinfo
.
hashtags
,
"#23A"
)
var
deleteUser
=
document
.
getElementById
(
'delete_user'
)
var
deleteUser
=
document
.
getElementById
(
'delete_user'
)
deleteUser
.
checked
=
false
deleteUser
.
checked
=
false
...
...
static/js/comex_page_reg_controllers.js
View file @
f3ff539b
...
@@ -30,6 +30,7 @@ var validateWithMessage = false
...
@@ -30,6 +30,7 @@ var validateWithMessage = false
// activate multiTextinput
// activate multiTextinput
cmxClt
.
uform
.
multiTextinput
(
'keywords'
)
cmxClt
.
uform
.
multiTextinput
(
'keywords'
)
cmxClt
.
uform
.
multiTextinput
(
'hashtags'
,
[],
"#23A"
)
var
shortRegVersion
=
true
var
shortRegVersion
=
true
...
@@ -44,7 +45,10 @@ function testAsYouGo() {
...
@@ -44,7 +45,10 @@ function testAsYouGo() {
cmxClt
.
uauth
.
earlyValidate
()
cmxClt
.
uauth
.
earlyValidate
()
if
(
validateWithMessage
)
{
if
(
validateWithMessage
)
{
cmxClt
.
uform
.
simpleValidateAndMessage
({
'ignore'
:
ignoredFields
})
cmxClt
.
uform
.
simpleValidateAndMessage
({
'ignore'
:
ignoredFields
,
'fixResidue'
:
true
})
// NB fixResidue is useful when user has a problem
// on submit then clicks "back" and ends up with
// hashtags in brackets like "['#a','#b']"
}
}
cmxClt
.
uform
.
checkJobDateStatus
()
cmxClt
.
uform
.
checkJobDateStatus
()
...
...
static/js/comex_user_shared.js
View file @
f3ff539b
...
@@ -38,6 +38,8 @@ var cmxClt = (function() {
...
@@ -38,6 +38,8 @@ var cmxClt = (function() {
cC
.
COLS
=
[
cC
.
COLS
=
[
[
"keywords"
,
true
,
"plsfill"
,
"at"
,
"map_infos"
],
[
"keywords"
,
true
,
"plsfill"
,
"at"
,
"map_infos"
],
// ==> *keywords* table
// ==> *keywords* table
[
"hashtags"
,
false
,
"plsfill"
,
"at"
,
"map_infos"
],
// ==> *hashtags* table
[
"doors_uid"
,
true
,
"auto"
,
"t"
,
null
],
[
"doors_uid"
,
true
,
"auto"
,
"t"
,
null
],
[
"last_modified_date"
,
true
,
"auto"
,
"d"
,
null
],
[
"last_modified_date"
,
true
,
"auto"
,
"d"
,
null
],
...
@@ -50,7 +52,6 @@ var cmxClt = (function() {
...
@@ -50,7 +52,6 @@ var cmxClt = (function() {
[
"initials"
,
true
,
"pref"
,
"t"
,
null
],
[
"initials"
,
true
,
"pref"
,
"t"
,
null
],
[
"position"
,
true
,
"plsfill"
,
"t"
,
"map_infos"
],
[
"position"
,
true
,
"plsfill"
,
"t"
,
"map_infos"
],
[
"interests_text"
,
false
,
"pref"
,
"t"
,
"other_infos"
],
[
"interests_text"
,
false
,
"pref"
,
"t"
,
"other_infos"
],
[
"hashtags"
,
false
,
"plsfill"
,
"at"
,
"map_infos"
],
[
"gender"
,
false
,
"plsfill"
,
"m"
,
"other_infos"
],
[
"gender"
,
false
,
"plsfill"
,
"m"
,
"other_infos"
],
[
"job_looking_date"
,
false
,
"pref"
,
"d"
,
"map_infos"
],
[
"job_looking_date"
,
false
,
"pref"
,
"d"
,
"map_infos"
],
[
"home_url"
,
false
,
"plsfill"
,
"t"
,
"other_infos"
],
[
"home_url"
,
false
,
"plsfill"
,
"t"
,
"other_infos"
],
...
@@ -165,7 +166,7 @@ var cmxClt = (function() {
...
@@ -165,7 +166,7 @@ var cmxClt = (function() {
// => validate words become removable "pills"
// => validate words become removable "pills"
// => result is concatenated texts in hidden input.#fName
// => result is concatenated texts in hidden input.#fName
// TODO finalize and add to initialize
// TODO finalize and add to initialize
cC
.
uform
.
multiTextinput
=
function
(
fName
,
perhapsPreviousValues
)
{
cC
.
uform
.
multiTextinput
=
function
(
fName
,
perhapsPreviousValues
,
perhapsColor
)
{
// HTML elt to insert tag boxes around
// HTML elt to insert tag boxes around
var
refElt
=
null
var
refElt
=
null
...
@@ -192,10 +193,17 @@ var cmxClt = (function() {
...
@@ -192,10 +193,17 @@ var cmxClt = (function() {
// debug
// debug
// console.log ('poptagbox from event' + event.type)
// console.log ('poptagbox from event' + event.type)
var
newValue
=
normalInput
.
value
var
asIsValue
=
normalInput
.
value
if
(
asIsValue
!=
''
)
{
// maybe several values from cache (comma is reserved as separator)
var
subValues
=
asIsValue
.
split
(
/,/
)
for
(
var
i
in
subValues
)
{
var
newValue
=
subValues
[
i
]
if
(
newValue
!=
''
)
{
// "let" so that it's unique for each i
var
newBox
=
document
.
createElement
(
'div'
)
// (this unique pointer is useful in newBoxClose)
let
newBox
=
document
.
createElement
(
'div'
)
// move the value
// move the value
normalInput
.
value
=
''
normalInput
.
value
=
''
...
@@ -204,7 +212,6 @@ var cmxClt = (function() {
...
@@ -204,7 +212,6 @@ var cmxClt = (function() {
// and save it
// and save it
var
nSaved
=
cC
.
uform
.
mtiStock
[
fName
].
push
(
newValue
)
var
nSaved
=
cC
.
uform
.
mtiStock
[
fName
].
push
(
newValue
)
// create a close elt for the box
// create a close elt for the box
var
newBoxClose
=
document
.
createElement
(
'div'
)
var
newBoxClose
=
document
.
createElement
(
'div'
)
newBoxClose
.
classList
.
add
(
'box-highlight-close'
)
newBoxClose
.
classList
.
add
(
'box-highlight-close'
)
...
@@ -230,7 +237,7 @@ var cmxClt = (function() {
...
@@ -230,7 +237,7 @@ var cmxClt = (function() {
// remove box
// remove box
setTimeout
(
function
(){
newBox
.
style
.
display
=
'none'
},
300
)
setTimeout
(
function
(){
newBox
.
style
.
display
=
'none'
},
300
)
console
.
lo
g
(
"droptagbox"
,
cC
.
uform
.
mtiStock
[
fName
].
length
,
cC
.
uform
.
mtiStock
[
fName
])
// console.debu
g("droptagbox", cC.uform.mtiStock[fName].length, cC.uform.mtiStock[fName])
}
}
newBoxClose
.
onclick
=
closeBox
newBoxClose
.
onclick
=
closeBox
...
@@ -239,9 +246,13 @@ var cmxClt = (function() {
...
@@ -239,9 +246,13 @@ var cmxClt = (function() {
// show the box
// show the box
newBox
.
classList
.
add
(
"box-highlight"
)
newBox
.
classList
.
add
(
"box-highlight"
)
if
(
perhapsColor
)
{
newBox
.
style
.
backgroundColor
=
perhapsColor
}
cC
.
insertAfter
(
refElt
,
newBox
)
cC
.
insertAfter
(
refElt
,
newBox
)
console
.
log
(
"poptagbox"
,
cC
.
uform
.
mtiStock
[
fName
].
length
,
cC
.
uform
.
mtiStock
[
fName
])
// console.debug("poptagbox", cC.uform.mtiStock[fName].length, cC.uform.mtiStock[fName])
}
}
}
}
}
...
...
templates/profile.html
View file @
f3ff539b
...
@@ -317,13 +317,14 @@
...
@@ -317,13 +317,14 @@
</div>
</div>
<div
class=
"question"
>
<div
class=
"question"
>
<div
class=
"input-group"
>
<p
class=
"legend"
>
Hashtags for community interest groups (seminars, mailing lists, events...)
</p>
<div
class=
"input-group tagbox-container"
>
<label
for=
"hashtags"
class=
"smlabel input-group-addon"
>
Interest groups
</label>
<label
for=
"hashtags"
class=
"smlabel input-group-addon"
>
Interest groups
</label>
<input
id=
"hashtags"
name=
"hashtags"
maxlength=
"350"
<input
id=
"hashtags"
name=
"hashtags"
maxlength=
"350"
type=
"text"
class=
"form-control"
placeholder=
"eg #dataviz, #networks"
type=
"text"
class=
"form-control"
placeholder=
"eg #dataviz, #networks
, #rochebrune2018
"
value=
"{{ current_user.info.hashtags }}"
>
value=
"{{ current_user.info.hashtags }}"
>
</div>
</div>
<p
class=
"legend"
>
Interest groups (for seminars, mailing lists, events) aka "community hashtags"
</p>
<p
class=
"legend"
>
(press TAB or ENTER after each)
</p>
</div>
</div>
</div>
<!-- /panel-body -->
</div>
<!-- /panel-body -->
...
...
templates/registration_full_form.html
View file @
f3ff539b
...
@@ -257,7 +257,7 @@
...
@@ -257,7 +257,7 @@
</p>
</p>
<div
class=
"question"
>
<div
class=
"question"
>
<div
class=
"input-group"
>
<div
class=
"input-group
tagbox-container
"
>
<label
for=
"keywords"
class=
"smlabel input-group-addon"
>
* Key subjects
</label>
<label
for=
"keywords"
class=
"smlabel input-group-addon"
>
* Key subjects
</label>
<input
id=
"keywords"
name=
"keywords"
maxlength=
"350"
<input
id=
"keywords"
name=
"keywords"
maxlength=
"350"
type=
"text"
class=
"form-control autocomp"
placeholder=
"keywords"
type=
"text"
class=
"form-control autocomp"
placeholder=
"keywords"
...
@@ -320,15 +320,15 @@
...
@@ -320,15 +320,15 @@
</div>
</div>
<div
class=
"question"
>
<div
class=
"question"
>
<div
class=
"input-group"
>
<p
class=
"legend"
>
Hashtags for community interest groups (seminars, mailing lists, events...)
</p>
<div
class=
"input-group tagbox-container"
>
<label
for=
"hashtags"
class=
"smlabel input-group-addon"
>
Interest groups
</label>
<label
for=
"hashtags"
class=
"smlabel input-group-addon"
>
Interest groups
</label>
<input
id=
"hashtags"
name=
"hashtags"
maxlength=
"350"
<input
id=
"hashtags"
name=
"hashtags"
maxlength=
"350"
type=
"text"
class=
"form-control"
placeholder=
"eg #dataviz, #networks"
>
type=
"text"
class=
"form-control"
placeholder=
"eg #dataviz, #networks
, #rochebrune2018
"
>
</div>
</div>
<p
class=
"legend"
>
Interest groups (for seminars, mailing lists, events) aka "community hashtags"
</p>
<p
class=
"legend"
>
(press TAB or ENTER after each)
</p>
</div>
</div>
</div>
<!-- /panel-body -->
</div>
<!-- /panel-body -->
<div
class=
"panel-footer ccsection-footer"
>
</div>
<div
class=
"panel-footer ccsection-footer"
>
</div>
...
...
templates/registration_short_form.html
View file @
f3ff539b
...
@@ -256,7 +256,7 @@
...
@@ -256,7 +256,7 @@
<div
class=
"question"
>
<div
class=
"question"
>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<label
for=
"keywords"
class=
"smlabel input-group-addon"
>
* Key subjects
</label>
<label
for=
"keywords"
class=
"smlabel input-group-addon
tagbox-container
"
>
* Key subjects
</label>
<input
id=
"keywords"
name=
"keywords"
maxlength=
"350"
<input
id=
"keywords"
name=
"keywords"
maxlength=
"350"
type=
"text"
class=
"form-control autocomp"
placeholder=
"keywords"
type=
"text"
class=
"form-control autocomp"
placeholder=
"keywords"
placeholder=
"keywords"
>
placeholder=
"keywords"
>
...
@@ -318,12 +318,13 @@
...
@@ -318,12 +318,13 @@
</div>
</div>
<div
class=
"question"
>
<div
class=
"question"
>
<div
class=
"input-group"
>
<p
class=
"legend"
>
Hashtags for community interest groups (seminars, mailing lists, events...)
</p>
<div
class=
"input-group tagbox-container"
>
<label
for=
"hashtags"
class=
"smlabel input-group-addon"
>
Interest groups
</label>
<label
for=
"hashtags"
class=
"smlabel input-group-addon"
>
Interest groups
</label>
<input
id=
"hashtags"
name=
"hashtags"
maxlength=
"350"
<input
id=
"hashtags"
name=
"hashtags"
maxlength=
"350"
type=
"text"
class=
"form-control"
placeholder=
"eg #dataviz, #networks"
>
type=
"text"
class=
"form-control"
placeholder=
"eg #dataviz, #networks
, #rochebrune2018
"
>
</div>
</div>
<p
class=
"legend"
>
Interest groups (for seminars, mailing lists, events) aka "community hashtags"
</p>
<p
class=
"legend"
>
(press TAB or ENTER after each)
</p>
</div>
</div>
...
...
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