Changeset 390959b in github


Ignore:
Timestamp:
Apr 22, 2012 1:24:06 PM (13 months ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo
Children:
111f509
Parents:
da5cadc
Message:
  • Small code improvements
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/js/app.js

    rda5cadc r390959b  
    32673267  { 
    32683268    // check input fields 
    3269     var ed, str = '', 
    3270       value_to = $("[name='_to']").val(), 
    3271       value_cc = $("[name='_cc']").val(), 
    3272       value_bcc = $("[name='_bcc']").val(), 
    3273       value_subject = $("[name='_subject']").val(); 
    3274  
    3275     if (value_to) 
    3276       str += value_to+':'; 
    3277     if (value_cc) 
    3278       str += value_cc+':'; 
    3279     if (value_bcc) 
    3280       str += value_bcc+':'; 
    3281     if (value_subject) 
    3282       str += value_subject+':'; 
     3269    var ed, i, val, str = '', hash_fields = ['to', 'cc', 'bcc', 'subject']; 
     3270 
     3271    for (i=0; i<hash_fields.length; i++) 
     3272      if (val = $('[name="_' + hash_fields[i] + '"]').val()) 
     3273        str += val + ':'; 
    32833274 
    32843275    if (window.tinyMCE && (ed = tinyMCE.get(this.env.composebody))) 
     
    62346225  this.start_keepalive = function() 
    62356226  { 
     6227    if (!this.env.keep_alive || this.env.framed) 
     6228      return; 
     6229 
    62366230    if (this._int) 
    62376231      clearInterval(this._int); 
    62386232 
    6239     if (this.env.keep_alive && !this.env.framed && this.task == 'mail' && this.gui_objects.mailboxlist) 
     6233    if (this.task == 'mail' && this.gui_objects.mailboxlist) 
    62406234      this._int = setInterval(function(){ ref.check_for_recent(false); }, this.env.keep_alive * 1000); 
    6241     else if (this.env.keep_alive && !this.env.framed && this.task != 'login' && this.env.action != 'print') 
     6235    else if (this.task != 'login' && this.env.action != 'print') 
    62426236      this._int = setInterval(function(){ ref.keep_alive(); }, this.env.keep_alive * 1000); 
    62436237  }; 
     
    63006294    else if (document.selection && document.selection.createRange) { 
    63016295      var range = document.selection.createRange(); 
    6302       if (range.parentElement()!=obj) 
     6296      if (range.parentElement() != obj) 
    63036297        return 0; 
    63046298 
Note: See TracChangeset for help on using the changeset viewer.