Skip to content
Snippets Groups Projects
Commit 5644c261 authored by Seth Meranda's avatar Seth Meranda
Browse files

allow the action bar to switch back and forth between both options.

parent 8df0dc22
No related branches found
No related tags found
No related merge requests found
$(document).ready(function(){
$('#actionBar.casLogin a.switchAction').click(function(){
$('#casOption .loginMessage').fadeOut('fast', function(){
$('#casOption').animate({
'width' : '120px'
}, function(){
$('#casLogin').animate({
'opacity' : '0.3'
});
});
$('#elggOption').animate({
'width' : '790px'
}, function(){
$('.optionMessage').fadeOut('fast', function(){
$('#actionBar').removeClass('casLogin').addClass('elggLogin');
$('.elggLoginForm').fadeIn('fast');
});
});
});
return false;
})
});
\ No newline at end of file
$('#actionBar a.switchAction').click(function(){
if($(this).parents('#actionBar').hasClass('casLogin')){
showElggLogin();
} else {
showCASLogin();
}
return false;
});
});
function showElggLogin() {
$('#casOption .loginMessage').fadeOut('fast', function(){
$('#casOption').animate({
'width' : '120px'
}, function(){
$('#casLogin').animate({
'opacity' : '0.3'
});
});
$('#elggOption').animate({
'width' : '790px'
}, function(){
$('.optionMessage').fadeOut('fast', function(){
$('.elggLoginForm').fadeIn('fast');
$('#actionBar').removeClass('casLogin').addClass('elggLogin');
});
});
});
}
function showCASLogin() {
$('.elggLoginForm').fadeOut('fast', function(){
$('#elggOption').animate({
'width' : '220px'
}, function(){
$('.optionMessage').fadeIn('fast', function(){
$('#actionBar').addClass('casLogin').removeClass('elggLogin');
});
});
$('#casOption').animate({
'width' : '690px'
}, function(){
$('#casLogin').animate({
'opacity' : '1'
});
$('#casOption .loginMessage').fadeIn('fast');
});
});
}
\ No newline at end of file
......@@ -48,6 +48,7 @@
display:inline-block;
padding:15px;
height:64px;
min-width:910px;
}
#casOption {
float:left;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment