diff --git a/trunk/includes/js/LSdefault.js b/trunk/includes/js/LSdefault.js index 0cb34ecc..a354c75a 100644 --- a/trunk/includes/js/LSdefault.js +++ b/trunk/includes/js/LSdefault.js @@ -57,10 +57,16 @@ var LSdefault = new Class({ (function(){new Fx.Style(this.LSerror,'opacity',{duration:500}).start(0.8,0);}).delay(5000, this); }, - loadingImgDisplay: function(el,position) { + loadingImgDisplay: function(el,position,size) { this.loading_img_id++; this.loading_img[this.loading_img_id] = new Element('img'); - this.loading_img[this.loading_img_id].src='templates/images/ajax-loader.gif'; + if (size=='big') { + var src = 'templates/images/loading.gif'; + } + else { + var src = 'templates/images/ajax-loader.gif'; + } + this.loading_img[this.loading_img_id].src=src; if (position=='inside') { this.loading_img[this.loading_img_id].injectInside(el); } diff --git a/trunk/includes/js/LSsession_login.js b/trunk/includes/js/LSsession_login.js index 02359d95..7c8ae58b 100644 --- a/trunk/includes/js/LSsession_login.js +++ b/trunk/includes/js/LSsession_login.js @@ -3,12 +3,26 @@ var LSsession_login = new Class({ this.select_ldapserver = $('LSsession_ldapserver'); if ( ! this.select_ldapserver ) return; + this.loading_zone = $('loading_zone'); this.select_ldapserver.addEvent('change',this.onLdapServerChanged.bind(this)); - this.onLdapServerChanged(); + this.onLdapServerChanged(); + }, + + disableInput: function() { + $$('input').each(function(el) { + el.setProperty('disabled','1'); + }); + }, + + enableInput: function() { + $$('input').each(function(el) { + el.setProperty('disabled',''); + }); }, onLdapServerChanged: function(){ - var imgload = varLSdefault.loadingImgDisplay(this.select_ldapserver); + this.disableInput(); + var imgload = varLSdefault.loadingImgDisplay(this.loading_zone,'inside','big'); var server = this.select_ldapserver.value; var data = { template: 'login', @@ -24,7 +38,7 @@ var LSsession_login = new Class({ var data = Json.evaluate(responseText); LSdebug(data); if ( data ) { - if (data.LSdebug) { + if (data.LSdebug) { varLSdefault.displayDebug(data.LSdebug); } if (data.LSerror) { @@ -38,6 +52,11 @@ var LSsession_login = new Class({ el.setStyle('display','block'); }); } + else { + $$('.loginform-level').each(function(el) { + el.setStyle('display','none'); + }); + } } else { $$('.loginform-level').each(function(el) { @@ -45,6 +64,7 @@ var LSsession_login = new Class({ }); $('LSsession_topDn').empty(); } + this.enableInput(); } }); window.addEvent(window.ie ? 'load' : 'domready', function() { diff --git a/trunk/templates/css/login.css b/trunk/templates/css/login.css index ed29bb19..b8373749 100644 --- a/trunk/templates/css/login.css +++ b/trunk/templates/css/login.css @@ -1,50 +1,55 @@ #loginform-logo { - float: left; + float: left; } div.loginform { - margin: auto; - margin-top: 10%; - border: 1px solid #69c; - padding: 1em; - width: 30em; - background: transparent url(../images/login_fd.png) no-repeat scroll 98% 98%; + margin: auto; + margin-top: 10%; + border: 1px solid #69c; + padding: 1em; + width: 30em; + background: transparent url(../images/login_fd.png) no-repeat scroll 98% 98%; } dl.loginform { - margin: 0; - padding: 0; + margin: 0; + padding: 0; } .loginform dt { - position: relative; - left: 0; - top: 1.1em; - width: 8em; - font-weight: bold; - font-size: 0.9em; + position: relative; + left: 0; + top: 1.1em; + width: 8em; + font-weight: bold; + font-size: 0.9em; } .loginform dd { - margin: 0 0 0 9em; - padding: 0 0 0em 0em; + margin: 0 0 0 9em; + padding: 0 0 0em 0em; } .loginform-level{ - display: none; + display: none; } .loginform-id { - visibility: hidden; + visibility: hidden; } .loginform input, .loginform select { - border: 1px inset #ccc; - width: 13em; + border: 1px inset #ccc; + width: 13em; } .loginform input[type='submit'] { - border: 1px outset #ccc; - width: 11em; - margin: 1em; + border: 1px outset #ccc; + width: 11em; + margin: 1em; +} + +#loading_zone { + float: right; + margin-left: 1em; } diff --git a/trunk/templates/login.tpl b/trunk/templates/login.tpl index 4a85c33f..85480292 100644 --- a/trunk/templates/login.tpl +++ b/trunk/templates/login.tpl @@ -1,35 +1,36 @@ -
-