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 | 449 | $alias = $items; |
450 | 450 | } |
451 | 451 | $shapes = retornaShapesSelecionados($this->layer,$this->arquivo,$this->mapa,true); |
452 | + //error_reporting(E_ALL); | |
452 | 453 | $res_count = count($shapes); |
453 | 454 | $resultadoFinal[] = array("totalSelecionados"=>$res_count,"itens"=>$items,"alias"=>$alias); |
454 | 455 | $registros = array(); |
... | ... | @@ -484,12 +485,18 @@ class Atributos |
484 | 485 | } |
485 | 486 | $classe = ""; |
486 | 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 | 501 | $ext = $this->extensaoShape($shape); |
495 | 502 | $registros[] = array("indice"=>$indx,"valores"=>$valitem,"status"=>$chk,"classe"=>$classe,"ext"=>$ext); |
... | ... | @@ -554,6 +561,9 @@ class Atributos |
554 | 561 | else{ |
555 | 562 | $nome = ""; |
556 | 563 | } |
564 | + if($convC == true && $nome != ""){ | |
565 | + $nome = $this->converte($nome); | |
566 | + } | |
557 | 567 | $classe = array( |
558 | 568 | "indice"=>$indice, |
559 | 569 | "nome"=>$nome | ... | ... |
ferramentas/tabela/dicionario.js
... | ... | @@ -220,17 +220,17 @@ i3GEOF.tabela.dicionario = { |
220 | 220 | en : "", |
221 | 221 | es : "" |
222 | 222 | } ], |
223 | - 'selecionaTabela' : [ { | |
223 | + "selecionaTabela" : [ { | |
224 | 224 | pt : "Escolha uma tabela", |
225 | 225 | en : "", |
226 | 226 | es : "" |
227 | 227 | } ], |
228 | - 'selecionaSegundaTabela' : [ { | |
228 | + "selecionaSegundaTabela" : [ { | |
229 | 229 | pt : "Escolha uma segunda tabela", |
230 | 230 | en : "", |
231 | 231 | es : "" |
232 | 232 | } ], |
233 | - 'criaVinculo' : [ { | |
233 | + "criaVinculo" : [ { | |
234 | 234 | pt : "Criar vínculo", |
235 | 235 | en : "", |
236 | 236 | es : "" |
... | ... | @@ -244,5 +244,10 @@ i3GEOF.tabela.dicionario = { |
244 | 244 | pt : "Identificador da tabela", |
245 | 245 | en : "", |
246 | 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 | 260 | + "</span></div>"; |
261 | 261 | |
262 | 262 | janela = i3GEO.janela.cria( |
263 | - "570px", | |
263 | + "610px", | |
264 | 264 | "400px", |
265 | 265 | "", |
266 | 266 | "", |
... | ... | @@ -911,8 +911,8 @@ i3GEOF.tabela = |
911 | 911 | ordenaColuna : function(coluna, cid, idjanela) { |
912 | 912 | i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible"; |
913 | 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 | 916 | // pega o indice correto |
917 | 917 | tds = coluna.parentNode.parentNode.getElementsByTagName("td"); |
918 | 918 | nt = tds.length; |
... | ... | @@ -924,20 +924,21 @@ i3GEOF.tabela = |
924 | 924 | } |
925 | 925 | for (t = 0; t < ntrs; t++) { |
926 | 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 | 930 | conta = conta + 1; |
931 | - } | |
932 | - } | |
931 | + //} | |
932 | + //} | |
933 | 933 | } |
934 | 934 | } |
935 | + | |
935 | 936 | // recosntroi a tabela |
936 | 937 | psortfim = psort.sort(); |
937 | 938 | ins = "<table id=" + idjanela + "i3GEOtabelatabelai class=lista8 >"; |
938 | 939 | npsortfim = psortfim.length; |
939 | 940 | for (p = 0; p < npsortfim; p++) { |
940 | - e = psortfim[p].split("+")[1] * 1; | |
941 | + e = psortfim[p].split("@$")[1] * 1; | |
941 | 942 | if (trs[e] !== undefined) { |
942 | 943 | ins += "<tr>" + trs[e].innerHTML + "</tr>"; |
943 | 944 | } |
... | ... | @@ -1043,6 +1044,12 @@ i3GEOF.tabela = |
1043 | 1044 | * Cria um novo tema contendo a seleção existente |
1044 | 1045 | */ |
1045 | 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 | 1053 | if (i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") { |
1047 | 1054 | return; |
1048 | 1055 | } | ... | ... |
ferramentas/tabela/templateLista_mst.html
... | ... | @@ -35,7 +35,7 @@ |
35 | 35 | </div> |
36 | 36 | </td> |
37 | 37 | <td> |
38 | - <img class="{{classelegenda}}" title="{{{nomeClasse}}}" src="{{{imagemClasse}}}" /> | |
38 | + <img class="{{classelegenda}}" style="margin:10px;" title="{{{nomeClasse}}}" src="{{{imagemClasse}}}" /> | |
39 | 39 | </td> |
40 | 40 | {{{colunas}}} |
41 | 41 | </tr> | ... | ... |
ferramentas/tabela/template_mst.html
... | ... | @@ -33,21 +33,19 @@ |
33 | 33 | </div> |
34 | 34 | <!-- Guia Propriedades --> |
35 | 35 | <div id='{{{idjanela}}}i3GEOtabelaguia6obj' class="container-fluid"> |
36 | - <div class="checkbox text-left"> | |
36 | + <div class="radio radio-primary condensed text-left"> | |
37 | 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 | 41 | {{{atuatab}}} |
43 | 42 | </label> |
44 | 43 | </div> |
45 | - <div class="checkbox text-left"> | |
44 | + <div class="radio radio-primary condensed text-left"> | |
46 | 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 | 49 | {{{colleg}}} |
52 | 50 | </label> |
53 | 51 | </div> |
... | ... | @@ -62,7 +60,7 @@ |
62 | 60 | </div> |
63 | 61 | </div> |
64 | 62 | <!-- Registros da tabela --> |
65 | -<div id='{{{idjanela}}}i3GEOtabelaguia1obj' class='container-fluid customScrollBarXY'> | |
63 | +<div id='{{{idjanela}}}i3GEOtabelaguia1obj' class='container-fluid '> | |
66 | 64 | <div id='{{{idjanela}}}i3GEOFtabelaComboCabeca' class='form-group condensed' style='width: 450px'> |
67 | 65 | <span class="material-icons iconeComboTemas">playlist_add_check</span> |
68 | 66 | </div> |
... | ... | @@ -97,7 +95,7 @@ |
97 | 95 | <div id='{{{idjanela}}}i3GEOtabelaregistros' style='top: 10px;'></div> |
98 | 96 | </div> |
99 | 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 | 99 | <div class='form-group condensed'> |
102 | 100 | <label class="control-label">{{{itemcalc}}}</label> |
103 | 101 | <div id='{{{idjanela}}}i3GEOtabelaitensGuia3'></div> |
... | ... | @@ -115,7 +113,7 @@ |
115 | 113 | <h5 class="alert alert-info">{{{paraqueas}}}</h5> |
116 | 114 | </div> |
117 | 115 | <!-- Relatorio --> |
118 | -<div id='{{{idjanela}}}i3GEOtabelaguia5obj' class='container-fluid customScrollBarXY'> | |
116 | +<div id='{{{idjanela}}}i3GEOtabelaguia5obj' class='container-fluid '> | |
119 | 117 | <div class='form-group condensed'> |
120 | 118 | <label>{{{itensrel}}}</label> |
121 | 119 | <div id='{{{idjanela}}}i3GEOtabelaitensrelatorio' style='overflow: auto; height: 120px; top: 10px;'></div> | ... | ... |