Commit 2d502f6ff6860471d4b57ea4a156c8ece943a174

Authored by Edmar Moretti
1 parent bc0e62d7

Ajuste no tamanho do campo de entrada de filtros de letras

admin/admin.db
No preview for this file type
admin/html/editormapfile.html
@@ -195,7 +195,7 @@ table.ygtvtable { @@ -195,7 +195,7 @@ table.ygtvtable {
195 195
196 ins += "<p><div id=filtroDeLetras ></div>"; 196 ins += "<p><div id=filtroDeLetras ></div>";
197 document.getElementById("letras").innerHTML = ins; 197 document.getElementById("letras").innerHTML = ins;
198 - core_listaDeLetras("filtroDeLetras", "filtraLetra"); 198 + core_listaDeLetras("filtroDeLetras", "filtraLetra",false,300);
199 document.getElementById("formulario").style.display = "block"; 199 document.getElementById("formulario").style.display = "block";
200 initMenu(); 200 initMenu();
201 }; 201 };
admin/js/arvore.js
@@ -113,6 +113,7 @@ Monta a arvore de temas @@ -113,6 +113,7 @@ Monta a arvore de temas
113 */ 113 */
114 function montaArvore(dados) 114 function montaArvore(dados)
115 { 115 {
  116 + //TODO incluir filtro de grupos - nao colocar opcao de reordenamento se o filtro estiver ativo
116 YAHOO.tree = new function() 117 YAHOO.tree = new function()
117 { 118 {
118 tree = ""; 119 tree = "";
@@ -849,6 +850,11 @@ function gravaDados(tipo,id) @@ -849,6 +850,11 @@ function gravaDados(tipo,id)
849 } 850 }
850 else{ 851 else{
851 texto = document.getElementById("Eid_grupo"); 852 texto = document.getElementById("Eid_grupo");
  853 + if(texto.selectedIndex < 0){
  854 + core_carregando("desativa");
  855 + alert("Escolha um grupo");
  856 + return;
  857 + }
852 texto = texto.options[texto.selectedIndex].text; 858 texto = texto.options[texto.selectedIndex].text;
853 } 859 }
854 no = tree.getNodeByProperty("id_n1",id); 860 no = tree.getNodeByProperty("id_n1",id);
@@ -870,6 +876,11 @@ function gravaDados(tipo,id) @@ -870,6 +876,11 @@ function gravaDados(tipo,id)
870 } 876 }
871 else{ 877 else{
872 texto = document.getElementById("Eid_subgrupo"); 878 texto = document.getElementById("Eid_subgrupo");
  879 + if(texto.selectedIndex < 0){
  880 + core_carregando("desativa");
  881 + alert("Escolha um subgrupo");
  882 + return;
  883 + }
873 texto = texto.options[texto.selectedIndex].text; 884 texto = texto.options[texto.selectedIndex].text;
874 } 885 }
875 objpub = document.getElementById("Epublicado"); 886 objpub = document.getElementById("Epublicado");
@@ -888,6 +899,11 @@ function gravaDados(tipo,id) @@ -888,6 +899,11 @@ function gravaDados(tipo,id)
888 if(tipo == "tema") 899 if(tipo == "tema")
889 { 900 {
890 texto = document.getElementById("Eid_tema"); 901 texto = document.getElementById("Eid_tema");
  902 + if(texto.selectedIndex < 0){
  903 + core_carregando("desativa");
  904 + alert("Escolha um tema");
  905 + return;
  906 + }
891 texto = texto.options[texto.selectedIndex].text; 907 texto = texto.options[texto.selectedIndex].text;
892 908
893 objpub = document.getElementById("Epublicado"); 909 objpub = document.getElementById("Epublicado");
@@ -904,10 +920,15 @@ function gravaDados(tipo,id) @@ -904,10 +920,15 @@ function gravaDados(tipo,id)
904 920
905 no.html = no.getContentEl().innerHTML; 921 no.html = no.getContentEl().innerHTML;
906 } 922 }
907 - if(tipo == "raizmenu" || tipo == "raizgrupo") 923 + if(tipo == "raizmenu" || tipo == "raizgrupo")
908 { 924 {
909 obje = document.getElementById("Eid_tema"); 925 obje = document.getElementById("Eid_tema");
910 if(obje){ 926 if(obje){
  927 + if(obje.selectedIndex < 0){
  928 + core_carregando("desativa");
  929 + alert("Escolha um tema");
  930 + return;
  931 + }
911 texto = obje.options[obje.selectedIndex].text; 932 texto = obje.options[obje.selectedIndex].text;
912 no = tree.getNodeByProperty("id_raiz",id); 933 no = tree.getNodeByProperty("id_raiz",id);
913 no.getContentEl().getElementsByTagName("span")[0].innerHTML = texto; 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,7 +623,7 @@ function core_pegaMapfiles(funcaoM,letra,filtro,checaNomes,checaNames)
623 } 623 }
624 if(!funcaoM){ 624 if(!funcaoM){
625 funcaoM = ""; 625 funcaoM = "";
626 - } 626 + }
627 if(!checaNomes){ 627 if(!checaNomes){
628 checaNomes = "false"; 628 checaNomes = "false";
629 } 629 }
@@ -1671,8 +1671,11 @@ function core_filtraLetrasCombo(id,letra){ @@ -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 //letraAtual guarda a ultima letra clicada 1675 //letraAtual guarda a ultima letra clicada
  1676 + if(!w){
  1677 + w = 40;
  1678 + }
1676 var o,i,ins= "<p><b>", 1679 var o,i,ins= "<p><b>",
1677 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"], 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 nletras = letras.length; 1681 nletras = letras.length;
@@ -1700,7 +1703,7 @@ function core_listaDeLetras(onde,nomeFuncao,semLetras){ @@ -1700,7 +1703,7 @@ function core_listaDeLetras(onde,nomeFuncao,semLetras){
1700 o = document.getElementById(onde); 1703 o = document.getElementById(onde);
1701 if(o){ 1704 if(o){
1702 if(!semLetras){ 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 else{ 1708 else{
1706 o.innerHTML = "<form id=forminiciais >Iniciais: <input name='' onchange='' value='' id=iniciaisLetras type=text style=width:40px;cursor:pointer /></form>"; 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
@@ -29,6 +29,9 @@ Arquivo: @@ -29,6 +29,9 @@ Arquivo:
29 29
30 i3geo/admin/js/editormapfile.js 30 i3geo/admin/js/editormapfile.js
31 */ 31 */
  32 +
  33 +//TODO incluir opcao para criar filtro por exemplo
  34 +//TODO incluir favoritos
32 contaN = 0; 35 contaN = 0;
33 objcontype = [ 36 objcontype = [
34 {texto:"MS_INLINE",valor:"0"}, 37 {texto:"MS_INLINE",valor:"0"},
admin/js/estat_conexao.js
@@ -64,7 +64,7 @@ i3GEOadmin.conexao = { @@ -64,7 +64,7 @@ i3GEOadmin.conexao = {
64 if(i3GEOadmin.conexao.dados == ""){ 64 if(i3GEOadmin.conexao.dados == ""){
65 i3GEOadmin.conexao.dados = dados; 65 i3GEOadmin.conexao.dados = dados;
66 } 66 }
67 - core_listaDeLetras("letras","i3GEOadmin.conexao.filtra"); 67 + core_listaDeLetras("letras","i3GEOadmin.conexao.filtra",false,300);
68 YAHOO.example.InlineCellEditing = new function(){ 68 YAHOO.example.InlineCellEditing = new function(){
69 // Custom formatter for "address" column to preserve line breaks 69 // Custom formatter for "address" column to preserve line breaks
70 var myDataSource = new YAHOO.util.DataSource(dados); 70 var myDataSource = new YAHOO.util.DataSource(dados);
admin/js/estat_fonteinfo.js
@@ -53,7 +53,7 @@ i3GEOadmin.fonteinfo = { @@ -53,7 +53,7 @@ i3GEOadmin.fonteinfo = {
53 if(i3GEOadmin.fonteinfo.dados == ""){ 53 if(i3GEOadmin.fonteinfo.dados == ""){
54 i3GEOadmin.fonteinfo.dados = dados; 54 i3GEOadmin.fonteinfo.dados = dados;
55 } 55 }
56 - core_listaDeLetras("letras","i3GEOadmin.fonteinfo.filtra"); 56 + core_listaDeLetras("letras","i3GEOadmin.fonteinfo.filtra",false,300);
57 YAHOO.example.InlineCellEditing = new function(){ 57 YAHOO.example.InlineCellEditing = new function(){
58 // Custom formatter for "address" column to preserve line breaks 58 // Custom formatter for "address" column to preserve line breaks
59 var myDataSource = new YAHOO.util.DataSource(dados); 59 var myDataSource = new YAHOO.util.DataSource(dados);
admin/js/estat_tipo_periodo.js
@@ -53,7 +53,7 @@ i3GEOadmin.periodo = { @@ -53,7 +53,7 @@ i3GEOadmin.periodo = {
53 if(i3GEOadmin.periodo.dados == ""){ 53 if(i3GEOadmin.periodo.dados == ""){
54 i3GEOadmin.periodo.dados = dados; 54 i3GEOadmin.periodo.dados = dados;
55 } 55 }
56 - core_listaDeLetras("letras","i3GEOadmin.periodo.filtra"); 56 + core_listaDeLetras("letras","i3GEOadmin.periodo.filtra",false,300);
57 YAHOO.example.InlineCellEditing = new function(){ 57 YAHOO.example.InlineCellEditing = new function(){
58 // Custom formatter for "address" column to preserve line breaks 58 // Custom formatter for "address" column to preserve line breaks
59 var myDataSource = new YAHOO.util.DataSource(dados); 59 var myDataSource = new YAHOO.util.DataSource(dados);
admin/js/estat_unidade_medida.js
@@ -55,7 +55,7 @@ i3GEOadmin.umedida = { @@ -55,7 +55,7 @@ i3GEOadmin.umedida = {
55 if(i3GEOadmin.umedida.dados == ""){ 55 if(i3GEOadmin.umedida.dados == ""){
56 i3GEOadmin.umedida.dados = dados; 56 i3GEOadmin.umedida.dados = dados;
57 } 57 }
58 - core_listaDeLetras("letras","i3GEOadmin.umedida.filtra"); 58 + core_listaDeLetras("letras","i3GEOadmin.umedida.filtra",false,300);
59 YAHOO.example.InlineCellEditing = new function(){ 59 YAHOO.example.InlineCellEditing = new function(){
60 // Custom formatter for "address" column to preserve line breaks 60 // Custom formatter for "address" column to preserve line breaks
61 var myDataSource = new YAHOO.util.DataSource(dados); 61 var myDataSource = new YAHOO.util.DataSource(dados);
admin/js/grupos.js
@@ -120,7 +120,7 @@ i3GEOadmin.grupos = { @@ -120,7 +120,7 @@ i3GEOadmin.grupos = {
120 if(i3GEOadmin.grupos.dados == ""){ 120 if(i3GEOadmin.grupos.dados == ""){
121 i3GEOadmin.grupos.dados = dados; 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 YAHOO.example.InlineCellEditing = new function(){ 124 YAHOO.example.InlineCellEditing = new function(){
125 // Custom formatter for "address" column to preserve line breaks 125 // Custom formatter for "address" column to preserve line breaks
126 var myDataSource = new YAHOO.util.DataSource(dados); 126 var myDataSource = new YAHOO.util.DataSource(dados);
admin/js/identifica.js
@@ -86,7 +86,7 @@ i3GEOadmin.identifica = { @@ -86,7 +86,7 @@ i3GEOadmin.identifica = {
86 if(i3GEOadmin.identifica.dados == ""){ 86 if(i3GEOadmin.identifica.dados == ""){
87 i3GEOadmin.identifica.dados = dados; 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 YAHOO.example.InlineCellEditing = new function(){ 90 YAHOO.example.InlineCellEditing = new function(){
91 // Custom formatter for "address" column to preserve line breaks 91 // Custom formatter for "address" column to preserve line breaks
92 var myDataSource = new YAHOO.util.DataSource(dados); 92 var myDataSource = new YAHOO.util.DataSource(dados);
admin/js/mapas.js
@@ -85,7 +85,7 @@ i3GEOadmin.mapas = { @@ -85,7 +85,7 @@ i3GEOadmin.mapas = {
85 if(i3GEOadmin.mapas.dados == ""){ 85 if(i3GEOadmin.mapas.dados == ""){
86 i3GEOadmin.mapas.dados = dados; 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 YAHOO.example.InlineCellEditing = new function(){ 89 YAHOO.example.InlineCellEditing = new function(){
90 // Custom formatter for "address" column to preserve line breaks 90 // Custom formatter for "address" column to preserve line breaks
91 var myDataSource = new YAHOO.util.DataSource(dados); 91 var myDataSource = new YAHOO.util.DataSource(dados);
admin/js/menu.js
@@ -97,7 +97,7 @@ i3GEOadmin.menus = { @@ -97,7 +97,7 @@ i3GEOadmin.menus = {
97 if(i3GEOadmin.menus.dados == ""){ 97 if(i3GEOadmin.menus.dados == ""){
98 i3GEOadmin.menus.dados = dados; 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 YAHOO.example.InlineCellEditing = new function(){ 101 YAHOO.example.InlineCellEditing = new function(){
102 // Custom formatter for "address" column to preserve line breaks 102 // Custom formatter for "address" column to preserve line breaks
103 var myDataSource = new YAHOO.util.DataSource(dados); 103 var myDataSource = new YAHOO.util.DataSource(dados);
admin/js/subgrupos.js
@@ -95,7 +95,7 @@ i3GEOadmin.subgrupos = { @@ -95,7 +95,7 @@ i3GEOadmin.subgrupos = {
95 if(i3GEOadmin.subgrupos.dados == ""){ 95 if(i3GEOadmin.subgrupos.dados == ""){
96 i3GEOadmin.subgrupos.dados = dados; 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 YAHOO.example.InlineCellEditing = new function(){ 99 YAHOO.example.InlineCellEditing = new function(){
100 // Custom formatter for "address" column to preserve line breaks 100 // Custom formatter for "address" column to preserve line breaks
101 var myDataSource = new YAHOO.util.DataSource(dados); 101 var myDataSource = new YAHOO.util.DataSource(dados);
admin/js/webservices.js
@@ -91,7 +91,7 @@ i3GEOadmin.webservices = { @@ -91,7 +91,7 @@ i3GEOadmin.webservices = {
91 if(i3GEOadmin.webservices.dados == ""){ 91 if(i3GEOadmin.webservices.dados == ""){
92 i3GEOadmin.webservices.dados = dados; 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 YAHOO.example.InlineCellEditing = new function(){ 95 YAHOO.example.InlineCellEditing = new function(){
96 // Custom formatter for "address" column to preserve line breaks 96 // Custom formatter for "address" column to preserve line breaks
97 var myDataSource = new YAHOO.util.DataSource(dados); 97 var myDataSource = new YAHOO.util.DataSource(dados);