Changeset 792 for trunk/jabberit_messenger/js/ldap.js
- Timestamp:
- 05/05/09 17:19:56 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jabberit_messenger/js/ldap.js
r697 r792 4 4 var _xtools; 5 5 var _window; 6 var _myWindow; 6 7 7 8 function _add_user() 8 9 { 10 if( arguments.length > 0 ) 11 { 12 _myWindow = arguments[0]; 13 } 14 9 15 var _win_add = _window.load('add_user_im'); 10 16 _win_add.title('.:: Adicionar Novos Contatos ::.'); … … 51 57 _name.previousSibling.style.color = "#000"; 52 58 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 ) 60 60 { 61 61 _name.value = _name.value.replace(/^( )*|( )*$/g, ''); … … 98 98 { 99 99 100 var result; 100 101 _name.parentNode.style.display = 'none'; 101 102 _name.parentNode.nextSibling.style.display = 'none'; 102 103 _status.innerHTML = '<br/>Adicionando contato, aguarde....<br/>'; 103 104 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 114 120 _name.value = ''; 115 121 _group.value = ''; … … 185 191 186 192 var _name = document.getElementById('im_name'); 193 var groups = ""; 194 var data; 187 195 188 196 var first_name = document.getElementById(m).innerHTML; … … 195 203 _name.parentNode.nextSibling.nextSibling.innerHTML = ''; 196 204 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 if( data ) 227 { 228 document.getElementById('im_group').setAttribute('selectBoxOptions', data); 229 230 if( document.getElementById('selectBox0') == null ) 231 editS.create(document.getElementById('im_group')); 232 } 233 234 document.getElementById('__span_load_im_group').style.display = 'none'; 212 235 document.getElementById('im_group').value = ''; 213 236 document.getElementById('im_group').focus(); … … 228 251 _member = _member.nextSibling; 229 252 } 230 231 253 } 232 254 … … 280 302 function LDAP() 281 303 { 282 _conn 283 _xtools 284 _window 304 _conn = arguments[0]; 305 _xtools = arguments[1]; 306 _window = arguments[2]; 285 307 } 286 308
Note: See TracChangeset
for help on using the changeset viewer.