Changeset 651


Ignore:
Timestamp:
01/30/09 13:25:20 (15 years ago)
Author:
niltonneto
Message:
  • Correção de condicionais com variáveis nulas.
  • Otimização da função get_lang.
  • Correção do ícone do JMessenger.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/js/common_functions.js

    r618 r651  
    8282                        var _value = array_lang[key]; 
    8383                else 
    84                         return _key+"*"; 
    85  
    86         if(_arg1 || _arg2 ||_arg3 || _arg4) { 
    87                 for(j = 1; j <= 4; j++){ 
    88                         if(eval("_arg"+j)) { 
    89                                 var regExp = new RegExp("%"+j+""); 
    90                                 _value = _value.replace(regExp,eval("_arg"+j)); 
    91                         } 
    92                 } 
    93         } 
    94  
     84                        var _value = _key+"*"; 
     85 
     86        if(_arg1) 
     87                for(j = 1; eval("_arg"+j); j++) 
     88                                _value = _value.replace("%"+j,eval("_arg"+j)); 
    9589        return _value; 
    96 } 
    97  
     90}  
    9891// Make decimal round, using in size message 
    9992function round(value, decimal){ 
     
    117110function msg_is_read(msg_number, selected){ 
    118111        tr_message = Element(msg_number); 
    119  
    120         if (tr_message.className.indexOf('unread')!=-1) 
     112        if (tr_message && LTrim(tr_message.className).match('tr_msg_unread')) 
    121113                return false; 
    122114        else 
     
    316308         
    317309        if( document.getElementById('JabberMessenger')) 
    318         { 
    319                 msg_div.innerHTML  = '<div id="jabberWriteMsg"/>'; 
    320                 msg_div.innerHTML += '<table bgcolor="#f7f8fa" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><th width="40%"></th><th noWrap class="action_info_th">'+msg+'</th><th width="40%"></th></tr></tbody></table>'; 
    321                 loadscript.adIcon();                             
    322         } 
    323         else 
    324                 msg_div.innerHTML = '<table bgcolor="#f7f8fa" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><th width="40%"></th><th noWrap class="action_info_th">'+msg+'</th><th width="40%"></th></tr></tbody></table>'; 
     310                loadscript.adIcon(); 
     311 
     312        msg_div.innerHTML = '<table bgcolor="#f7f8fa" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><th width="40%"></th><th noWrap class="action_info_th">'+msg+'</th><th width="40%"></th></tr></tbody></table>'; 
    325313 
    326314        old_divStatusBar.style.display = 'none'; 
     
    697685 
    698686function add_className(obj, className){ 
    699         if (!exist_className(obj, className)) 
     687        if (obj && !exist_className(obj, className)) 
    700688                obj.className = obj.className + ' ' + className; 
    701689} 
     
    708696 
    709697function exist_className(obj, className){ 
    710         if ( obj && obj.className.indexOf(className) != -1 ) 
    711                 return true; 
    712         return false; 
     698        return ( obj && obj.className.indexOf(className) != -1 ) 
    713699} 
    714700 
Note: See TracChangeset for help on using the changeset viewer.