Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Benoit Barbot
GraphEditor
Commits
5e660610
Commit
5e660610
authored
Sep 30, 2021
by
Benoit Barbot
Browse files
add id
parent
d73325b8
Pipeline
#2235
passed with stage
in 34 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
editor/graphDrawing.ml
View file @
5e660610
...
...
@@ -365,7 +365,8 @@ module GraphEditor (G : GRAPH) = struct
[
txt
"Load file: "
;
(*input ~a:[a_id "filein"; a_input_type `File; a_onchange (change_file loadfile)] ();*)
text_input
~_
type
:
"file"
~
on_change
:
(
change_file
loadfile
)
""
;
text_input
~_
type
:
"file"
~
id
:
"filein"
~
on_change
:
(
change_file
loadfile
)
""
;
choice_input
~
init_value
:
(
Some
"Download"
)
~
on_change
:
(
fun
x
->
(
List
.
assoc
x
dl
)
()
)
(
List
.
map
fst
dl
);
...
...
editor/utilsWeb.ml
View file @
5e660610
...
...
@@ -112,12 +112,13 @@ let check_input ?(class_ = "") ?(on_change = fun _ -> true) value =
input
##.
className
:=
Js
.
string
class_
;
(
input
:>
t
)
let
text_input
?
(
class_
=
""
)
?
(
on_change
=
fun
_
->
true
)
?
(
_type
=
"text"
)
value
=
let
text_input
?
(
class_
=
""
)
?
(
id
=
""
)
?
(
on_change
=
fun
_
->
true
)
?
(
_type
=
"text"
)
value
=
(*let input2 = input ~a:[a_input_type `Text] () in
let input = Eliom_content.Html.To_dom.of_input input2 in*)
let
input
=
Dom_html
.(
createInput
~_
type
:
(
Js
.
string
_type
)
document
)
in
input
##.
value
:=
Js
.
string
value
;
input
##.
id
:=
Js
.
string
id
;
let
on_input
_
=
let
res
=
on_change
(
Js
.
to_string
input
##.
value
)
in
if
res
then
input
##.
style
##.
color
:=
Js
.
string
"green"
...
...
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