Changeset 4851
- Timestamp:
- 07/25/11 08:33:04 (13 years ago)
- Location:
- branches/2.3/expressoMail1_2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.3/expressoMail1_2/inc/class.ScriptS.inc.php
r4641 r4851 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); -
branches/2.3/expressoMail1_2/js/common_functions.js
r4782 r4851 709 709 } 710 710 } 711 711 712 return strEncode; 712 713 } 713 714 714 715 function url_decode(str) { 715 716 716 var n, strCode, strDecode = ""; 717 717 for (n = 0; n < str.length; n++) { … … 724 724 // strDecode += str.charAt(n); 725 725 //} 726 } 727 return strDecode; 728 } 729 730 function url_decode_s(str) { 731 var n, strCode, strDecode = ""; 732 for (n = 0; n < str.length; n++) { 733 if (str.charAt(n) == "%") { 734 strCode = str.charAt(n + 1) + str.charAt(n + 2); 735 strDecode += String.fromCharCode(parseInt(strCode, 16)); 736 n += 2; 737 } else { 738 strDecode += str.charAt(n); 739 } 726 740 } 727 741 return strDecode; -
branches/2.3/expressoMail1_2/js/filter.js
r4770 r4851 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); … … 407 411 var createFilter = function (param){ 408 412 if (filter.criticalError){ 409 alert(get_lang('The filters service is out of service, try again later...')); 413 alert(get_lang('The filters service is out of service, try again later...')); 410 414 return false; 411 415 } … … 454 458 455 459 cfilter.prototype.delete_r = function(){ 456 457 460 // rule 458 461 var _this = this; … … 485 488 //Save outoffice in prefs: 486 489 connector.loadScript("preferences"); 487 if(typeof(prefe) == 'undefined') 490 if(typeof(prefe) == 'undefined'){ 488 491 setTimeout("filter.delete_r();",500); 492 } 489 493 else 490 494 prefe.save("outoffice", _this.out_officeF); … … 513 517 _this.rulesVoip[i] = aux; 514 518 } 515 } 516 517 _this.reload_rules(); 519 } 520 521 _this.reload_rules() 518 522 } 519 523 … … 824 828 } 825 829 830 connector.loadScript("preferences"); 826 831 // build object 827 832 var filter; -
branches/2.3/expressoMail1_2/js/filters.js
r4576 r4851 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.