Commit 24f17860707f692a8ce5bb50cf0d411750b363e0
1 parent
67610c97
Exists in
master
Removido código desnecessário
Showing
1 changed file
with
0 additions
and
353 deletions
Show diff stats
ieducar/intranet/scripts/padrao.js
... | ... | @@ -57,17 +57,6 @@ function setFocus(campo) |
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
60 | - * @TODO Remover função, sem chamadas no i-Educar. | |
61 | - */ | |
62 | -function openfotoagricultura(foto, altura, largura) | |
63 | -{ | |
64 | - abrir = 'visualizarfotoagricultura.php?id_foto=' + foto; | |
65 | - apr = 'width=' + altura + ', height=' + largura + ', scrollbars=no, top=10, left=10'; | |
66 | - var foto_ = window.open(abrir, 'JANELA_FOTO', apr); | |
67 | - foto_.focus(); | |
68 | -} | |
69 | - | |
70 | -/** | |
71 | 60 | * @TODO Remover função, chamadas no i-Educar comentadas (código nunca invocado). |
72 | 61 | * Remover também o código legado que o referencia, funcionalidades inúteis. |
73 | 62 | * Ver: $ egrep -rn 'openurl[ ]{0,3}\(' intranet/ |
... | ... | @@ -78,21 +67,6 @@ function openurl(url) |
78 | 67 | } |
79 | 68 | |
80 | 69 | /** |
81 | - * @TODO Remover função, sem chamadas no i-Educar. | |
82 | - */ | |
83 | -function openurlmaximized(url) | |
84 | -{ | |
85 | - var janela = window.open(url, 'PROCURAR', | |
86 | - 'status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=yes, fullscreen=yes, scrollbars=yes' | |
87 | - ); | |
88 | - | |
89 | - janela.innerWidth = screen.width; | |
90 | - janela.innerHeight = screen.height; | |
91 | - janela.screenX = 0; | |
92 | - janela.screenY = 0; | |
93 | -} | |
94 | - | |
95 | -/** | |
96 | 70 | * @TODO Remover função, chamadas no i-Educar são em código legado em |
97 | 71 | * funcionalidades inúteis. |
98 | 72 | * Ver: $ egrep -rn 'retorna[ ]{0,3}\(' intranet/ |
... | ... | @@ -130,100 +104,6 @@ function insereSubmitLista() |
130 | 104 | } |
131 | 105 | |
132 | 106 | /** |
133 | - * @TODO Remover função, sem chamadas no i-Educar. | |
134 | - */ | |
135 | -function insereSubmitNomeArquivo(nome) | |
136 | -{ | |
137 | - if (document.getElementById(nome).value) { | |
138 | - document.getElementById('tipoacao').value = ''; | |
139 | - document.getElementById('formcadastro').submit(); | |
140 | - } | |
141 | - else { | |
142 | - alert('Por favor insira um nome para o arquivo'); | |
143 | - } | |
144 | -} | |
145 | - | |
146 | -/** | |
147 | - * @TODO Remover função, sem chamadas no i-Educar. | |
148 | - */ | |
149 | -function insereSubmitValor(valor, campo) | |
150 | -{ | |
151 | - document.getElementById(campo).value = valor; | |
152 | - document.getElementById('tipoacao').value = ''; | |
153 | - | |
154 | - document.getElementById('formcadastro').submit(); | |
155 | -} | |
156 | - | |
157 | -/** | |
158 | - * @TODO Remover função, sem chamadas no i-Educar. | |
159 | - */ | |
160 | -function reload(operador) | |
161 | -{ | |
162 | - if (document.getElementById('operador').value < 7) { | |
163 | - if (document.getElementById('valor').value != '') { | |
164 | - if (document.getElementById('logico').value != 0) { | |
165 | - document.getElementById('operador_logico').value = operador; | |
166 | - document.formcadastro.submit(); | |
167 | - } | |
168 | - } | |
169 | - else { | |
170 | - document.getElementById('logico_0').selected = true; | |
171 | - alert('Insira o valor'); | |
172 | - } | |
173 | - } | |
174 | - else { | |
175 | - document.getElementById('operador_logico').value = operador; | |
176 | - document.formcadastro.submit(); | |
177 | - } | |
178 | -} | |
179 | - | |
180 | -/** | |
181 | - * @TODO Remover função, sem chamadas no i-Educar. | |
182 | - */ | |
183 | -function meusdadosReload(tipo) | |
184 | -{ | |
185 | - document.getElementById('reloading').value = 1; | |
186 | - objSec = document.getElementById('f_ref_sec'); | |
187 | - objDep = document.getElementById('f_ref_dept'); | |
188 | - objSet = document.getElementById('f_ref_setor'); | |
189 | - | |
190 | - if (typeof objDep.selectedIndex == 'number' && tipo < 2) { | |
191 | - document.getElementById('f_ref_dept_0').selected = true; | |
192 | - } | |
193 | - | |
194 | - if (typeof objSet.selectedIndex == 'number' && tipo < 3) { | |
195 | - document.getElementById('f_ref_setor_0').selected = true; | |
196 | - } | |
197 | - | |
198 | - document.formcadastro.action = ''; | |
199 | - document.formcadastro.submit(); | |
200 | -} | |
201 | - | |
202 | -/** | |
203 | - * @TODO Remover função, sem chamadas no i-Educar. | |
204 | - */ | |
205 | -function meusdadosReload2(tipo) | |
206 | -{ | |
207 | - document.getElementById('reloading').value = 1; | |
208 | - | |
209 | - objSec = document.getElementById('f_ref_sec'); | |
210 | - objDep = document.getElementById('f_ref_dept'); | |
211 | - objSet = document.getElementById('f_ref_setor'); | |
212 | - | |
213 | - if (typeof objDep.selectedIndex == 'number' && tipo < 2) { | |
214 | - document.getElementById('f_ref_dept_0').selected = true; | |
215 | - } | |
216 | - | |
217 | - if (typeof objSet.selectedIndex == 'number' && tipo < 3) { | |
218 | - document.getElementById('f_ref_setor_0').selected = true; | |
219 | - } | |
220 | - | |
221 | - document.formcadastro.action = ''; | |
222 | - document.getElementById('TipoAcao').value = ''; | |
223 | - document.formcadastro.submit(); | |
224 | -} | |
225 | - | |
226 | -/** | |
227 | 107 | * @TODO Remover função após remover todos os arquivos legados não utilizados |
228 | 108 | * presentes no i-Educar. Ver: $ egrep -rn 'excluirSumit[ ]{0,3}\(' intranet/ |
229 | 109 | */ |
... | ... | @@ -241,48 +121,6 @@ function excluirSumit(id, nome_campo) |
241 | 121 | document.getElementById('formcadastro').submit(); |
242 | 122 | } |
243 | 123 | |
244 | -/** | |
245 | - * @TODO Remover função, sem chamadas no i-Educar. | |
246 | - */ | |
247 | -function excluirSumitAcervo(id, nome_campo, descricao) | |
248 | -{ | |
249 | - if (id && nome_campo) { | |
250 | - document.getElementById(nome_campo).value = id; | |
251 | - } | |
252 | - | |
253 | - if (id == 0) { | |
254 | - document.getElementById(nome_campo).value = '0'; | |
255 | - } | |
256 | - | |
257 | - document.getElementById('descricao').value = descricao; | |
258 | - document.getElementById('tipoacao').value = ''; | |
259 | - document.getElementById('formcadastro').submit(); | |
260 | -} | |
261 | - | |
262 | -/** | |
263 | - * @TODO Remover função, sem chamadas no i-Educar. | |
264 | - */ | |
265 | -function exclui_idpes(idpes, campo) | |
266 | -{ | |
267 | - document.getElementById(campo).value = idpes; | |
268 | - | |
269 | - document.getElementById('numero2').value = document.getElementById('numero').value; | |
270 | - document.getElementById('complemento2').value = document.getElementById('complemento').value; | |
271 | - document.getElementById('letra2').value = document.getElementById('letra').value; | |
272 | - document.getElementById('logradouro2').value = document.getElementById('logradouro').value; | |
273 | - document.getElementById('bairro2').value = document.getElementById('bairro').value; | |
274 | - document.getElementById('cidade2').value = document.getElementById('cidade').value; | |
275 | - document.getElementById('sigla_uf2').value = document.getElementById('sigla_uf').value; | |
276 | - document.getElementById('idtlog2').value = document.getElementById('idtlog').value; | |
277 | - document.getElementById('apartamento2').value = document.getElementById('apartamento').value; | |
278 | - document.getElementById('bloco2').value = document.getElementById('bloco').value; | |
279 | - document.getElementById('andar2').value = document.getElementById('andar').value; | |
280 | - document.getElementById('cep').value = document.getElementById('cep_').value; | |
281 | - document.getElementById('tipoacao').value = ''; | |
282 | - | |
283 | - document.getElementById('formcadastro').submit(); | |
284 | -} | |
285 | - | |
286 | 124 | |
287 | 125 | // Scripts originários de clsCampos.inc.php |
288 | 126 | |
... | ... | @@ -801,66 +639,6 @@ function ativaCampo(campo) |
801 | 639 | } |
802 | 640 | } |
803 | 641 | |
804 | -/** | |
805 | - * @TODO Remover função, sem chamadas no i-Educar. | |
806 | - */ | |
807 | -function trocaConteudo(obj, conteudo) | |
808 | -{ | |
809 | - if (typeof obj.HTMLContent == 'string') { | |
810 | - obj.HTMLContent = conteudo; | |
811 | - } | |
812 | - else { | |
813 | - obj.innerHTML = conteudo; | |
814 | - } | |
815 | -} | |
816 | - | |
817 | -/** | |
818 | - * @TODO Remover função, sem chamadas no i-Educar. | |
819 | - */ | |
820 | -function LimpaSelect(campos) | |
821 | -{ | |
822 | - for (i = 0; i < campos.length; i++) { | |
823 | - ObjSelect = document.getElementById(campos[i]); | |
824 | - ObjSelect.options.length = 0; | |
825 | - ObjSelect.options[ObjSelect.options.length] = new Option ( | |
826 | - 'Selecione', '0', true, true | |
827 | - ); | |
828 | - } | |
829 | -} | |
830 | - | |
831 | -/** | |
832 | - * @TODO Remover função, sem chamadas no i-Educar. | |
833 | - */ | |
834 | -function coletaLocation(status, iptu) | |
835 | -{ | |
836 | - if (status == 2) { | |
837 | - if (confirm('Passar cadastro Nº' + iptu + ' para "Isento?"')) { | |
838 | - document.location = 'coleta_adesao_status.php?cod_adesao=' + iptu + '&status=' + status; | |
839 | - } | |
840 | - else { | |
841 | - return false; | |
842 | - } | |
843 | - } | |
844 | - | |
845 | - if (status == 1) { | |
846 | - if (confirm('Passar cadastro Nº' + iptu + ' para "Não Assinante?"')) { | |
847 | - document.location = 'coleta_adesao_status.php?cod_adesao=' + iptu + '&status=' + status; | |
848 | - } | |
849 | - else { | |
850 | - return false; | |
851 | - } | |
852 | - } | |
853 | - | |
854 | - if (status == 0) { | |
855 | - if (confirm('Passar cadastro Nº' + iptu + ' para "Assiante"?')) { | |
856 | - document.location = 'coleta_adesao_status.php?cod_adesao=' + iptu + '&status=' + status; | |
857 | - } | |
858 | - else { | |
859 | - return false; | |
860 | - } | |
861 | - } | |
862 | -} | |
863 | - | |
864 | 642 | function MenuCarregaDados(key, ordem, menu_pai, menu, submenu, titulo, ico_menu, |
865 | 643 | alvo, suprime_menu) |
866 | 644 | { |
... | ... | @@ -896,87 +674,6 @@ function MenuExcluiDado() |
896 | 674 | document.getElementById('formcadastro').submit(); |
897 | 675 | } |
898 | 676 | |
899 | -/** | |
900 | - * @TODO Remover função, sem chamadas no i-Educar. | |
901 | - */ | |
902 | -function insertAtCursor(myField, myValue) | |
903 | -{ | |
904 | - var ini = 0, fim = 0, tam = 0; | |
905 | - var pos = arguments[2]; | |
906 | - | |
907 | - // IE support | |
908 | - if (document.selection) { | |
909 | - myField.focus(); | |
910 | - sel = document.selection.createRange(); | |
911 | - sel.text = myValue; | |
912 | - } | |
913 | - | |
914 | - // Mozilla/Netscape support | |
915 | - else if (myField.selectionStart || myField.selectionStart == '0') { | |
916 | - var startPos = myField.selectionStart; | |
917 | - var endPos = myField.selectionEnd; | |
918 | - | |
919 | - ini = startPos; | |
920 | - fim = endPos; | |
921 | - tam = myValue.length; | |
922 | - | |
923 | - myField.value = myField.value.substring(0, startPos) + myValue + | |
924 | - myField.value.substring(endPos, myField.value.length); | |
925 | - | |
926 | - myField.selectionStart = pos ? ini + pos : ini + tam; | |
927 | - myField.selectionEnd = pos ? ini + pos : ini + tam; | |
928 | - | |
929 | - myField.focus(); | |
930 | - } | |
931 | - else { | |
932 | - myField.value += myValue; | |
933 | - } | |
934 | -} | |
935 | - | |
936 | -/** | |
937 | - * @TODO Remover função, sem chamadas no i-Educar. | |
938 | - */ | |
939 | -function ouvidoria_set_campo(campo, valor, texto) | |
940 | -{ | |
941 | - obj = parent.document.getElementById(campo); | |
942 | - novoIndice = obj.options.length; | |
943 | - | |
944 | - obj.options[novoIndice] = new Option(texto); | |
945 | - | |
946 | - opcao = obj.options[novoIndice]; | |
947 | - opcao.value = valor; | |
948 | - opcao.selected = true; | |
949 | - | |
950 | - window.parent.fechaExpansivel('div_dinamico_' + (parent.DOM_divs.length * 1 - 1)); | |
951 | - obj.onchange(); | |
952 | -} | |
953 | - | |
954 | -/** | |
955 | - * @TODO Remover função, sem chamadas no i-Educar. | |
956 | - */ | |
957 | -function vistoria_set_campo(campo1, valor1, campo2, valor2, campo3, valor3, campo4, valor4, campo5, valor5) | |
958 | -{ | |
959 | - obj1 = parent.document.getElementById(campo1); | |
960 | - obj1.value = valor1; | |
961 | - | |
962 | - obj2 = parent.document.getElementById(campo2); | |
963 | - obj2.value = valor2; | |
964 | - | |
965 | - obj3 = parent.document.getElementById(campo3 + '_'); | |
966 | - obj3.value = valor3; | |
967 | - | |
968 | - var cep_oculto = parent.document.getElementById(campo3); | |
969 | - cep_oculto.value = valor3.replace('-', ''); | |
970 | - | |
971 | - obj4 = parent.document.getElementById(campo4); | |
972 | - obj4.value = valor4; | |
973 | - | |
974 | - obj5 = parent.document.getElementById(campo5); | |
975 | - obj5.value = valor5; | |
976 | - | |
977 | - window.parent.fechaExpansivel('div_dinamico_' + (parent.DOM_divs.length * 1 - 1)); | |
978 | -} | |
979 | - | |
980 | 677 | // Exibe ou esconde um campo da tela |
981 | 678 | function setVisibility(f, visible) |
982 | 679 | { |
... | ... | @@ -1124,14 +821,6 @@ function cv_libera_campos(campo1, campo2, campo3, campo4, campo5, campo6, campo7 |
1124 | 821 | } |
1125 | 822 | } |
1126 | 823 | |
1127 | -/** | |
1128 | - * @TODO Remover função, sem chamadas no i-Educar. | |
1129 | - */ | |
1130 | -function setCampoFoco(campo) | |
1131 | -{ | |
1132 | - document.getElementById(campo).focus(); | |
1133 | -} | |
1134 | - | |
1135 | 824 | // Função a ser executada antes de fechar a janela. |
1136 | 825 | var exec = null; |
1137 | 826 | |
... | ... | @@ -1244,26 +933,6 @@ function enviar() |
1244 | 933 | window.close(); |
1245 | 934 | } |
1246 | 935 | |
1247 | -/** | |
1248 | - * @TODO Remover função, sem chamadas no i-Educar. | |
1249 | - */ | |
1250 | -function enviar2() { | |
1251 | - if ( | |
1252 | - (typeof arguments[0] != 'undefined') && | |
1253 | - (typeof arguments[1] != 'undefined') | |
1254 | - ) { | |
1255 | - window.parent.addVal(arguments[0], arguments[1]); | |
1256 | - } | |
1257 | - | |
1258 | - if (typeof arguments[2] != 'undefined') { | |
1259 | - window.parent.fechaExpansivel( | |
1260 | - 'div_dinamico_' + (parent.DOM_divs.length * 1 - 1) | |
1261 | - ); | |
1262 | - } | |
1263 | - | |
1264 | - window.parent.document.getElementById( 'formcadastro' ).submit(); | |
1265 | -} | |
1266 | - | |
1267 | 936 | function getElementsByClassName(oElm, strTagName, strClassName) |
1268 | 937 | { |
1269 | 938 | var arrElements = (strTagName == '*' && document.all) ? |
... | ... | @@ -1313,26 +982,4 @@ function addEvent_(evt, func, field) |
1313 | 982 | // IE |
1314 | 983 | field.attachEvent('on' + evt, func); |
1315 | 984 | } |
1316 | -} | |
1317 | - | |
1318 | -/** | |
1319 | - * @TODO Remover função, sem chamadas no i-Educar. | |
1320 | - */ | |
1321 | -function removeEvent(evt, func, field) | |
1322 | -{ | |
1323 | - if (! field) { | |
1324 | - field = window; | |
1325 | - } | |
1326 | - else { | |
1327 | - field = document.getElementById(field); | |
1328 | - } | |
1329 | - | |
1330 | - if (field.addEventListener) { | |
1331 | - // Mozilla | |
1332 | - field.removeEventListener(evt, null, false); | |
1333 | - } | |
1334 | - else if (field.detachEvent) { | |
1335 | - // IE | |
1336 | - field.detachEvent('on' + evt, func); | |
1337 | - } | |
1338 | 985 | } |
1339 | 986 | \ No newline at end of file | ... | ... |