/******************************************************************************\ |************************** MODULO AGENDA *******************************| |********** SCRIPT REFERENTE A CAIXA DE INCLUSAO DE PARTICIPANTES ************| \******************************************************************************/ // Variaveis Locais var select_in = document.getElementById('user_list'); var select_out = document.getElementById('user_list_in'); var users_out = select_out ? select_out.cloneNode(true) : ''; var finderTimeout = ''; // Funcoes function sChangeHour(pSelect) { if(pSelect.selectedIndex < 1) return; var hour = pSelect.options[pSelect.selectedIndex].value; var sHour = hour.split(':'); var hHour,mHour; if(pSelect.name == 'sEndHour') { hHour = document.getElementById('end_hour'); mHour = document.getElementById('end_minute'); } else if(pSelect.name == 'sStartHour') { hHour = document.getElementById('start_hour'); mHour = document.getElementById('start_minute'); } hHour.value = sHour[0]; mHour.value = sHour[1]; } function showExParticipants(el,path){ document.getElementById('tbl_ext_participants').style.display=''; el.style.display='none'; } function hideExParticipants(el,path){ document.getElementById('a_ext_participants').style.display = ''; document.getElementById('tbl_ext_participants').style.display ='none'; } function optionFinderTimeout(obj){ clearTimeout(finderTimeout); var oWait = document.getElementById("wait"); oWait.innerHTML = 'Buscando...'; finderTimeout = setTimeout("optionFinder('"+obj.id+"')",500); } function optionFinder(id) { var oWait = document.getElementById("wait"); var oText = document.getElementById(id); for(var i = 0;i < select_out.options.length; i++) select_out.options[i--] = null; for(i = 0; i < users_out.length; i++){ if(users_out[i].text.substring(0 ,oText.value.length).toUpperCase() == oText.value.toUpperCase()) { sel = select_out.options; option = new Option(users_out[i].text,users_out[i].value); sel[sel.length] = option; } } oWait.innerHTML = ' '; } function rem() { for(var i = 0;i < select_in.options.length; i++) if(select_in.options[i].selected) select_in.options[i--] = null; } function show_disponibility() { participants = ""; combo = document.getElementById('user_list'); if(combo.length==0) { var msg_ = document.getElementById("set_participants").value; alert(msg_); return; } for (i=0;i