Changeset 4855 for trunk/expressoMail1_2/js/filter.js
- Timestamp:
- 07/25/11 11:12:53 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/js/filter.js
r4841 r4855 46 46 var cont1 = parseInt(0); 47 47 var cont2 = parseInt(0); 48 48 49 49 if( _this.rulest.length == 0 ) 50 50 { 51 51 var handler_sieve = function(data) 52 52 { 53 if (data.toString().indexOf('Error:') == 0) 54 { 53 if(data.toString().indexOf('Error:') == 0) 54 { 55 55 56 _this.criticalError = true; 56 57 alert(get_lang('The filters service is out of service, try again later...')); … … 68 69 } 69 70 } 70 _this.out_officeR = data.vacation[0]; 71 _this.out_officeR = _this.out_officeR ? trim(_this.out_officeR.toString().replace("\n","")) : ""; 72 if(data.mode.length > 0){_this.mode_in = data.mode[0];} 71 if(typeof(data.vacation[0]) == 'undefined'){ 72 _this.out_officeR = ""; 73 } 74 else 75 _this.out_officeR = url_decode_s(data.vacation[0]); 73 76 } 74 77 catch(e){ 75 78 _this.criticalError = true; 76 alert(get_lang('The filters service is out of service, try again later...')); 77 } 79 alert(get_lang('==> The filters service is out of service, try again later...')); 80 } 81 if(data.mode.length > 0){_this.mode_in = data.mode[0];} 78 82 if (typeof(posHandler) == 'function') 79 83 posHandler(param); … … 320 324 "</tr><tr><td colspan='2'><hr size='1' width='100%'><b>"+get_lang("Action")+":</b></td></tr>"+ 321 325 "</table><table id='table_rule1' border='0' cellpading='0' cellspacing='0' width='100%'>"+ 322 323 326 "<tr><td colspan='2'><input type='checkBox' id='checkBox2' onclick='filter.disable_radio();' name='checkb'>"+get_lang('Keep a copy of the message at your Inbox')+ "</td><tr>"+ 327 "<tr><td width='50%'><input type='radio' id='radio1' name='radio' value='folder'>"+get_lang('Store at')+".:</td>"+ 324 328 "<td width='50%'><select id='select_mailboxes' name='select_mailboxes'></select></td>"+ 325 329 "</tr><tr><td width='50%'><input type='radio' id='radio2' name='radio' value='address'>"+get_lang('Forward to the address')+".:</td>"+ … … 406 410 var createFilter = function (param){ 407 411 if (filter.criticalError){ 408 alert(get_lang('The filters service is out of service, try again later...')); 412 alert(get_lang('The filters service is out of service, try again later...')); 409 413 return false; 410 414 } … … 453 457 454 458 cfilter.prototype.delete_r = function(){ 455 456 459 // rule 457 460 var _this = this; … … 483 486 _this.out_officeF = false; 484 487 //Save outoffice in prefs: 485 connector.loadScript("preferences"); 486 if(typeof(prefe) == 'undefined') 487 setTimeout("filter.delete_r();",500); 488 else 489 prefe.save("outoffice", _this.out_officeF); 488 connector.loadScript("preferences"); 489 if(typeof(prefe) == 'undefined'){ 490 setTimeout("filter.delete_r();",500); 491 } 492 else 493 prefe.save("outoffice", _this.out_officeF); 490 494 } 491 495 } … … 512 516 _this.rulesVoip[i] = aux; 513 517 } 514 } 515 518 } 519 516 520 _this.reload_rules(); 517 521 } … … 820 824 } 821 825 826 connector.loadScript("preferences"); 822 827 // build object 823 828 var filter;
Note: See TracChangeset
for help on using the changeset viewer.