[5307] | 1 | /* |
---|
| 2 | * Funções não liberadas. |
---|
| 3 | * |
---|
| 4 | */ |
---|
| 5 | /* |
---|
| 6 | function showDown(evt) { |
---|
| 7 | evt = (evt) ? evt : ((event) ? event : null); |
---|
| 8 | if (evt) { |
---|
| 9 | // alert(evt.keyCode); |
---|
| 10 | |
---|
| 11 | if (navigator.appName=="Netscape") { |
---|
| 12 | if (evt.which == 116) { |
---|
| 13 | // When F5 is pressed |
---|
| 14 | cancelKey(evt); |
---|
| 15 | } else if (evt.ctrlKey && (evt.which == 82)) { |
---|
| 16 | // When ctrl is pressed with R or N |
---|
| 17 | cancelKey(evt); |
---|
| 18 | } |
---|
| 19 | } else { |
---|
| 20 | if (event.keyCode == 116) { |
---|
| 21 | // When F5 is pressed |
---|
| 22 | cancelKey(evt); |
---|
| 23 | } else if (event.ctrlKey && (event.keyCode == 78 || event.keyCode == 82)) { |
---|
| 24 | // When ctrl is pressed with R or N |
---|
| 25 | cancelKey(evt); |
---|
| 26 | } |
---|
| 27 | } |
---|
| 28 | } |
---|
| 29 | |
---|
| 30 | } |
---|
| 31 | |
---|
| 32 | function cancelKey(evt) { |
---|
| 33 | if (evt.preventDefault) { |
---|
| 34 | evt.preventDefault(); |
---|
| 35 | return false; |
---|
| 36 | } else { |
---|
| 37 | evt.keyCode = 0; |
---|
| 38 | evt.returnValue = false; |
---|
| 39 | } |
---|
| 40 | } */ |
---|
| 41 | |
---|
| 42 | /*TECLA t NÃO FUNCIONAVA. |
---|
| 43 | * if (navigator.appName=="Netscape") document.addEventListener("keypress",showDown,true); |
---|
| 44 | * */ |
---|
| 45 | //document.onkeydown = showDown; |
---|
| 46 | |
---|
| 47 | /* |
---|
| 48 | function iUtilsValidachecks(frm,prefixo){ |
---|
| 49 | ret = false; |
---|
| 50 | for (var i=1;i<frm.elements.length;i++) { |
---|
| 51 | var e = frm.elements[i]; |
---|
| 52 | if ((e.name.substring(0,prefixo.length + 1) == (prefixo + "["))){ |
---|
| 53 | if (e.checked) { ret = true; } |
---|
| 54 | } |
---|
| 55 | } |
---|
| 56 | return ret; |
---|
| 57 | } |
---|
| 58 | */ |
---|
| 59 | function iUtilsSelecionachecks(check,frm,prefixo){ |
---|
| 60 | for (var i=1;i<frm.elements.length;i++) { |
---|
| 61 | var e = frm.elements[i]; |
---|
| 62 | if ((e.name.substring(0,prefixo.length + 1) == (prefixo + "["))){ |
---|
| 63 | e.checked = check; |
---|
| 64 | } |
---|
| 65 | } |
---|
| 66 | } |
---|
| 67 | |
---|
| 68 | /* |
---|
| 69 | function iUtilsMudaOrdem(formpesquisa,acao,novaordem,ordematual,tipo) { |
---|
| 70 | if (novaordem == ordematual) { |
---|
| 71 | if ((tipo == 'desc') || (tipo == '')) { |
---|
| 72 | novotipo = 'asc'; |
---|
| 73 | } else { |
---|
| 74 | novotipo = 'desc'; |
---|
| 75 | } |
---|
| 76 | } else { |
---|
| 77 | novotipo = 'asc'; |
---|
| 78 | } |
---|
| 79 | document.getElementById(formpesquisa.name + "_acao").value = acao; |
---|
| 80 | document.getElementById(formpesquisa.name + "_ordem").value = novaordem; |
---|
| 81 | document.getElementById(formpesquisa.name + "_ordemtipo").value = novotipo; |
---|
| 82 | formpesquisa.submit(); |
---|
| 83 | } |
---|
| 84 | |
---|
| 85 | function iUtilsVisibilidadeQuadro(idquadro,visible) { |
---|
| 86 | if (visible == true) { |
---|
| 87 | visibility = ""; |
---|
| 88 | } else { |
---|
| 89 | visibility = "none"; |
---|
| 90 | } |
---|
| 91 | quadro = document.getElementById("quadro_" + idquadro); |
---|
| 92 | if (quadro != null) { |
---|
| 93 | quadro.style.display = visibility; |
---|
| 94 | } |
---|
| 95 | } |
---|
| 96 | |
---|
| 97 | function iUtilsOcultaQuadro(idquadro) { |
---|
| 98 | iUtilsVisibilidadeQuadro(idquadro,false) |
---|
| 99 | } |
---|
| 100 | |
---|
| 101 | function iUtilsExibeQuadro(idquadro) { |
---|
| 102 | iUtilsVisibilidadeQuadro(idquadro,true) |
---|
| 103 | } |
---|
| 104 | */ |
---|
| 105 | |
---|
| 106 | |
---|
| 107 | function formUtilExibeImgAjax(campos) { |
---|
| 108 | campos_array = campos.split(","); |
---|
| 109 | i = 0; |
---|
| 110 | while (i < campos_array.length){ |
---|
| 111 | img = document.getElementById("imgAjax_" + campos_array[i]); |
---|
| 112 | if (img != null) { |
---|
| 113 | img.style.display = ""; |
---|
| 114 | } |
---|
| 115 | i = i + 1; |
---|
| 116 | } |
---|
| 117 | /*img = document.getElementById("imgAjax_" + idcampo); |
---|
| 118 | if (img != null) { |
---|
| 119 | img.style.display = ""; |
---|
| 120 | }*/ |
---|
| 121 | } |
---|
| 122 | |
---|
| 123 | function formUtilOcultaImgAjax(campos) { |
---|
| 124 | campos_array = campos.split(","); |
---|
| 125 | i = 0; |
---|
| 126 | while (i < campos_array.length){ |
---|
| 127 | img = document.getElementById("imgAjax_" + campos_array[i]); |
---|
| 128 | if (img != null) { |
---|
| 129 | img.style.display = "none"; |
---|
| 130 | } |
---|
| 131 | i = i + 1; |
---|
| 132 | } |
---|
| 133 | } |
---|
| 134 | |
---|
| 135 | function formUtilOcultaCampos(campos) { |
---|
| 136 | campos_array = campos.split(","); |
---|
| 137 | |
---|
| 138 | i = 0; |
---|
| 139 | while (i < campos_array.length){ |
---|
| 140 | formUtilVisibilidadeCampo(campos_array[i],false); |
---|
| 141 | i = i + 1; |
---|
| 142 | } |
---|
| 143 | } |
---|
| 144 | |
---|
| 145 | function formUtilExibeCampos(campos) { |
---|
| 146 | campos_array = campos.split(","); |
---|
| 147 | i = 0; |
---|
| 148 | while (i < campos_array.length){ |
---|
| 149 | formUtilVisibilidadeCampo(campos_array[i],true); |
---|
| 150 | i = i + 1; |
---|
| 151 | } |
---|
| 152 | } |
---|
| 153 | |
---|
| 154 | |
---|
| 155 | function formUtilVisibilidadeCampo(idcampo,visible) { |
---|
| 156 | var campo = null; |
---|
| 157 | campo = document.getElementById("id_" + idcampo); |
---|
| 158 | if (visible == true) { |
---|
| 159 | visibility = ""; |
---|
| 160 | } else { |
---|
| 161 | visibility = "none"; |
---|
| 162 | } |
---|
| 163 | if (campo != null) { |
---|
| 164 | campo.style.display = visibility; |
---|
| 165 | } else { |
---|
| 166 | campo = document.getElementById("not_id_" + idcampo); |
---|
| 167 | if (campo) { |
---|
| 168 | campo.style.display = visibility; |
---|
| 169 | } |
---|
| 170 | } |
---|
| 171 | inforight = document.getElementById("id_info_" + idcampo); |
---|
| 172 | if (inforight) { |
---|
| 173 | inforight.style.display = visibility; |
---|
| 174 | } |
---|
| 175 | label = document.getElementById("id_lbl_" + idcampo); |
---|
| 176 | if (label) { |
---|
| 177 | label.style.display = visibility; |
---|
| 178 | } |
---|
| 179 | ckbox = document.getElementById("not_div_ckbox_" + idcampo); |
---|
| 180 | if (ckbox) { |
---|
| 181 | ckbox.style.display = visibility; |
---|
| 182 | } |
---|
| 183 | ckbox = document.getElementById("div_ckbox_" + idcampo); |
---|
| 184 | if (ckbox) { |
---|
| 185 | ckbox.style.display = visibility; |
---|
| 186 | } |
---|
| 187 | imgcalendar = document.getElementById("id_imgcal_" + idcampo + "_inicio"); |
---|
| 188 | if (imgcalendar) { |
---|
| 189 | imgcalendar.style.display = visibility; |
---|
| 190 | } |
---|
| 191 | imgcalendar = document.getElementById("id_imgcal_" + idcampo + "_fim"); |
---|
| 192 | if (imgcalendar) { |
---|
| 193 | imgcalendar.style.display = visibility; |
---|
| 194 | } |
---|
| 195 | } |
---|