[Hastymail-cvs] SF.net SVN: hastymail: [170] trunk/hastymail2
Brought to you by:
sailfrog,
slushpupie
From: <sai...@us...> - 2008-02-08 16:24:07
|
Revision: 170 http://hastymail.svn.sourceforge.net/hastymail/?rev=170&view=rev Author: sailfrog Date: 2008-02-08 08:24:04 -0800 (Fri, 08 Feb 2008) Log Message: ----------- I have noticed that with hastymail sessions, if you make a page request after an ajax request has been fired but before it has finished then you get logged out. Simultaneous access to PHP sessions is an issue so I am testing a solution to keep this from happening. When an ajax call is started an invisible div is raised above the entire interface making it impossible to click on anything until the ajax call has returned. Not ideal, since if the ajax call hangs it results in a useless interface. Under normal circumstances it does solve the problem of gettting logged out when you load a page during an ajax transaction. Modified Paths: -------------- trunk/hastymail2/js/site.js trunk/hastymail2/themes/default/css/main.css trunk/hastymail2/themes/default/templates/main.php Modified: trunk/hastymail2/js/site.js =================================================================== --- trunk/hastymail2/js/site.js 2008-02-08 06:39:26 UTC (rev 169) +++ trunk/hastymail2/js/site.js 2008-02-08 16:24:04 UTC (rev 170) @@ -12,6 +12,9 @@ document.getElementById("clock_div").innerHTML = 'Updated!'; } function update_new_page(do_folder_dropdown, do_folder_list, do_new_page_refresh) { + if (document.getElementById("int_protect")) { + document.getElementById("int_protect").style.zIndex = "5"; + } if (document.getElementById("clock_div")) { var old_clock = document.getElementById("clock_div").innerHTML; document.getElementById("clock_div").innerHTML = '<i><b>Checking for updates...</b></i>'; @@ -22,6 +25,9 @@ document.getElementById("notices").innerHTML = ''; } document.getElementById("clock_div").innerHTML = old_clock; + if (document.getElementById("int_protect")) { + document.getElementById("int_protect").style.zIndex = "-1"; + } return; } else { @@ -35,6 +41,9 @@ x_ajax_refresh_new_page(false, new_page_callback); } function update_folder_dropdown(mailbox, do_folder_list, do_new_page_refresh) { + if (document.getElementById("int_protect")) { + document.getElementById("int_protect").style.zIndex = "5"; + } if (document.getElementById("clock_div")) { document.getElementById("clock_div").innerHTML = '<i><b>Checking for updates...</b></i>'; } @@ -52,6 +61,9 @@ update_folder_list(mailbox); } } + if (document.getElementById("int_protect")) { + document.getElementById("int_protect").style.zIndex = "-1"; + } } if (do_new_page_refresh) { x_ajax_update_dropdown(mailbox, 1, dropdown_callback); Modified: trunk/hastymail2/themes/default/css/main.css =================================================================== --- trunk/hastymail2/themes/default/css/main.css 2008-02-08 06:39:26 UTC (rev 169) +++ trunk/hastymail2/themes/default/css/main.css 2008-02-08 16:24:04 UTC (rev 170) @@ -29,6 +29,8 @@ #content_inner{ background-color: #fff; padding: 20px; padding-top: 10px; min-height: 400px; } #mailbox_title2 { color: #111; font-size: 120%; font-weight: bold; margin-bottom: 20px; margin-left: -5px; margin-top: 10px; float: left; } #footer{ text-align: center; color: #333; font-style: italic; height: 10px; padding-top: 20px; } +#folder_cell{ width: 1%; padding-right: 40px; } +#int_protect{position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: -1; background-color: transparent; } .disabled_button{ opacity: .2; } .special_folder{ color: #22449b; font-style: italic; } .rtop, .rbottom{display:block; position: relative;} @@ -39,7 +41,6 @@ .r4{margin-left:1px; margin-right: 1px; height: 2px; background-color: #fff; color: #666;} .rtop{background-color: transparent;} .rbottom{background-color: transparent;} -#folder_cell{ width: 1%; padding-right: 40px; } .folder_inner h2 { margin: 0px; padding: 0px; padding-top: 5px; padding-bottom: 5px; font-weight: bold; font-size: 125%; margin-left: 20px; } .folder_inner a{ color: #666; } .folder_inner{ background-color: #e7e9ed; white-space: nowrap; padding-right: 35px; padding-top: 5px; padding-bottom: 5px; } Modified: trunk/hastymail2/themes/default/templates/main.php =================================================================== --- trunk/hastymail2/themes/default/templates/main.php 2008-02-08 06:39:26 UTC (rev 169) +++ trunk/hastymail2/themes/default/templates/main.php 2008-02-08 16:24:04 UTC (rev 170) @@ -49,6 +49,7 @@ <body id="body_tag" style="font-size:<?php echo $pd->pd['font_size'] ?>%;"> <div id="nonfooter"> + <div id="int_protect"></div> <div id="top"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |