Commit 6952987d995560d79b4d9297b1a917a45c1a5471

Authored by Edmar Moretti
1 parent a3f6b2c5

correção na listagem de dados do editor de tabelas do sistema metaestat. As colu…

…nas não estavam sendo listadas corretamente quando a tabela continha uma coluna do tipo geometry
Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
admin/js/estat_editor.js
@@ -234,14 +234,14 @@ i3GEOadmin.editor = { @@ -234,14 +234,14 @@ i3GEOadmin.editor = {
234 alert("Escolha a tabela"); 234 alert("Escolha a tabela");
235 return; 235 return;
236 } 236 }
237 - 237 +
238 var nreg = window.prompt("Numero maximo de registros"), 238 var nreg = window.prompt("Numero maximo de registros"),
239 callback = { 239 callback = {
240 success:function(o){ 240 success:function(o){
241 try { 241 try {
242 core_carregando("desativa"); 242 core_carregando("desativa");
243 var dados = YAHOO.lang.JSON.parse(o.responseText), 243 var dados = YAHOO.lang.JSON.parse(o.responseText),
244 - ncolunas = dados.colunas.length, 244 + ncolunas = dados.nomescolunas.length,
245 linhas = dados.linhas, 245 linhas = dados.linhas,
246 nlinhas = linhas.length, 246 nlinhas = linhas.length,
247 tabela = [], 247 tabela = [],
@@ -254,7 +254,7 @@ i3GEOadmin.editor = { @@ -254,7 +254,7 @@ i3GEOadmin.editor = {
254 for(i=0;i<nlinhas;i++){ 254 for(i=0;i<nlinhas;i++){
255 tabela.push("<tr>"); 255 tabela.push("<tr>");
256 l = linhas[i]; 256 l = linhas[i];
257 - for(j=0;j<ncolunas;j++){ 257 + for(j=0;j<dados.nomescolunas.length;j++){
258 tabela.push("<td style='border:1px solid beige'>"+l[j]+"</td>"); 258 tabela.push("<td style='border:1px solid beige'>"+l[j]+"</td>");
259 } 259 }
260 tabela.push("</tr>"); 260 tabela.push("</tr>");