Changeset 7270 for sandbox/2.5.0-expresso1/expressoMail1_2/js
- Timestamp:
- 09/21/12 12:14:32 (12 years ago)
- Location:
- sandbox/2.5.0-expresso1/expressoMail1_2/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.5.0-expresso1/expressoMail1_2/js/mail_archiver.js
r7261 r7270 257 257 //Redraw "Offline" linkage, intended to recoonect MailArchiver link 258 258 connector.purgeCache(); 259 ttreeBox.name_folder = "root"; 260 ttreeBox.update_folder(); 261 draw_tree_local_folders(); 262 ttreeBox.update_folder(); 263 change_folder('INBOX', 'INBOX', ttreeBox); 259 draw_new_tree_folder(); 260 change_folder('INBOX', 'INBOX'); 264 261 } 265 262 } … … 283 280 else{ 284 281 window.clearInterval(expresso_mail_archive.timer); 285 write_msg(get_lang('MailArchiver does not seems to be running or installed at this workstation, local messages are disabled. Check it out!'),true); 282 write_msg(get_lang('MailArchiver does not seems to be running or installed at this workstation, local messages are disabled. Check it out!'),false); 283 expresso_mail_archive.enabled = false; 284 expresso_mail_archive.turnOffLocalTreeStructure(); 286 285 } 287 286 } 288 287 else{ 289 288 window.clearInterval(expresso_mail_archive.timer); 290 write_msg(get_lang('MailArchiver does not seems to be running or installed at this workstation, local messages are disabled. Check it out!'),true); 291 expresso_mail_archive.enabled = false; 289 write_msg(get_lang('MailArchiver does not seems to be running or installed at this workstation, local messages are disabled. Check it out!'),false); 290 expresso_mail_archive.enabled = false; 291 expresso_mail_archive.turnOffLocalTreeStructure(); 292 292 } 293 293 //window.alert('fooArc set to null'); … … 301 301 write_msg(get_lang('Mail Archiver is not responding. There is some communicating issue hang it up. Some services may not work properly. Check it out!')); 302 302 obj.DeactivateStatusListener(obj); 303 //draw_new_tree_folder(); 303 304 return; 304 305 } … … 322 323 expresso_mail_archive.DeactivateResources(expresso_mail_archive); 323 324 } 324 else325 //else 325 326 //window.alert('ok'); 326 327 … … 351 352 obj.SystemCheck(); 352 353 obj.ActivateStatusListener(obj); 353 connector.resetProgressBarText();354 //auto_refresh();354 //connector.resetProgressBarText(); 355 auto_refresh(); 355 356 } 356 357 … … 1211 1212 } 1212 1213 catch(e){ 1213 if (!expresso_mail_archive.enabled)1214 if (!expresso_mail_archive.enabled) 1214 1215 write_msg(get_lang('MailArchiver does not seems to be running or installed at this workstation, local messages are disabled. Check it out!'),false); 1215 1216 else{ 1216 1217 window.clearInterval(expresso_mail_archive.timer); 1217 write_msg(get_lang('There is something wrong with MailArchiver environment. Contact you support'), true);1218 write_msg(get_lang('There is something wrong with MailArchiver environment. Contact you support'), false); 1218 1219 expresso_mail_archive.enabled = false; 1219 1220 expresso_mail_archive.turnOffLocalTreeStructure(); … … 1226 1227 MailArchiver.prototype.getFaultInfoOperationOK = function(faultinfo){ 1227 1228 try{ 1228 write_msg(get_lang('MailArchiver remote service reports the following error:', true) + faultinfo.getReturn().getSoapFaultString());1229 write_msg(get_lang('MailArchiver remote service reports the following error:', false) + faultinfo.getReturn().getSoapFaultString()); 1229 1230 } catch(e){ 1230 write_msg(get_lang('The archive service reports a unknown error. Try to refresh your browser screen', true));1231 write_msg(get_lang('The archive service reports a unknown error. Try to refresh your browser screen', false)); 1231 1232 } 1232 1233 expresso_mail_archive.resetObject(); … … 1234 1235 window.setTimeout("eval('document.getElementById(\"main_title\").innerHTML =\"Expresso Mail\"')",3000); 1235 1236 connector.purgeCache(); 1237 expresso_mail_archive.turnOffLocalTreeStructure(); 1236 1238 } 1237 1239 … … 1239 1241 MailArchiver.prototype.getFaultInfoOperationFailure = function(errorCode, errorDesc){ 1240 1242 try{ 1241 write_msg(get_lang('SoapFault capture fails at:' + errorCode + ' | ' + errorDesc, true));1243 write_msg(get_lang('SoapFault capture fails at:' + errorCode + ' | ' + errorDesc, false)); 1242 1244 } catch(e){ 1243 write_msg(get_lang('Service error mapping', true));1245 write_msg(get_lang('Service error mapping', false)); 1244 1246 } 1245 1247 } … … 1262 1264 //window.alert('callback de createfolderoperationok'); 1263 1265 draw_tree_local_folders(); 1264 expresso_mail_archive.drawdata.treeObject._drawn = true;1266 //expresso_mail_archive.drawdata.treeObject._drawn = true; 1265 1267 //ttreeBox.update_folder(); 1266 1268 } … … 2072 2074 2073 2075 MailArchiver.prototype.turnOffLocalTreeStructure = function (){ 2074 var disabled_local_span = document.getElementById('llocal_disabledtree_folders'); 2075 2076 if((!disabled_local_span) && (!document.getElementById('services_retry'))){ 2077 var n_LocalDisabled = new dNode({id: "local_disabled", caption: get_lang('Offline'), onClick: "services_retry()", plusSign:false}); 2078 tree_folders.add(n_LocalDisabled, 'local_root'); 2079 2080 var disabled_local_span = document.getElementById('llocal_disabledtree_folders'); 2081 disabled_local_span.style.backgroundImage="url(../phpgwapi/templates/"+template+"/images/foldertree_services.png)"; 2082 var service_retry = document.createElement("SPAN"); 2083 service_retry.id = 'services_retry'; 2084 service_retry.className = 'clean_trash'; 2085 service_retry.style.cursor = 'pointer'; 2086 service_retry.onclick = function () {services_retry();}; 2087 service_retry.innerHTML = "["+get_lang("Retry")+"]"; 2088 service_retry.title= get_lang("Reconect to MailArchiver services"); 2089 service_retry.onmouseover = function() {service_retry.style.color="red";}; 2090 service_retry.onmouseout= function() {service_retry.style.color="#666666";}; //#114FA4 2091 disabled_local_span.parentNode.appendChild(service_retry); 2092 2093 var div_ma_host = document.createElement('div'); 2094 div_ma_host.id = 'div_login_ma_host'; 2095 div_ma_host.style.position = 'absolute'; 2096 div_ma_host.style.padding = '0px'; 2097 div_ma_host.style.margin = '0px'; 2098 div_ma_host.style.top = '25px'; 2099 div_ma_host.style.left = '0px'; 2100 div_ma_host.style.width = '145px'; 2101 div_ma_host.style.height = '80px'; 2102 div_ma_host.style.border = '1px solid #CCCCCC'; 2103 div_ma_host.style.backgroundColor = '#F0F0F0'; 2104 div_ma_host.style.fontWeight = 'normal'; 2105 disabled_local_span.appendChild(div_ma_host); 2106 div_ma_host.innerHTML = '<p><b>'+get_lang('In trouble?')+'</b></p><p>→ ' + get_lang('Try to access') + '<br/><a href="' + mail_archive_protocol + "://" + mail_archive_host + ":" + mail_archive_port + '/admin" target="_blank" title="MailArchiver Admin">'+get_lang('MailArchiver admin console')+'.</p>'; 2107 } 2108 //Only creates the MA login linkage 2109 else{ 2110 var div_ma_host = document.createElement('div'); 2111 div_ma_host.id = 'div_login_ma_host'; 2112 div_ma_host.style.position = 'absolute'; 2113 div_ma_host.style.padding = '0px'; 2114 div_ma_host.style.margin = '0px'; 2115 div_ma_host.style.top = '25px'; 2116 div_ma_host.style.width = '145px'; 2117 div_ma_host.style.height = '80px'; 2118 div_ma_host.style.border = '1px solid #CCCCCC'; 2119 div_ma_host.style.backgroundColor = '#F0F0F0'; 2120 div_ma_host.style.fontWeight = 'normal'; 2121 disabled_local_span.appendChild(div_ma_host); 2122 div_ma_host.innerHTML = '<p><b>'+get_lang('In trouble?')+'</b></p><p>→ ' + get_lang('Try to access') + '<br/><a href="' + mail_archive_protocol + "://" + mail_archive_host + ":" + mail_archive_port + '/admin" target="_blank" title="MailArchiver Admin">'+get_lang('MailArchiver admin console')+'.</p>'; 2123 } 2076 draw_new_tree_folder(); 2124 2077 } 2125 2078 -
sandbox/2.5.0-expresso1/expressoMail1_2/js/main.js
r7234 r7270 4898 4898 if ((expresso_mail_archive.enabled == null) && (expresso_mail_archive.timer == null) && (expresso_mail_archive.counter > 0)){ 4899 4899 connector.hideProgressBar(); 4900 connector.resetProgressBarText();4900 //connector.resetProgressBarText(); 4901 4901 write_msg(get_lang('Sorry, but you need to reload this web page. Click at reload page at web browsing top navigation.')); 4902 4902 return; … … 4904 4904 4905 4905 if (arguments.length == 0){ 4906 connector.setProgressBarText(get_lang('Trying to communicate with Mail Archiver...'));4906 write_msg(get_lang('Trying to communicate with Mail Archiver...')); 4907 4907 } 4908 4908 … … 4967 4967 write_msg(get_lang('Sorry, but Mail Archiver still seems to be sleeping. Check out your system services!')); 4968 4968 connector.hideProgressBar(); 4969 connector.resetProgressBarText();4969 //connector.resetProgressBarText(); 4970 4970 check_services_tryouts = 1; 4971 4971 } … … 4975 4975 function check_services_restart(){ 4976 4976 try{ 4977 connector.setProgressBarText(get_lang('Wait: attempt %1 from %2...', check_services_tryouts, check_services_tryouts_limit));4977 write_msg(get_lang('Wait: attempt %1 from %2...', check_services_tryouts, check_services_tryouts_limit)); 4978 4978 if(check_services_tryouts <= 5){ 4979 4979 try{ 4980 4980 ArchiveServices = new web_service_mailarchiver_serpro__ArchiveServices(); 4981 4981 ArchiveServices.url = mail_archive_protocol + "://" + mail_archive_host + ":" + mail_archive_port + "/arcserv/ArchiveServices"; 4982 window.clearInterval(ttintval 2);4982 window.clearInterval(ttintval); 4983 4983 expresso_mail_archive.Restart(expresso_mail_archive); 4984 4984 } … … 4986 4986 check_services_tryouts++; 4987 4987 window.clearInterval(ttintval); 4988 ttintval 2= window.setTimeout('services_retry(true)',1);4988 ttintval = window.setTimeout('services_retry(true)',1); 4989 4989 } 4990 4990 } … … 4992 4992 write_msg(get_lang('Sorry, but Mail Archiver still seems to be sleeping. Check out your system services!')); 4993 4993 connector.hideProgressBar(); 4994 connector.resetProgressBarText();4994 //connector.resetProgressBarText(); 4995 4995 check_services_tryouts = 1; 4996 4996 } … … 4999 4999 write_msg(get_lang('Sorry, but Mail Archiver still seems to be sleeping. Check out your system services!')); 5000 5000 connector.hideProgressBar(); 5001 connector.resetProgressBarText();5001 //connector.resetProgressBarText(); 5002 5002 check_services_tryouts = 1; 5003 5003 }
Note: See TracChangeset
for help on using the changeset viewer.