Commit f991d203bae5255b08fb1cb3de2115c6793a0a62
1 parent
0a98eed2
Exists in
master
and in
7 other branches
Correção de erros da ferramenta Tabela
Showing
6 changed files
with
52 additions
and
32 deletions
Show diff stats
admin/admin.db
No preview for this file type
classesphp/classe_atributos.php
| @@ -449,6 +449,7 @@ class Atributos | @@ -449,6 +449,7 @@ class Atributos | ||
| 449 | $alias = $items; | 449 | $alias = $items; |
| 450 | } | 450 | } |
| 451 | $shapes = retornaShapesSelecionados($this->layer,$this->arquivo,$this->mapa,true); | 451 | $shapes = retornaShapesSelecionados($this->layer,$this->arquivo,$this->mapa,true); |
| 452 | + //error_reporting(E_ALL); | ||
| 452 | $res_count = count($shapes); | 453 | $res_count = count($shapes); |
| 453 | $resultadoFinal[] = array("totalSelecionados"=>$res_count,"itens"=>$items,"alias"=>$alias); | 454 | $resultadoFinal[] = array("totalSelecionados"=>$res_count,"itens"=>$items,"alias"=>$alias); |
| 454 | $registros = array(); | 455 | $registros = array(); |
| @@ -484,12 +485,18 @@ class Atributos | @@ -484,12 +485,18 @@ class Atributos | ||
| 484 | } | 485 | } |
| 485 | $classe = ""; | 486 | $classe = ""; |
| 486 | if($dadosDaClasse == "sim"){ | 487 | if($dadosDaClasse == "sim"){ |
| 487 | - $indice = $this->layer->getClassIndex($shape); | ||
| 488 | - $nome = $this->layer->getclass($indice)->name; | ||
| 489 | - $classe = array( | ||
| 490 | - "indice"=>$indice, | ||
| 491 | - "nome"=>$nome | ||
| 492 | - ); | 488 | + $indice = @$this->layer->getClassIndex($shape); |
| 489 | + if($indice >= 0){ | ||
| 490 | + $classei = @$this->layer->getclass($indice); | ||
| 491 | + $nome = $classei->name; | ||
| 492 | + if($convC == true && $nome != ""){ | ||
| 493 | + $nome = $this->converte($nome); | ||
| 494 | + } | ||
| 495 | + $classe = array( | ||
| 496 | + "indice"=>$indice, | ||
| 497 | + "nome"=>$nome | ||
| 498 | + ); | ||
| 499 | + } | ||
| 493 | } | 500 | } |
| 494 | $ext = $this->extensaoShape($shape); | 501 | $ext = $this->extensaoShape($shape); |
| 495 | $registros[] = array("indice"=>$indx,"valores"=>$valitem,"status"=>$chk,"classe"=>$classe,"ext"=>$ext); | 502 | $registros[] = array("indice"=>$indx,"valores"=>$valitem,"status"=>$chk,"classe"=>$classe,"ext"=>$ext); |
| @@ -554,6 +561,9 @@ class Atributos | @@ -554,6 +561,9 @@ class Atributos | ||
| 554 | else{ | 561 | else{ |
| 555 | $nome = ""; | 562 | $nome = ""; |
| 556 | } | 563 | } |
| 564 | + if($convC == true && $nome != ""){ | ||
| 565 | + $nome = $this->converte($nome); | ||
| 566 | + } | ||
| 557 | $classe = array( | 567 | $classe = array( |
| 558 | "indice"=>$indice, | 568 | "indice"=>$indice, |
| 559 | "nome"=>$nome | 569 | "nome"=>$nome |
ferramentas/tabela/dicionario.js
| @@ -220,17 +220,17 @@ i3GEOF.tabela.dicionario = { | @@ -220,17 +220,17 @@ i3GEOF.tabela.dicionario = { | ||
| 220 | en : "", | 220 | en : "", |
| 221 | es : "" | 221 | es : "" |
| 222 | } ], | 222 | } ], |
| 223 | - 'selecionaTabela' : [ { | 223 | + "selecionaTabela" : [ { |
| 224 | pt : "Escolha uma tabela", | 224 | pt : "Escolha uma tabela", |
| 225 | en : "", | 225 | en : "", |
| 226 | es : "" | 226 | es : "" |
| 227 | } ], | 227 | } ], |
| 228 | - 'selecionaSegundaTabela' : [ { | 228 | + "selecionaSegundaTabela" : [ { |
| 229 | pt : "Escolha uma segunda tabela", | 229 | pt : "Escolha uma segunda tabela", |
| 230 | en : "", | 230 | en : "", |
| 231 | es : "" | 231 | es : "" |
| 232 | } ], | 232 | } ], |
| 233 | - 'criaVinculo' : [ { | 233 | + "criaVinculo" : [ { |
| 234 | pt : "Criar vínculo", | 234 | pt : "Criar vínculo", |
| 235 | en : "", | 235 | en : "", |
| 236 | es : "" | 236 | es : "" |
| @@ -244,5 +244,10 @@ i3GEOF.tabela.dicionario = { | @@ -244,5 +244,10 @@ i3GEOF.tabela.dicionario = { | ||
| 244 | pt : "Identificador da tabela", | 244 | pt : "Identificador da tabela", |
| 245 | en : "", | 245 | en : "", |
| 246 | es : "" | 246 | es : "" |
| 247 | + } ], | ||
| 248 | + 'selUmReg' : [ { | ||
| 249 | + pt : "Selecione pelo menos um registro", | ||
| 250 | + en : "", | ||
| 251 | + es : "" | ||
| 247 | } ] | 252 | } ] |
| 248 | }; | 253 | }; |
ferramentas/tabela/index.js
| @@ -260,7 +260,7 @@ i3GEOF.tabela = | @@ -260,7 +260,7 @@ i3GEOF.tabela = | ||
| 260 | + "</span></div>"; | 260 | + "</span></div>"; |
| 261 | 261 | ||
| 262 | janela = i3GEO.janela.cria( | 262 | janela = i3GEO.janela.cria( |
| 263 | - "570px", | 263 | + "610px", |
| 264 | "400px", | 264 | "400px", |
| 265 | "", | 265 | "", |
| 266 | "", | 266 | "", |
| @@ -911,8 +911,8 @@ i3GEOF.tabela = | @@ -911,8 +911,8 @@ i3GEOF.tabela = | ||
| 911 | ordenaColuna : function(coluna, cid, idjanela) { | 911 | ordenaColuna : function(coluna, cid, idjanela) { |
| 912 | i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible"; | 912 | i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible"; |
| 913 | try { | 913 | try { |
| 914 | - var tabela = $i(idjanela + "i3GEOtabelatabelai"), trs = tabela.getElementsByTagName("tr"), ntrs = trs.length, tds, nt, conta = | ||
| 915 | - 0, psort = [], t, psortfim, npsortfim, ins, p, e; | 914 | + var tabela = $i(idjanela + "i3GEOtabelatabelai"), trs = tabela.getElementsByTagName("tr"), |
| 915 | + ntrs = trs.length, tds, nt, conta = 0, psort = [], t, psortfim, npsortfim, ins, p, e; | ||
| 916 | // pega o indice correto | 916 | // pega o indice correto |
| 917 | tds = coluna.parentNode.parentNode.getElementsByTagName("td"); | 917 | tds = coluna.parentNode.parentNode.getElementsByTagName("td"); |
| 918 | nt = tds.length; | 918 | nt = tds.length; |
| @@ -924,20 +924,21 @@ i3GEOF.tabela = | @@ -924,20 +924,21 @@ i3GEOF.tabela = | ||
| 924 | } | 924 | } |
| 925 | for (t = 0; t < ntrs; t++) { | 925 | for (t = 0; t < ntrs; t++) { |
| 926 | if (t < ntrs) { | 926 | if (t < ntrs) { |
| 927 | - if (trs[t].childNodes[cid].innerHTML) { | ||
| 928 | - if (trs[t].childNodes[cid].innerHTML !== "undefined") { | ||
| 929 | - psort[conta] = trs[t].childNodes[cid].innerHTML + "+" + conta; | 927 | + //if (trs[t].childNodes[cid].innerHTML) { |
| 928 | + //if (trs[t].getElementsByTagName("td")[cid].innerHTML !== "undefined") { | ||
| 929 | + psort[conta] = trs[t].getElementsByTagName("td")[cid].innerHTML + "@$" + conta; | ||
| 930 | conta = conta + 1; | 930 | conta = conta + 1; |
| 931 | - } | ||
| 932 | - } | 931 | + //} |
| 932 | + //} | ||
| 933 | } | 933 | } |
| 934 | } | 934 | } |
| 935 | + | ||
| 935 | // recosntroi a tabela | 936 | // recosntroi a tabela |
| 936 | psortfim = psort.sort(); | 937 | psortfim = psort.sort(); |
| 937 | ins = "<table id=" + idjanela + "i3GEOtabelatabelai class=lista8 >"; | 938 | ins = "<table id=" + idjanela + "i3GEOtabelatabelai class=lista8 >"; |
| 938 | npsortfim = psortfim.length; | 939 | npsortfim = psortfim.length; |
| 939 | for (p = 0; p < npsortfim; p++) { | 940 | for (p = 0; p < npsortfim; p++) { |
| 940 | - e = psortfim[p].split("+")[1] * 1; | 941 | + e = psortfim[p].split("@$")[1] * 1; |
| 941 | if (trs[e] !== undefined) { | 942 | if (trs[e] !== undefined) { |
| 942 | ins += "<tr>" + trs[e].innerHTML + "</tr>"; | 943 | ins += "<tr>" + trs[e].innerHTML + "</tr>"; |
| 943 | } | 944 | } |
| @@ -1043,6 +1044,12 @@ i3GEOF.tabela = | @@ -1043,6 +1044,12 @@ i3GEOF.tabela = | ||
| 1043 | * Cria um novo tema contendo a seleção existente | 1044 | * Cria um novo tema contendo a seleção existente |
| 1044 | */ | 1045 | */ |
| 1045 | criaNovoTema : function(idjanela) { | 1046 | criaNovoTema : function(idjanela) { |
| 1047 | + var camada = i3GEO.arvoreDeCamadas.pegaTema(i3GEOF.tabela.propJanelas[idjanela].tema); | ||
| 1048 | + if(camada.nsel == 0){ | ||
| 1049 | + i3GEO.janela.tempoMsg($trad("selUmReg",i3GEOF.tabela.dicionario)); | ||
| 1050 | + return; | ||
| 1051 | + } | ||
| 1052 | + | ||
| 1046 | if (i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") { | 1053 | if (i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") { |
| 1047 | return; | 1054 | return; |
| 1048 | } | 1055 | } |
ferramentas/tabela/templateLista_mst.html
| @@ -35,7 +35,7 @@ | @@ -35,7 +35,7 @@ | ||
| 35 | </div> | 35 | </div> |
| 36 | </td> | 36 | </td> |
| 37 | <td> | 37 | <td> |
| 38 | - <img class="{{classelegenda}}" title="{{{nomeClasse}}}" src="{{{imagemClasse}}}" /> | 38 | + <img class="{{classelegenda}}" style="margin:10px;" title="{{{nomeClasse}}}" src="{{{imagemClasse}}}" /> |
| 39 | </td> | 39 | </td> |
| 40 | {{{colunas}}} | 40 | {{{colunas}}} |
| 41 | </tr> | 41 | </tr> |
ferramentas/tabela/template_mst.html
| @@ -33,21 +33,19 @@ | @@ -33,21 +33,19 @@ | ||
| 33 | </div> | 33 | </div> |
| 34 | <!-- Guia Propriedades --> | 34 | <!-- Guia Propriedades --> |
| 35 | <div id='{{{idjanela}}}i3GEOtabelaguia6obj' class="container-fluid"> | 35 | <div id='{{{idjanela}}}i3GEOtabelaguia6obj' class="container-fluid"> |
| 36 | - <div class="checkbox text-left"> | 36 | + <div class="radio radio-primary condensed text-left"> |
| 37 | <label> | 37 | <label> |
| 38 | - <input id='{{{idjanela}}}i3GEOtabelatipolista' type="checkbox" onclick="i3GEOF.tabela.pegaRegistros('{{{idjanela}}}')"> | ||
| 39 | - <span class="checkbox-material noprint"> | ||
| 40 | - <span class="check"></span> | ||
| 41 | - </span> | 38 | + <input name="classOuSel" id='{{{idjanela}}}i3GEOtabelatipolista' type="radio" onclick="i3GEOF.tabela.pegaRegistros('{{{idjanela}}}')"> |
| 39 | + <span class="circle"></span> | ||
| 40 | + <span class="check"></span> | ||
| 42 | {{{atuatab}}} | 41 | {{{atuatab}}} |
| 43 | </label> | 42 | </label> |
| 44 | </div> | 43 | </div> |
| 45 | - <div class="checkbox text-left"> | 44 | + <div class="radio radio-primary condensed text-left"> |
| 46 | <label> | 45 | <label> |
| 47 | - <input id='{{{idjanela}}}i3GEOtabelalegenda' type="checkbox" onclick="i3GEOF.tabela.pegaRegistros('{{{idjanela}}}')"> | ||
| 48 | - <span class="checkbox-material noprint"> | ||
| 49 | - <span class="check"></span> | ||
| 50 | - </span> | 46 | + <input name="classOuSel" id='{{{idjanela}}}i3GEOtabelalegenda' type="radio" onclick="i3GEOF.tabela.pegaRegistros('{{{idjanela}}}')"> |
| 47 | + <span class="circle"></span> | ||
| 48 | + <span class="check"></span> | ||
| 51 | {{{colleg}}} | 49 | {{{colleg}}} |
| 52 | </label> | 50 | </label> |
| 53 | </div> | 51 | </div> |
| @@ -62,7 +60,7 @@ | @@ -62,7 +60,7 @@ | ||
| 62 | </div> | 60 | </div> |
| 63 | </div> | 61 | </div> |
| 64 | <!-- Registros da tabela --> | 62 | <!-- Registros da tabela --> |
| 65 | -<div id='{{{idjanela}}}i3GEOtabelaguia1obj' class='container-fluid customScrollBarXY'> | 63 | +<div id='{{{idjanela}}}i3GEOtabelaguia1obj' class='container-fluid '> |
| 66 | <div id='{{{idjanela}}}i3GEOFtabelaComboCabeca' class='form-group condensed' style='width: 450px'> | 64 | <div id='{{{idjanela}}}i3GEOFtabelaComboCabeca' class='form-group condensed' style='width: 450px'> |
| 67 | <span class="material-icons iconeComboTemas">playlist_add_check</span> | 65 | <span class="material-icons iconeComboTemas">playlist_add_check</span> |
| 68 | </div> | 66 | </div> |
| @@ -97,7 +95,7 @@ | @@ -97,7 +95,7 @@ | ||
| 97 | <div id='{{{idjanela}}}i3GEOtabelaregistros' style='top: 10px;'></div> | 95 | <div id='{{{idjanela}}}i3GEOtabelaregistros' style='top: 10px;'></div> |
| 98 | </div> | 96 | </div> |
| 99 | <!-- Estatisticas --> | 97 | <!-- Estatisticas --> |
| 100 | -<div id='{{{idjanela}}}i3GEOtabelaguia3obj' style='display: none;' class='container-fluid customScrollBarXY'> | 98 | +<div id='{{{idjanela}}}i3GEOtabelaguia3obj' style='display: none;' class='container-fluid '> |
| 101 | <div class='form-group condensed'> | 99 | <div class='form-group condensed'> |
| 102 | <label class="control-label">{{{itemcalc}}}</label> | 100 | <label class="control-label">{{{itemcalc}}}</label> |
| 103 | <div id='{{{idjanela}}}i3GEOtabelaitensGuia3'></div> | 101 | <div id='{{{idjanela}}}i3GEOtabelaitensGuia3'></div> |
| @@ -115,7 +113,7 @@ | @@ -115,7 +113,7 @@ | ||
| 115 | <h5 class="alert alert-info">{{{paraqueas}}}</h5> | 113 | <h5 class="alert alert-info">{{{paraqueas}}}</h5> |
| 116 | </div> | 114 | </div> |
| 117 | <!-- Relatorio --> | 115 | <!-- Relatorio --> |
| 118 | -<div id='{{{idjanela}}}i3GEOtabelaguia5obj' class='container-fluid customScrollBarXY'> | 116 | +<div id='{{{idjanela}}}i3GEOtabelaguia5obj' class='container-fluid '> |
| 119 | <div class='form-group condensed'> | 117 | <div class='form-group condensed'> |
| 120 | <label>{{{itensrel}}}</label> | 118 | <label>{{{itensrel}}}</label> |
| 121 | <div id='{{{idjanela}}}i3GEOtabelaitensrelatorio' style='overflow: auto; height: 120px; top: 10px;'></div> | 119 | <div id='{{{idjanela}}}i3GEOtabelaitensrelatorio' style='overflow: auto; height: 120px; top: 10px;'></div> |