includes/clientside/static/login.js
changeset 585 35e91d16ecf5
parent 582 a38876c0793c
child 651 ce9d78d7251d
equal deleted inserted replaced
584:04a6ea3da279 585:35e91d16ecf5
   872       return base;
   872       return base;
   873       break;
   873       break;
   874   }
   874   }
   875 }
   875 }
   876 
   876 
       
   877 window.ajaxShowCaptcha = function(code)
       
   878 {
       
   879   var mydiv = document.createElement('div');
       
   880   mydiv.style.backgroundColor = '#FFFFFF';
       
   881   mydiv.style.padding = '10px';
       
   882   mydiv.style.position = 'absolute';
       
   883   mydiv.style.top = '0px';
       
   884   mydiv.id = 'autoCaptcha';
       
   885   mydiv.style.zIndex = String( getHighestZ() + 1 );
       
   886   var img = document.createElement('img');
       
   887   img.onload = function()
       
   888   {
       
   889     if ( this.loaded )
       
   890       return true;
       
   891     var mydiv = document.getElementById('autoCaptcha');
       
   892     var width = getWidth();
       
   893     var divw = $dynano(mydiv).Width();
       
   894     var left = ( width / 2 ) - ( divw / 2 );
       
   895     mydiv.style.left = left + 'px';
       
   896     fly_in_top(mydiv, false, true);
       
   897     this.loaded = true;
       
   898   };
       
   899   img.src = makeUrlNS('Special', 'Captcha/' + code);
       
   900   img.onclick = function() { this.src = this.src + '/a'; };
       
   901   img.style.cursor = 'pointer';
       
   902   mydiv.appendChild(img);
       
   903   domObjChangeOpac(0, mydiv);
       
   904   var body = document.getElementsByTagName('body')[0];
       
   905   body.appendChild(mydiv);
       
   906 }
       
   907 
   877 window.ajaxInitLogout = function()
   908 window.ajaxInitLogout = function()
   878 {
   909 {
   879   load_component('messagebox');
   910   load_component('messagebox');
   880   load_component('l10n');
   911   load_component('l10n');
   881   var mb = new MessageBox(MB_YESNO|MB_ICONQUESTION, $lang.get('user_logout_confirm_title'), $lang.get('user_logout_confirm_body'));
   912   var mb = new MessageBox(MB_YESNO|MB_ICONQUESTION, $lang.get('user_logout_confirm_title'), $lang.get('user_logout_confirm_body'));