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
Why3
why3
Commits
6f810e4a
Commit
6f810e4a
authored
Dec 08, 2016
by
Kim Nguyen
Browse files
[trywhy3] Switch focus to the task list tab when the buffer is recompiled.
parent
273dfdc1
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/trywhy3/trywhy3.html
View file @
6f810e4a
...
...
@@ -97,11 +97,11 @@
<div
id=
"why3-resize-bar"
class=
"why3-widget"
></div>
<div
id=
"why3-tab-container"
class=
"why3-container"
>
<div
id=
"why3-tab-panel"
class=
"why3-tab-group"
>
<span
class=
"why3-tab-label why3-widget"
>
Task list
</span>
<span
id=
"why3-task-list-tab"
class=
"why3-tab-label why3-widget"
>
Task list
</span>
<div
class=
"why3-widget why3-tab"
>
<div
id=
"why3-task-list"
class=
"why3-widget"
></div>
</div>
<span
class=
"why3-tab-label why3-widget why3-inactive"
>
Task view
</span>
<span
id=
"why3-task-view-tab"
class=
"why3-tab-label why3-widget why3-inactive"
>
Task view
</span>
<div
class=
"why3-widget why3-tab"
><div
id=
"why3-task-viewer"
></div></div>
</div>
</div>
...
...
src/trywhy3/trywhy3.ml
View file @
6f810e4a
...
...
@@ -275,19 +275,23 @@ module Tabs =
List
.
iter
(
fun
tab_group
->
let
labels
=
select
tab_group
".why3-tab-label"
in
List
.
iter
(
List
.
iter
(
fun
tab
->
tab
##
onclick
<-
Dom
.
handler
(
fun
_ev
->
List
.
iter
(
fun
t
->
ignore
(
t
##
classList
##
toggle
(
Js
.
string
"why3-inactive"
)))
labels
;
Js
.
_false
))
)
labels
)
tab_groups
(
fun
_ev
->
let
()
=
if
Js
.
to_bool
(
tab
##
classList
##
contains
(
Js
.
string
"why3-inactive"
))
then
List
.
iter
(
fun
t
->
ignore
(
t
##
classList
##
toggle
(
Js
.
string
"why3-inactive"
)))
labels
in
Js
.
_false
)
)
labels
)
tab_groups
let
focus
id
=
(
Dom_html
.
getElementById
id
)
##
click
()
end
module
ContextMenu
=
...
...
@@ -941,6 +945,7 @@ module Controller =
let
()
=
why3_worker
:=
Some
(
init_why3_worker
()
)
let
why3_parse
()
=
Tabs
.
focus
"why3-task-list-tab"
;
ToolBar
.
disable_compile
()
;
why3_busy
:=
true
;
TaskList
.
clear
()
;
...
...
@@ -952,6 +957,7 @@ module Controller =
(
get_why3_worker
()
)
##
postMessage
(
msg
)
let
why3_execute
()
=
Tabs
.
focus
"why3-task-list-tab"
;
ToolBar
.
disable_compile
()
;
why3_busy
:=
true
;
TaskList
.
clear
()
;
...
...
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