mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-10 17:34:22 +01:00
Clean up login screen when database authentication AND open id authentication is enabled.
There's now a simple way to switch between forms rather than showing them both at once. Plus, Tracks will cookie you when you switch forms so it remembers the last type of authentication you used when you return. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@504 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
e0787cd627
commit
2485faaf5c
4 changed files with 100 additions and 53 deletions
|
|
@ -1,3 +1,25 @@
|
|||
var Login = {
|
||||
showOpenid: function() {
|
||||
if ($('database_auth_form')) $('database_auth_form').hide();
|
||||
if ($('openid_auth_form')) $('openid_auth_form').show();
|
||||
if ($('alternate_auth_openid')) $('alternate_auth_openid').hide();
|
||||
if ($('alternate_auth_database')) $('alternate_auth_database').show();
|
||||
if ($('openid_url')) $('openid_url').focus();
|
||||
if ($('openid_url')) $('openid_url').select();
|
||||
new CookieManager().setCookie('preferred_auth', 'openid');
|
||||
},
|
||||
|
||||
showDatabase: function(container) {
|
||||
if ($('openid_auth_form')) $('openid_auth_form').hide();
|
||||
if ($('database_auth_form')) $('database_auth_form').show();
|
||||
if ($('alternate_auth_database')) $('alternate_auth_database').hide();
|
||||
if ($('alternate_auth_openid')) $('alternate_auth_openid').show();
|
||||
if ($('user_login')) $('user_login').focus();
|
||||
if ($('user_login')) $('user_login').select();
|
||||
new CookieManager().setCookie('preferred_auth', 'database');
|
||||
}
|
||||
}
|
||||
|
||||
Ajax.Responders.register({
|
||||
onCreate: function() {
|
||||
if($('busy') && Ajax.activeRequestCount>0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue