equal
deleted
inserted
replaced
90 |
90 |
91 window.ajaxLoginInit = function(call_on_finish, user_level) |
91 window.ajaxLoginInit = function(call_on_finish, user_level) |
92 { |
92 { |
93 load_component('messagebox'); |
93 load_component('messagebox'); |
94 load_component('flyin'); |
94 load_component('flyin'); |
95 load_component('SpryEffects'); |
95 load_component('jquery'); |
|
96 load_component('jquery-ui'); |
96 load_component('l10n'); |
97 load_component('l10n'); |
97 load_component('crypto'); |
98 load_component('crypto'); |
98 |
99 |
99 logindata = {}; |
100 logindata = {}; |
100 |
101 |
363 case 'login_failure': |
364 case 'login_failure': |
364 // Rid ourselves of any loading windows |
365 // Rid ourselves of any loading windows |
365 ajaxLoginSetStatus(AJAX_STATUS_DESTROY); |
366 ajaxLoginSetStatus(AJAX_STATUS_DESTROY); |
366 document.getElementById('messageBox').style.backgroundColor = '#C0C0C0'; |
367 document.getElementById('messageBox').style.backgroundColor = '#C0C0C0'; |
367 var mb_parent = document.getElementById('messageBox').parentNode; |
368 var mb_parent = document.getElementById('messageBox').parentNode; |
368 new Spry.Effect.Shake(mb_parent, {duration: 1500}).start(); |
369 $(mb_parent).effect("shake", {}, 1500); |
369 setTimeout(function() |
370 setTimeout(function() |
370 { |
371 { |
371 document.getElementById('messageBox').style.backgroundColor = '#FFF'; |
372 document.getElementById('messageBox').style.backgroundColor = '#FFF'; |
372 ajaxLoginBuildForm(response.respawn_info); |
373 ajaxLoginBuildForm(response.respawn_info); |
373 ajaxLoginShowFriendlyError(response); |
374 ajaxLoginShowFriendlyError(response); |
384 { |
385 { |
385 // treat as a failure |
386 // treat as a failure |
386 ajaxLoginSetStatus(AJAX_STATUS_DESTROY); |
387 ajaxLoginSetStatus(AJAX_STATUS_DESTROY); |
387 document.getElementById('messageBox').style.backgroundColor = '#C0C0C0'; |
388 document.getElementById('messageBox').style.backgroundColor = '#C0C0C0'; |
388 var mb_parent = document.getElementById('messageBox').parentNode; |
389 var mb_parent = document.getElementById('messageBox').parentNode; |
389 new Spry.Effect.Shake(mb_parent, {duration: 1500}).start(); |
390 $(mb_parent).effect("shake", {}, 1500); |
390 setTimeout(function() |
391 setTimeout(function() |
391 { |
392 { |
392 document.getElementById('messageBox').style.backgroundColor = '#FFF'; |
393 document.getElementById('messageBox').style.backgroundColor = '#FFF'; |
393 ajaxLoginBuildForm(response.respawn_info); |
394 ajaxLoginBuildForm(response.respawn_info); |
394 // don't show an error here, just silently respawn |
395 // don't show an error here, just silently respawn |
853 } |
854 } |
854 |
855 |
855 // console.info('Drawing new error-box'); |
856 // console.info('Drawing new error-box'); |
856 |
857 |
857 // calculate position for the top of the box |
858 // calculate position for the top of the box |
858 var mb_bottom = $('messageBoxButtons').Top() + $('messageBoxButtons').Height(); |
859 var mb_bottom = $dynano('messageBoxButtons').Top() + $dynano('messageBoxButtons').Height(); |
859 // if the box isn't done flying in yet, just estimate |
860 // if the box isn't done flying in yet, just estimate |
860 if ( mb_bottom < ( getHeight() / 2 ) ) |
861 if ( mb_bottom < ( getHeight() / 2 ) ) |
861 { |
862 { |
862 mb_bottom = ( getHeight() / 2 ) + 120; |
863 mb_bottom = ( getHeight() / 2 ) + 120; |
863 } |
864 } |