Ignore:
Timestamp:
04/28/09 17:15:52 (15 years ago)
Author:
niltonneto
Message:

Resolve #475

Location:
sandbox/expresso/novos_templates
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • sandbox/expresso/novos_templates

    • Property svn:ignore set to
      header.inc.php
      .svnignore
  • sandbox/expresso/novos_templates/jabberit_messenger/js/ldap.js

    r697 r773  
    44        var _xtools; 
    55        var _window; 
     6        var _myWindow; 
    67 
    78        function _add_user() 
    89        { 
     10                if( arguments.length > 0 ) 
     11                { 
     12                        _myWindow = arguments[0]; 
     13                } 
     14                 
    915                var _win_add = _window.load('add_user_im'); 
    1016                        _win_add.title('.:: Adicionar Novos Contatos ::.'); 
     
    5157                                _name.previousSibling.style.color = "#000"; 
    5258 
    53                                 if ( !_jid ) 
    54                                 { 
    55                                         _status.innerHTML = 'Selecione uma organização no campo da esquerda e em<br/>' 
    56                                                                                 + ' seguida, no campo da direita, um membro da organização<br/>' 
    57                                                                                 + ' para adicionar como contato'; 
    58                                 } 
    59                                 else 
     59                                if ( _jid ) 
    6060                                { 
    6161                                        _name.value = _name.value.replace(/^( )*|( )*$/g, ''); 
     
    9898                                                                        {        
    9999                                                                                 
     100                                                                                var result; 
    100101                                                                                _name.parentNode.style.display = 'none'; 
    101102                                                                                _name.parentNode.nextSibling.style.display = 'none'; 
    102103                                                                                _status.innerHTML = '<br/>Adicionando contato, aguarde....<br/>'; 
    103104                                 
    104                                                                                 _conn.go( 
    105                                                                                         '$this.ujabber.AddNewContact', 
    106                                                                                         function() 
    107                                                                                         { 
    108                                                                                                 _status.innerHTML = '<br/>Contato adicionado !<br/>'; 
    109                                                                                                 setTimeout('cleanStatusAddContactIM();',2500); 
    110                                                                                         }, 
    111                                                                                         'uid='+_uid+'&name='+_name.value+'&group='+_group.value 
    112                                                                                 ); 
    113  
     105                                                                                if( elementIframe = document.getElementById('iframe_applet_jabberit') ) 
     106                                                                                { 
     107                                                                                        if( !is_ie ) 
     108                                                                                                result = elementIframe.contentDocument.applets[0].addContact( _uid, _name.value, _group.value ); 
     109                                                                                        else 
     110                                                                                                result = elementIframe.contentWindow.document.applets[0].addContact( _uid, _name.value, _group.value ); 
     111                                                                                } 
     112                                                                                else // If Pop-Up 
     113                                                                                { 
     114                                                                                        result = _myWindow.document.applets[0].addContact( _uid, _name.value, _group.value ); 
     115                                                                                } 
     116 
     117                                                                                _status.innerHTML = '<br/>Contato adicionado !<br/>'; 
     118                                                                                setTimeout('cleanStatusAddContactIM();',2500); 
     119                                                                                 
    114120                                                                                _name.value = ''; 
    115121                                                                                _group.value = ''; 
     
    185191                                 
    186192                                var _name = document.getElementById('im_name'); 
     193                                var groups = ""; 
     194                                var data; 
    187195 
    188196                                var first_name = document.getElementById(m).innerHTML; 
     
    195203                                        _name.parentNode.nextSibling.nextSibling.innerHTML = ''; 
    196204                                 
    197                                 _conn.go('$this.ujabber.getGroupsJabber', 
    198                                                 function(data) 
    199                                                 { 
    200                                                         if( data = data.replace(/(^\s*)|(\s*$)/g,'')) 
    201                                                         { 
    202                                                                 var _group = document.getElementById('im_group'); 
    203                                                                 var _groupOptions = ''; 
    204  
    205                                                                 _group.setAttribute('selectBoxOptions', data); 
    206                                                                 if( document.getElementById('selectBox0') == null) 
    207                                                                         editS.create(document.getElementById('im_group')); 
    208                                                         } 
    209                                                         document.getElementById('__span_load_im_group').style.display = 'none'; 
    210                                                 }); 
    211  
     205                                // If Layer; 
     206                                if( elementIframe = document.getElementById('iframe_applet_jabberit') ) 
     207                                { 
     208                                        if( !is_ie ) 
     209                                                groups = elementIframe.contentDocument.applets[0].getGroupsToExpresso(); 
     210                                        else 
     211                                                groups = elementIframe.contentWindow.document.applets[0].getGroupsToExpresso(); 
     212                                } 
     213                                else // If Pop-Up 
     214                                { 
     215                                        groups = _myWindow.document.applets[0].getGroupsToExpresso(); 
     216                                } 
     217                 
     218                                if( typeof(groups) == 'object') 
     219                                { 
     220                                        data = groups + ";"; 
     221                                        data = data.substring(0,(data.length-2)); 
     222                                } 
     223                                else                     
     224                                        data = groups.substring(0,(groups.length-1)); 
     225                                 
     226                                document.getElementById('im_group').setAttribute('selectBoxOptions', data); 
     227                                 
     228                                if( document.getElementById('selectBox0') == null ) 
     229                                        editS.create(document.getElementById('im_group')); 
     230 
     231                                document.getElementById('__span_load_im_group').style.display = 'none'; 
    212232                                document.getElementById('im_group').value = ''; 
    213233                                document.getElementById('im_group').focus(); 
     
    228248                                _member = _member.nextSibling; 
    229249                        } 
    230                  
    231250                } 
    232251 
     
    280299        function LDAP() 
    281300        { 
    282                 _conn = arguments[0]; 
    283                 _xtools = arguments[1]; 
    284                 _window = arguments[2]; 
     301                _conn           = arguments[0]; 
     302                _xtools         = arguments[1]; 
     303                _window         = arguments[2]; 
    285304        } 
    286305 
Note: See TracChangeset for help on using the changeset viewer.