Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
3pia
VISPA
VISPA web
Commits
6a8de1fd
Commit
6a8de1fd
authored
Aug 11, 2017
by
Benjamin Fischer
Browse files
Vispa: automatically selecte a single connected workspace
parent
c510b2a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
vispa/static/js/vispa.js
View file @
6a8de1fd
...
...
@@ -299,6 +299,20 @@ define([
if
(
core
)
{
core
.
openWorkspaceAddDialog
();
}
}
else
{
// auto-select single connected workspace
var
c
,
ws
=
Workspace
.
_members
.
workspaces
;
for
(
var
i
in
ws
)
{
var
w
=
ws
[
i
];
var
s
=
w
.
state
;
if
(
s
==
"
connected
"
)
{
c
=
c
?
null
:
w
;
}
else
if
(
s
!=
"
disconnected
"
)
c
=
null
;
if
(
c
==
null
)
break
;
}
if
(
c
)
Workspace
.
_members
.
current
=
c
;
}
// start session managment
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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