Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
5ee51442
Commit
5ee51442
authored
Feb 04, 2014
by
Leigh B Stoller
Browse files
Fixes to NavBar login/loguout handling.
parent
8664e568
Changes
2
Hide whitespace changes
Inline
Side-by-side
www/aptui/js/quickvm_sup.js
View file @
5ee51442
...
...
@@ -917,7 +917,10 @@ function LoginByModal()
// Clear previous error.
$
(
"
#quickvm_login_form_error
"
).
html
(
""
);
HideModal
(
"
#quickvm_login_modal
"
);
$
(
"
#loginbutton
"
).
html
(
uid
+
"
logged in
"
);
$
(
"
#loginstatus
"
).
html
(
"
<a>
"
+
uid
+
"
logged in</a>
"
);
$
(
"
#loginstatus
"
).
removeClass
(
"
hidden
"
);
$
(
"
#quickvm_actions_menu
"
).
removeClass
(
"
hidden
"
);
$
(
"
#loginbutton
"
).
addClass
(
"
hidden
"
);
}
}
var
xmlthing
=
$
.
ajax
({
...
...
@@ -950,8 +953,9 @@ function Logout()
alert
(
"
Logout failed!
"
);
}
else
{
// Need to stick the button back in ...
$
(
"
#loginbutton
"
).
html
(
""
);
$
(
"
#loginstatus
"
).
addClass
(
"
hidden
"
);
$
(
"
#quickvm_actions_menu
"
).
addClass
(
"
hidden
"
);
$
(
"
#loginbutton
"
).
removeClass
(
"
hidden
"
);
}
}
var
xmlthing
=
$
.
ajax
({
...
...
www/aptui/quickvm_sup.php
View file @
5ee51442
...
...
@@ -88,11 +88,13 @@ function SPITHEADER($thinheader = 0)
</div>
<ul class='nav navbar-nav navbar-right'>"
;
if
(
!
$disable_accounts
)
{
if
(
$login_user
)
{
echo
"<li><a id='loginbutton'>
$login_uid
logged in</a></li>
\n
"
;
}
elseif
(
!
NOLOGINS
())
{
echo
"<li><a class='btn btn-primary navbar-btn'
echo
"<li id='loginstatus'>"
.
(
$login_user
?
"<a>
$login_uid
logged in</a>"
:
""
)
.
"</li>
\n
"
;
if
(
!
NOLOGINS
())
{
echo
"<li id='loginbutton' "
.
(
$login_user
?
"class='hidden'"
:
""
)
.
">"
.
" <a class='btn btn-primary navbar-btn'
id='loginbutton'
data-toggle='modal'
href='#quickvm_login_modal'
...
...
@@ -104,9 +106,10 @@ function SPITHEADER($thinheader = 0)
echo
" </ul>
<ul class='nav navbar-nav navbar-left'>
<li><a href='quickvm.php'>Home</a></li>
\n
"
;
if
(
!
$disable_accounts
&&
$login_user
)
{
echo
" <li class='dropdown'>
<a href='#' class='dropdown-toggle' data-toggle='dropdown'>
if
(
!
$disable_accounts
)
{
echo
" <li id='quickvm_actions_menu' class='dropdown "
.
(
!
$login_user
?
"hidden"
:
""
)
.
"'>"
.
"<a href='#' class='dropdown-toggle' data-toggle='dropdown'>
Actions <b class='caret'></b></a>
<ul class='dropdown-menu'>
<li><a href='myprofiles.php'>My Profiles</a></li>
...
...
Write
Preview
Supports
Markdown
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