Changeset 4855 for trunk/expressoMail1_2
- Timestamp:
- 07/25/11 11:12:53 (13 years ago)
- Location:
- trunk/expressoMail1_2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.ScriptS.inc.php
r4789 r4855 507 507 // Lê as regras fora do escritório; 508 508 if ($this->newout != "") { 509 $newscriptfoot .= preg_replace("/[\\n\\r]/", " 509 $newscriptfoot .= preg_replace("/[\\n\\r]/", "%0A", $this->newout) . "\n"; 510 510 } 511 511 $newscriptfoot .= "#mode&&basic\n"; 512 512 513 513 $newscript = $newscripthead . $newscriptbody . $newscriptfoot; 514 515 514 // Destroi as variaveis; 516 515 unset($rule); -
trunk/expressoMail1_2/js/common_functions.js
r4843 r4855 715 715 } 716 716 } 717 717 718 return strEncode; 718 719 } 719 720 720 721 function url_decode(str) { 721 722 722 var n, strCode, strDecode = ""; 723 723 for (n = 0; n < str.length; n++) { … … 730 730 // strDecode += str.charAt(n); 731 731 //} 732 } 733 return strDecode; 734 } 735 736 function url_decode_s(str) { 737 var n, strCode, strDecode = ""; 738 for (n = 0; n < str.length; n++) { 739 if (str.charAt(n) == "%") { 740 strCode = str.charAt(n + 1) + str.charAt(n + 2); 741 strDecode += String.fromCharCode(parseInt(strCode, 16)); 742 n += 2; 743 } else { 744 strDecode += str.charAt(n); 745 } 732 746 } 733 747 return strDecode; -
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; -
trunk/expressoMail1_2/js/filters.js
r4735 r4855 187 187 { 188 188 var aux = outOffice.split("&&"); 189 return get_lang("Rule") + " - <a href='javascript:void(0)' onclick=filter.form_out()> " + "<b>" + get_lang("Status") + " : </b><font color='red'>" + (aux[4] 189 return get_lang("Rule") + " - <a href='javascript:void(0)' onclick=filter.form_out()> " + "<b>" + get_lang("Status") + " : </b><font color='red'>" + (aux[4].replace("\n","") === "off" ? get_lang("Disabled") : get_lang("Enabled")) + "</font></a>"; 190 190 } 191 191
Note: See TracChangeset
for help on using the changeset viewer.