Changeset 2437 for sandbox/jabberit_messenger/trophy_expresso/js/AddUser.js
- Timestamp:
- 04/06/10 18:13:32 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/jabberit_messenger/trophy_expresso/js/AddUser.js
r2421 r2437 4 4 var conn = null; 5 5 6 function addContact s()6 function addContact() 7 7 { 8 8 var jidFrom = loadIM.getUserCurrent().jid; … … 11 11 var group = document.getElementById('user_group_jabberIM').value; 12 12 13 alert( jidFrom + "\n" + jidTo + "\n" + name + "\n" + group ); 14 15 //TrophyIM.addContacts( jidFrom, jidTo, name, group ); 16 13 TrophyIM.addContact( jidFrom, jidTo, name, group ); 14 15 _winBuild('add_user_info','remove'); 17 16 } 18 17 … … 74 73 var element = ( Element.target ) ? Element.target : Element.srcElement; 75 74 var infoUser = null; 75 var img = document.createElement('img'); 76 76 77 77 if( element.getAttribute('value') ) … … 85 85 'group' : element.getAttribute('ou'), 86 86 'name' : element.getAttribute('name').substring( 0, element.getAttribute('name').indexOf(' ')), 87 'ou' : element.getAttribute('ou'), 88 'selectBoxOptions' : "grupo1; grupo2; grupo3", 87 89 'uid' : element.getAttribute('value').substring( element.getAttribute('value').indexOf(';') + 1 ) 88 90 }; … … 97 99 'lang_name_contact' : "Contato", 98 100 'group' : element.parentNode.getAttribute('ou'), 99 'name' : element.parentNode.getAttribute('name').substring( 0, element.parentNode.getAttribute('name').indexOf(' ')), 101 'name' : element.parentNode.getAttribute('name').substring( 0, element.parentNode.getAttribute('name').indexOf(' ')), 102 'ou' : element.parentNode.getAttribute('ou'), 103 'selectBoxOptions' : "grupo1; grupo2; grupo3", 100 104 'uid' : element.parentNode.getAttribute('value').substring( element.parentNode.getAttribute('value').indexOf(';') + 1) 101 105 }; … … 105 109 { 106 110 id_window : "add_user_info", 107 width : 3 55,111 width : 370, 108 112 height : 190, 109 113 top : 85, … … 126 130 'lang2' : 'Fechar', 127 131 'onclickClose' : '_winBuild("' + winAddUser.id_window + '","remove");', 128 'onclickSubmit' : 'loadIM.addContact s(this);'132 'onclickSubmit' : 'loadIM.addContact(this);' 129 133 }; 130 134 131 document.getElementById('buttons_adduser').innerHTML = Xtools.parse(Xtools.xml('buttons_main'), 'buttons.xsl', _pButtons); 135 // Add Buttons 136 document.getElementById('buttons_adduser').innerHTML = Xtools.parse(Xtools.xml('buttons_main'), 'buttons.xsl', _pButtons); 137 138 // Select Editable 139 loadIM.setSelectEditable(document.getElementById('user_group_jabberIM')); 140 141 if( element.style.backgroundImage ) 142 { 143 var _img = element.cloneNode( false ); 144 _img.style.width = '60px'; 145 _img.style.height = '80px'; 146 _img.style.display = 'block'; 147 _img.style.backgroundRepeat = 'no-repeat'; 148 149 } 150 else 151 { 152 var _img = document.createElement("img"); 153 _img.style.width = '60px'; 154 _img.style.height = '80px'; 155 _img.style.display = 'block'; 156 _img.src = path_jabberit + "templates/default/images/photo.png"; 157 } 158 159 with ( document.getElementById('photo_user_ldap_jabber') ) 160 { 161 if( hasChildNodes( ) ) 162 while( hasChildNodes( ) ) 163 { 164 removeNode( firstChild ); 165 } 166 167 appendChild( _img ); 168 } 169 132 170 } 133 171 … … 160 198 161 199 _winBuild( windAddUser ); 200 162 201 } 163 202 … … 171 210 } 172 211 173 loadAddUser.prototype.add = addContact s;212 loadAddUser.prototype.add = addContact; 174 213 loadAddUser.prototype.search = search; 175 214 loadAddUser.prototype.show = showForm;
Note: See TracChangeset
for help on using the changeset viewer.