Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
a14c48b3
Commit
a14c48b3
authored
Mar 21, 2018
by
Mathieu Giraud
Committed by
Vidjil
Mar 21, 2018
Browse files
js/form_builder.js: bikeshedding
parent
fec5d02f
Changes
1
Show whitespace changes
Inline
Side-by-side
browser/js/form_builder.js
View file @
a14c48b3
...
@@ -6,7 +6,7 @@ function labelise(text) {
...
@@ -6,7 +6,7 @@ function labelise(text) {
var
split
=
text
.
split
(
'
_
'
);
var
split
=
text
.
split
(
'
_
'
);
var
result
=
""
;
var
result
=
""
;
for
(
var
i
=
0
;
i
<
split
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
split
.
length
;
i
++
)
{
split
[
i
]
=
capitalise
(
split
[
i
]);
split
[
i
]
=
split
[
i
]
;
//
capitalise(split[i]);
}
}
return
split
.
join
(
'
'
);
return
split
.
join
(
'
'
);
}
}
...
@@ -96,7 +96,7 @@ FormBuilder.prototype.build_div = function(type) {
...
@@ -96,7 +96,7 @@ FormBuilder.prototype.build_div = function(type) {
d
.
appendChild
(
c
);
d
.
appendChild
(
c
);
var
s
=
document
.
createElement
(
'
span
'
);
var
s
=
document
.
createElement
(
'
span
'
);
s
.
className
=
"
left form_label
"
s
.
className
=
"
left form_label
"
s
.
innerText
=
capitalise
(
type
)
+
"
"
+
(
this
.
index
+
1
);
s
.
innerText
=
capitalise
(
type
==
'
generic
'
?
'
set
'
:
type
)
+
"
"
+
(
this
.
index
+
1
);
d
.
appendChild
(
s
);
d
.
appendChild
(
s
);
return
d
;
return
d
;
}
}
...
@@ -147,7 +147,7 @@ SetFormBuilder.prototype = Object.create(FormBuilder.prototype);
...
@@ -147,7 +147,7 @@ SetFormBuilder.prototype = Object.create(FormBuilder.prototype);
SetFormBuilder
.
prototype
.
set_id
=
function
()
{
SetFormBuilder
.
prototype
.
set_id
=
function
()
{
var
id
=
'
id_label
'
;
var
id
=
'
id_label
'
;
return
this
.
build_field
(
id
,
id
,
capitalise
(
this
.
type
)
+
'
ID
'
);
return
this
.
build_field
(
id
,
id
,
this
.
type
+
'
ID
'
);
};
};
SetFormBuilder
.
prototype
.
build_date
=
function
(
id
,
name
,
label
)
{
SetFormBuilder
.
prototype
.
build_date
=
function
(
id
,
name
,
label
)
{
...
@@ -332,7 +332,7 @@ FileFormBuilder.prototype.build_set_div = function() {
...
@@ -332,7 +332,7 @@ FileFormBuilder.prototype.build_set_div = function() {
i2
.
dataset
.
needsTokeniser
=
true
;
i2
.
dataset
.
needsTokeniser
=
true
;
i2
.
dataset
.
groupIds
=
"
[
"
+
this
.
group_ids
+
"
]
"
;
i2
.
dataset
.
groupIds
=
"
[
"
+
this
.
group_ids
+
"
]
"
;
i2
.
dataset
.
keys
=
'
["generic", "patient", "run"]
'
;
i2
.
dataset
.
keys
=
'
["generic", "patient", "run"]
'
;
i2
.
placeholder
=
"
S
ets
"
;
i2
.
placeholder
=
"
specific s
ets
"
;
d
.
appendChild
(
i2
);
d
.
appendChild
(
i2
);
return
f
;
return
f
;
...
...
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