Commit a9c109f781392f74ade95c11733603cc5c9816d0
1 parent
9fb2bce4
Exists in
master
Ajuste no tamanho do campo de entrada de filtros de letras
Showing
14 changed files
with
42 additions
and
15 deletions
Show diff stats
admin/html/editormapfile.html
| ... | ... | @@ -195,7 +195,7 @@ table.ygtvtable { |
| 195 | 195 | |
| 196 | 196 | ins += "<p><div id=filtroDeLetras ></div>"; |
| 197 | 197 | document.getElementById("letras").innerHTML = ins; |
| 198 | - core_listaDeLetras("filtroDeLetras", "filtraLetra"); | |
| 198 | + core_listaDeLetras("filtroDeLetras", "filtraLetra",false,300); | |
| 199 | 199 | document.getElementById("formulario").style.display = "block"; |
| 200 | 200 | initMenu(); |
| 201 | 201 | }; | ... | ... |
admin/js/arvore.js
| ... | ... | @@ -113,6 +113,7 @@ Monta a arvore de temas |
| 113 | 113 | */ |
| 114 | 114 | function montaArvore(dados) |
| 115 | 115 | { |
| 116 | + //TODO incluir filtro de grupos - nao colocar opcao de reordenamento se o filtro estiver ativo | |
| 116 | 117 | YAHOO.tree = new function() |
| 117 | 118 | { |
| 118 | 119 | tree = ""; |
| ... | ... | @@ -849,6 +850,11 @@ function gravaDados(tipo,id) |
| 849 | 850 | } |
| 850 | 851 | else{ |
| 851 | 852 | texto = document.getElementById("Eid_grupo"); |
| 853 | + if(texto.selectedIndex < 0){ | |
| 854 | + core_carregando("desativa"); | |
| 855 | + alert("Escolha um grupo"); | |
| 856 | + return; | |
| 857 | + } | |
| 852 | 858 | texto = texto.options[texto.selectedIndex].text; |
| 853 | 859 | } |
| 854 | 860 | no = tree.getNodeByProperty("id_n1",id); |
| ... | ... | @@ -870,6 +876,11 @@ function gravaDados(tipo,id) |
| 870 | 876 | } |
| 871 | 877 | else{ |
| 872 | 878 | texto = document.getElementById("Eid_subgrupo"); |
| 879 | + if(texto.selectedIndex < 0){ | |
| 880 | + core_carregando("desativa"); | |
| 881 | + alert("Escolha um subgrupo"); | |
| 882 | + return; | |
| 883 | + } | |
| 873 | 884 | texto = texto.options[texto.selectedIndex].text; |
| 874 | 885 | } |
| 875 | 886 | objpub = document.getElementById("Epublicado"); |
| ... | ... | @@ -888,6 +899,11 @@ function gravaDados(tipo,id) |
| 888 | 899 | if(tipo == "tema") |
| 889 | 900 | { |
| 890 | 901 | texto = document.getElementById("Eid_tema"); |
| 902 | + if(texto.selectedIndex < 0){ | |
| 903 | + core_carregando("desativa"); | |
| 904 | + alert("Escolha um tema"); | |
| 905 | + return; | |
| 906 | + } | |
| 891 | 907 | texto = texto.options[texto.selectedIndex].text; |
| 892 | 908 | |
| 893 | 909 | objpub = document.getElementById("Epublicado"); |
| ... | ... | @@ -904,10 +920,15 @@ function gravaDados(tipo,id) |
| 904 | 920 | |
| 905 | 921 | no.html = no.getContentEl().innerHTML; |
| 906 | 922 | } |
| 907 | - if(tipo == "raizmenu" || tipo == "raizgrupo") | |
| 923 | + if(tipo == "raizmenu" || tipo == "raizgrupo") | |
| 908 | 924 | { |
| 909 | 925 | obje = document.getElementById("Eid_tema"); |
| 910 | 926 | if(obje){ |
| 927 | + if(obje.selectedIndex < 0){ | |
| 928 | + core_carregando("desativa"); | |
| 929 | + alert("Escolha um tema"); | |
| 930 | + return; | |
| 931 | + } | |
| 911 | 932 | texto = obje.options[obje.selectedIndex].text; |
| 912 | 933 | no = tree.getNodeByProperty("id_raiz",id); |
| 913 | 934 | no.getContentEl().getElementsByTagName("span")[0].innerHTML = texto; | ... | ... |
admin/js/core.js
| ... | ... | @@ -623,7 +623,7 @@ function core_pegaMapfiles(funcaoM,letra,filtro,checaNomes,checaNames) |
| 623 | 623 | } |
| 624 | 624 | if(!funcaoM){ |
| 625 | 625 | funcaoM = ""; |
| 626 | - } | |
| 626 | + } | |
| 627 | 627 | if(!checaNomes){ |
| 628 | 628 | checaNomes = "false"; |
| 629 | 629 | } |
| ... | ... | @@ -1671,8 +1671,11 @@ function core_filtraLetrasCombo(id,letra){ |
| 1671 | 1671 | } |
| 1672 | 1672 | } |
| 1673 | 1673 | |
| 1674 | -function core_listaDeLetras(onde,nomeFuncao,semLetras){ | |
| 1674 | +function core_listaDeLetras(onde,nomeFuncao,semLetras,w){ | |
| 1675 | 1675 | //letraAtual guarda a ultima letra clicada |
| 1676 | + if(!w){ | |
| 1677 | + w = 40; | |
| 1678 | + } | |
| 1676 | 1679 | var o,i,ins= "<p><b>", |
| 1677 | 1680 | letras = ["Todos","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","X","Y","Z","_","1","2","3","4","5","6","7","8","9"], |
| 1678 | 1681 | nletras = letras.length; |
| ... | ... | @@ -1700,7 +1703,7 @@ function core_listaDeLetras(onde,nomeFuncao,semLetras){ |
| 1700 | 1703 | o = document.getElementById(onde); |
| 1701 | 1704 | if(o){ |
| 1702 | 1705 | if(!semLetras){ |
| 1703 | - o.innerHTML = "<fieldset style=padding:2px; class=letras ><form id=forminiciais ><p><b>Filtro: <input name='' onchange='' value='"+letraAtual+"' id=iniciaisLetras type=text style=width:40px;cursor:pointer /></form><div style=position:relative;top:1px; id='_listaDeLetras' >"+ins+"</div></b></fieldset>"; | |
| 1706 | + o.innerHTML = "<fieldset style=padding:2px; class=letras ><form id=forminiciais ><p><b>Filtro: <input name='' onchange='' value='"+letraAtual+"' id=iniciaisLetras type=text style=width:" + w + "px;cursor:pointer /></form><div style=position:relative;top:1px; id='_listaDeLetras' >"+ins+"</div></b></fieldset>"; | |
| 1704 | 1707 | } |
| 1705 | 1708 | else{ |
| 1706 | 1709 | o.innerHTML = "<form id=forminiciais >Iniciais: <input name='' onchange='' value='' id=iniciaisLetras type=text style=width:40px;cursor:pointer /></form>"; | ... | ... |
admin/js/editormapfile.js
admin/js/estat_conexao.js
| ... | ... | @@ -64,7 +64,7 @@ i3GEOadmin.conexao = { |
| 64 | 64 | if(i3GEOadmin.conexao.dados == ""){ |
| 65 | 65 | i3GEOadmin.conexao.dados = dados; |
| 66 | 66 | } |
| 67 | - core_listaDeLetras("letras","i3GEOadmin.conexao.filtra"); | |
| 67 | + core_listaDeLetras("letras","i3GEOadmin.conexao.filtra",false,300); | |
| 68 | 68 | YAHOO.example.InlineCellEditing = new function(){ |
| 69 | 69 | // Custom formatter for "address" column to preserve line breaks |
| 70 | 70 | var myDataSource = new YAHOO.util.DataSource(dados); | ... | ... |
admin/js/estat_fonteinfo.js
| ... | ... | @@ -53,7 +53,7 @@ i3GEOadmin.fonteinfo = { |
| 53 | 53 | if(i3GEOadmin.fonteinfo.dados == ""){ |
| 54 | 54 | i3GEOadmin.fonteinfo.dados = dados; |
| 55 | 55 | } |
| 56 | - core_listaDeLetras("letras","i3GEOadmin.fonteinfo.filtra"); | |
| 56 | + core_listaDeLetras("letras","i3GEOadmin.fonteinfo.filtra",false,300); | |
| 57 | 57 | YAHOO.example.InlineCellEditing = new function(){ |
| 58 | 58 | // Custom formatter for "address" column to preserve line breaks |
| 59 | 59 | var myDataSource = new YAHOO.util.DataSource(dados); | ... | ... |
admin/js/estat_tipo_periodo.js
| ... | ... | @@ -53,7 +53,7 @@ i3GEOadmin.periodo = { |
| 53 | 53 | if(i3GEOadmin.periodo.dados == ""){ |
| 54 | 54 | i3GEOadmin.periodo.dados = dados; |
| 55 | 55 | } |
| 56 | - core_listaDeLetras("letras","i3GEOadmin.periodo.filtra"); | |
| 56 | + core_listaDeLetras("letras","i3GEOadmin.periodo.filtra",false,300); | |
| 57 | 57 | YAHOO.example.InlineCellEditing = new function(){ |
| 58 | 58 | // Custom formatter for "address" column to preserve line breaks |
| 59 | 59 | var myDataSource = new YAHOO.util.DataSource(dados); | ... | ... |
admin/js/estat_unidade_medida.js
| ... | ... | @@ -55,7 +55,7 @@ i3GEOadmin.umedida = { |
| 55 | 55 | if(i3GEOadmin.umedida.dados == ""){ |
| 56 | 56 | i3GEOadmin.umedida.dados = dados; |
| 57 | 57 | } |
| 58 | - core_listaDeLetras("letras","i3GEOadmin.umedida.filtra"); | |
| 58 | + core_listaDeLetras("letras","i3GEOadmin.umedida.filtra",false,300); | |
| 59 | 59 | YAHOO.example.InlineCellEditing = new function(){ |
| 60 | 60 | // Custom formatter for "address" column to preserve line breaks |
| 61 | 61 | var myDataSource = new YAHOO.util.DataSource(dados); | ... | ... |
admin/js/grupos.js
| ... | ... | @@ -120,7 +120,7 @@ i3GEOadmin.grupos = { |
| 120 | 120 | if(i3GEOadmin.grupos.dados == ""){ |
| 121 | 121 | i3GEOadmin.grupos.dados = dados; |
| 122 | 122 | } |
| 123 | - core_listaDeLetras("letras_G","i3GEOadmin.grupos.filtra"); | |
| 123 | + core_listaDeLetras("letras_G","i3GEOadmin.grupos.filtra",false,300); | |
| 124 | 124 | YAHOO.example.InlineCellEditing = new function(){ |
| 125 | 125 | // Custom formatter for "address" column to preserve line breaks |
| 126 | 126 | var myDataSource = new YAHOO.util.DataSource(dados); | ... | ... |
admin/js/identifica.js
| ... | ... | @@ -86,7 +86,7 @@ i3GEOadmin.identifica = { |
| 86 | 86 | if(i3GEOadmin.identifica.dados == ""){ |
| 87 | 87 | i3GEOadmin.identifica.dados = dados; |
| 88 | 88 | } |
| 89 | - core_listaDeLetras("letras_I","i3GEOadmin.identifica.filtra"); | |
| 89 | + core_listaDeLetras("letras_I","i3GEOadmin.identifica.filtra",false,300); | |
| 90 | 90 | YAHOO.example.InlineCellEditing = new function(){ |
| 91 | 91 | // Custom formatter for "address" column to preserve line breaks |
| 92 | 92 | var myDataSource = new YAHOO.util.DataSource(dados); | ... | ... |
admin/js/mapas.js
| ... | ... | @@ -85,7 +85,7 @@ i3GEOadmin.mapas = { |
| 85 | 85 | if(i3GEOadmin.mapas.dados == ""){ |
| 86 | 86 | i3GEOadmin.mapas.dados = dados; |
| 87 | 87 | } |
| 88 | - core_listaDeLetras("letras_Mp","i3GEOadmin.mapas.filtra"); | |
| 88 | + core_listaDeLetras("letras_Mp","i3GEOadmin.mapas.filtra",false,300); | |
| 89 | 89 | YAHOO.example.InlineCellEditing = new function(){ |
| 90 | 90 | // Custom formatter for "address" column to preserve line breaks |
| 91 | 91 | var myDataSource = new YAHOO.util.DataSource(dados); | ... | ... |
admin/js/menu.js
| ... | ... | @@ -97,7 +97,7 @@ i3GEOadmin.menus = { |
| 97 | 97 | if(i3GEOadmin.menus.dados == ""){ |
| 98 | 98 | i3GEOadmin.menus.dados = dados; |
| 99 | 99 | } |
| 100 | - core_listaDeLetras("letras_M","i3GEOadmin.menus.filtra"); | |
| 100 | + core_listaDeLetras("letras_M","i3GEOadmin.menus.filtra",false,300); | |
| 101 | 101 | YAHOO.example.InlineCellEditing = new function(){ |
| 102 | 102 | // Custom formatter for "address" column to preserve line breaks |
| 103 | 103 | var myDataSource = new YAHOO.util.DataSource(dados); | ... | ... |
admin/js/subgrupos.js
| ... | ... | @@ -95,7 +95,7 @@ i3GEOadmin.subgrupos = { |
| 95 | 95 | if(i3GEOadmin.subgrupos.dados == ""){ |
| 96 | 96 | i3GEOadmin.subgrupos.dados = dados; |
| 97 | 97 | } |
| 98 | - core_listaDeLetras("letras_SG","i3GEOadmin.subgrupos.filtra"); | |
| 98 | + core_listaDeLetras("letras_SG","i3GEOadmin.subgrupos.filtra",false,300); | |
| 99 | 99 | YAHOO.example.InlineCellEditing = new function(){ |
| 100 | 100 | // Custom formatter for "address" column to preserve line breaks |
| 101 | 101 | var myDataSource = new YAHOO.util.DataSource(dados); | ... | ... |
admin/js/webservices.js
| ... | ... | @@ -91,7 +91,7 @@ i3GEOadmin.webservices = { |
| 91 | 91 | if(i3GEOadmin.webservices.dados == ""){ |
| 92 | 92 | i3GEOadmin.webservices.dados = dados; |
| 93 | 93 | } |
| 94 | - core_listaDeLetras("letras_W","i3GEOadmin.webservices.filtra"); | |
| 94 | + core_listaDeLetras("letras_W","i3GEOadmin.webservices.filtra",false,300); | |
| 95 | 95 | YAHOO.example.InlineCellEditing = new function(){ |
| 96 | 96 | // Custom formatter for "address" column to preserve line breaks |
| 97 | 97 | var myDataSource = new YAHOO.util.DataSource(dados); | ... | ... |