diff --git a/plugins/unl_theme/scripts/JS/actionNotice.js b/plugins/unl_theme/scripts/JS/actionNotice.js index e8dae814fe329098d25e383de6ff7f065494aa4b..e816d66c04b18a710842d1d84f6132049ba62662 100644 --- a/plugins/unl_theme/scripts/JS/actionNotice.js +++ b/plugins/unl_theme/scripts/JS/actionNotice.js @@ -1,22 +1,49 @@ $(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 diff --git a/plugins/unl_theme/views/default/css.php b/plugins/unl_theme/views/default/css.php index fee22487d157c2cfff968271c80c6093f3b269c4..edea38de1a2e1ee9b017b7add49c62db8dd2e124 100644 --- a/plugins/unl_theme/views/default/css.php +++ b/plugins/unl_theme/views/default/css.php @@ -48,6 +48,7 @@ display:inline-block; padding:15px; height:64px; + min-width:910px; } #casOption { float:left;