[Hastymail-cvs] SF.net SVN: hastymail: [142] trunk/hastymail2/js/site.js
Brought to you by:
sailfrog,
slushpupie
From: <sai...@us...> - 2008-01-28 17:31:07
|
Revision: 142 http://hastymail.svn.sourceforge.net/hastymail/?rev=142&view=rev Author: sailfrog Date: 2008-01-28 09:30:58 -0800 (Mon, 28 Jan 2008) Log Message: ----------- maybe some fixes to the new page causing a logout. I think its due to the session changes Modified Paths: -------------- trunk/hastymail2/js/site.js Modified: trunk/hastymail2/js/site.js =================================================================== --- trunk/hastymail2/js/site.js 2008-01-27 22:45:22 UTC (rev 141) +++ trunk/hastymail2/js/site.js 2008-01-28 17:30:58 UTC (rev 142) @@ -11,20 +11,19 @@ function show_update_notice() { document.getElementById("clock_div").innerHTML = 'Updated!'; } -function update_new_page(do_folder_dropdown, do_folder_list) { +function update_new_page(do_folder_dropdown, do_folder_list, do_new_page_refresh) { if (document.getElementById("clock_div")) { document.getElementById("clock_div").innerHTML = '<i><b>Checking for updates...</b></i>'; } function new_page_callback(php_output) { document.getElementById("new_page").innerHTML = php_output; if (do_folder_dropdown) { - update_folder_dropdown(do_folder_dropdown, do_folder_list); + update_folder_dropdown(do_folder_dropdown, do_folder_list, do_new_page_refresh); } - update_title(); } x_ajax_refresh_new_page(false, new_page_callback); } -function update_folder_dropdown(mailbox, do_folder_list) { +function update_folder_dropdown(mailbox, do_folder_list, do_new_page_refresh) { if (document.getElementById("clock_div")) { document.getElementById("clock_div").innerHTML = '<i><b>Checking for updates...</b></i>'; } @@ -34,6 +33,9 @@ if (do_folder_list) { update_folder_list(mailbox); } + if (do_new_page_refresh) { + update_title(); + } } x_ajax_update_dropdown(mailbox, dropdown_callback); } @@ -49,7 +51,9 @@ if (current != php_output) { document.getElementById("clock_div").innerHTML = '<i><b>Mailbox change detected</b></i>'; } - document.title = php_output; + if (php_output != '') { + document.title = php_output; + } } x_ajax_update_title(false, title_callback); } @@ -85,8 +89,8 @@ function start_timer() { secs = secs + 1; if (do_new_page_refresh && secs % do_new_page_refresh == 0) { - update_new_page(do_folder_dropdown, do_folder_list); + update_new_page(do_folder_dropdown, do_folder_list, do_new_page_refresh); } - if (secs % update_delay == 0 && do_folder_dropdown && !do_new_page_refresh) { update_folder_dropdown(do_folder_dropdown, do_folder_list); } + if (secs % update_delay == 0 && do_folder_dropdown && !do_new_page_refresh) { update_folder_dropdown(do_folder_dropdown, false); } timerID = self.setTimeout("start_timer()", delay) } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |