Changeset 2666 for branches/2.0/expressoMail1_2/js/filter.js
- Timestamp:
- 04/29/10 15:03:20 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/expressoMail1_2/js/filter.js
r2658 r2666 42 42 43 43 44 cfilter.prototype.load_rules = function( )44 cfilter.prototype.load_rules = function( posHandler, param ) 45 45 { 46 46 var _this = this; … … 52 52 var handler_sieve = function(data) 53 53 { 54 if (data. indexOf('Error:') == 0)54 if (data.toString().indexOf('Error:') == 0) 55 55 { 56 56 _this.criticalError = true; … … 77 77 alert("Expresso:"+e.description); 78 78 } 79 if (typeof(posHandler) == 'function') 80 posHandler(param); 79 81 } 80 82 if(Element('form_status') != null) … … 413 415 } 414 416 415 this.load_rules(); 416 if(confirm(get_lang("Do you want to block this e-mail?"))){ 417 new_r = "&&ENABLED&&" + email + "&&&&&&discard&&&&0&&&&&&0"; 418 // setTimeout("filter.e_newrule('" + new_r + "')",2000); 419 if (filter.e_newrule(new_r)){ 420 this.email_deny.push(email); 421 write_msg(get_lang("The sender was blocked")); 422 }else 423 write_msg(get_lang("You have reached the maximum number of rules")); 424 } 417 var createFilter = function (param){ 418 if(confirm(get_lang("Do you want to block this e-mail?"))){ 419 new_r = "&&ENABLED&&" + param + "&&&&&&discard&&&&0&&&&&&0"; 420 //setTimeout("filter.e_newrule('" + new_r + "')",2000); 421 if (filter.e_newrule(param)){ 422 filter.email_deny.push(param); 423 write_msg(get_lang("The sender was blocked")); 424 }else 425 write_msg(get_lang("You have reached the maximum number of rules")); 426 } 427 }; 428 this.load_rules( createFilter, email ); 425 429 } 426 430
Note: See TracChangeset
for help on using the changeset viewer.