Changeset 23 for trunk/expressoAdmin1_2/js
- Timestamp:
- 05/07/07 15:06:04 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/js/jscode/maillists.js
r2 r23 14 14 return; 15 15 } 16 17 uid_tmp = document.forms[0].uid.value.split("-"); 18 if ((uid_tmp.length < 3) || (uid_tmp[0] != 'lista')){ 19 alert( 20 'O campo LOGIN da lista está incompleto.\n' + 21 'O nome da lista deve ser formado assim:\n' + 22 'lista-ORGANIZACAO-NOME_DA_LISTA.\n' + 23 'Ex: lista-celepar-rh.'); 24 return; 16 17 if (document.forms[0].restrictionsOnEmailLists.value == 'true') 18 { 19 uid_tmp = document.forms[0].uid.value.split("-"); 20 if ((uid_tmp.length < 3) || (uid_tmp[0] != 'lista')){ 21 alert( 22 'O campo LOGIN da lista está incompleto.\n' + 23 'O nome da lista deve ser formado assim:\n' + 24 'lista-ORGANIZACAO-NOME_DA_LISTA.\n' + 25 'Ex: lista-celepar-rh.'); 26 return; 27 } 25 28 } 26 29 … … 109 112 } 110 113 114 function save_scl() 115 { 116 select_users_SCL_Maillist = document.getElementById('ea_select_users_SCL_Maillist'); 117 // Needed select all options from select 118 for(var i=0; i<select_users_SCL_Maillist.options.length; i++) 119 select_users_SCL_Maillist.options[i].selected = true; 120 121 cExecuteForm ("$this.maillist.save_scl", document.forms[0], handler_save_scl); 122 } 123 function handler_save_scl(data) 124 { 125 return_handler_save_scl(data); 126 } 127 128 function return_handler_save_scl(data) 129 { 130 if (!data.status) 131 alert(data.msg); 132 else 133 alert('Sending Control List salva com êxito!!'); 134 location.href="./index.php?menuaction=expressoAdmin1_2.uimaillists.list_maillists"; 135 return; 136 } 111 137 112 138 function sinc_combos_org(context, recursive) … … 162 188 return; 163 189 } 164 cExecute ('$this.ldap_functions.get_available_users_and_maillist&context='+context+'&recursive='+recursive , handler_get_available_users);190 cExecute ('$this.ldap_functions.get_available_users_and_maillist&context='+context+'&recursive='+recursive+'&denied_uidnumber='+document.forms[0].uidnumber.value, handler_get_available_users); 165 191 } 166 192 … … 219 245 } 220 246 247 function add_user2scl_maillist() 248 { 249 select_available_users = document.getElementById('ea_select_available_users'); 250 select_usersInMaillist = document.getElementById('ea_select_users_SCL_Maillist'); 251 252 var count_available_users = select_available_users.length; 253 var count_usersInMailList = select_usersInMaillist.options.length; 254 var new_options = ''; 255 256 for (i = 0 ; i < count_available_users ; i++) 257 { 258 if (select_available_users.options[i].selected) 259 { 260 if(document.all) 261 { 262 if ( (select_usersInMaillist.innerHTML.indexOf('value='+select_available_users.options[i].value)) == '-1' ) 263 { 264 new_options += "<option value=" 265 + select_available_users.options[i].value 266 + ">" 267 + select_available_users.options[i].text 268 + "</options>"; 269 } 270 } 271 else 272 { 273 if ( (select_usersInMaillist.innerHTML.indexOf('value="'+select_available_users.options[i].value+'"')) == '-1' ) 274 { 275 new_options += "<option value=" 276 + select_available_users.options[i].value 277 + ">" 278 + select_available_users.options[i].text 279 + "</options>"; 280 } 281 } 282 } 283 } 284 285 if (new_options != '') 286 { 287 select_usersInMaillist.innerHTML = '#' + new_options + select_usersInMaillist.innerHTML; 288 select_usersInMaillist.outerHTML = select_usersInMaillist.outerHTML; 289 } 290 } 291 292 function remove_user2scl_maillist() 293 { 294 select_usersInMaillist = document.getElementById('ea_select_users_SCL_Maillist'); 295 296 for(var i = 0;i < select_usersInMaillist.options.length; i++) 297 if(select_usersInMaillist.options[i].selected) 298 select_usersInMaillist.options[i--] = null; 299 } 300 301 221 302 // Variaveis Locais 222 303 if (document.getElementById('ea_select_available_users')) … … 240 321 finderTimeout = setTimeout("optionFinder('"+obj.id+"')",500); 241 322 } 242 function optionFinder(id) { 323 function optionFinder(id) { 243 324 var oWait = document.getElementById("ea_span_searching"); 244 325 var oText = document.getElementById(id); … … 246 327 //Limpa todo o select 247 328 var select_available_users_tmp = document.getElementById('ea_select_available_users') 329 248 330 for(var i = 0;i < select_available_users_tmp.options.length; i++) 249 331 select_available_users_tmp.options[i--] = null; 250 332 251 333 var RegExp_name = new RegExp("\\b"+oText.value, "i"); 252 334 253 335 //Inclui usuário começando com a pesquisa 254 for(i = 0; i < select_available_users_clone.length; i++){ 255 if ( RegExp_name.test(select_available_users_clone[i].text))336 for(i = 0; i < select_available_users_clone.length; i++){ 337 if ( RegExp_name.test(select_available_users_clone[i].text) || (select_available_users_clone[i].value == -1) ) 256 338 { 257 339 sel = select_available_users_tmp.options; 258 option = new Option(select_available_users_clone[i].text,select_available_users_clone[i].value); 340 option = new Option(select_available_users_clone[i].text,select_available_users_clone[i].value); 341 342 if (select_available_users_clone[i].value == -1) 343 option.disabled = true; 344 259 345 sel[sel.length] = option; 260 346 }
Note: See TracChangeset
for help on using the changeset viewer.