Commit 3010dad2059576fe52a6b7bdeac2f4982b00a8e1
1 parent
b06f3340
Exists in
master
and in
7 other branches
Adaptação da ferramenta Seleção para uso do Bootstrap
Showing
9 changed files
with
384 additions
and
381 deletions
Show diff stats
classesphp/classe_temas.php
| ... | ... | @@ -526,6 +526,7 @@ $testa - Testa o filtro e retorna uma imagem. |
| 526 | 526 | return "erro"; |
| 527 | 527 | } |
| 528 | 528 | $layer->setmetadata("cache",""); |
| 529 | + $layer->set("template","none.htm"); | |
| 529 | 530 | $fil = $layer->getFilterString(); |
| 530 | 531 | $filtro = str_replace("|","'",$filtro); |
| 531 | 532 | if ($layer->connectiontype == MS_POSTGIS){ |
| ... | ... | @@ -541,18 +542,22 @@ $testa - Testa o filtro e retorna uma imagem. |
| 541 | 542 | } |
| 542 | 543 | else{ |
| 543 | 544 | //testa o filtro |
| 544 | - $teste = $layer->querybyattributes($items[0],$filtro,1); | |
| 545 | - if($teste != MS_SUCCESS){ | |
| 546 | - $teste = $this->layer->queryByAttributes($items[0], mb_convert_encoding($filtro,"ISO-8859-1","UTF-8"), 1); | |
| 545 | + if(mb_convert_encoding($filtro,"UTF-8","ISO-8859-1") != mb_convert_encoding($filtro,"ISO-8859-1","UTF-8")){ | |
| 546 | + $teste = $layer->querybyattributes($items[0],$filtro,1); | |
| 547 | 547 | if($teste != MS_SUCCESS){ |
| 548 | - $teste = $this->layer->queryByAttributes($items[0], mb_convert_encoding($filtro,"UTF-8","ISO-8859-1"), 1); | |
| 549 | - $filtro = mb_convert_encoding($filtro,"UTF-8","ISO-8859-1"); | |
| 548 | + $teste = $this->layer->queryByAttributes($items[0], mb_convert_encoding($filtro,"ISO-8859-1","UTF-8"), 1); | |
| 549 | + if($teste != MS_SUCCESS){ | |
| 550 | + $teste = $this->layer->queryByAttributes($items[0], mb_convert_encoding($filtro,"UTF-8","ISO-8859-1"), 1); | |
| 551 | + $filtro = mb_convert_encoding($filtro,"UTF-8","ISO-8859-1"); | |
| 552 | + } | |
| 553 | + else{ | |
| 554 | + $filtro = mb_convert_encoding($filtro,"ISO-8859-1","UTF-8"); | |
| 555 | + } | |
| 550 | 556 | } |
| 551 | - else{ | |
| 552 | - $filtro = mb_convert_encoding($filtro,"ISO-8859-1","UTF-8"); | |
| 557 | + if($teste == MS_SUCCESS){ | |
| 558 | + $layer->setfilter($filtro); | |
| 553 | 559 | } |
| 554 | - } | |
| 555 | - if($teste == MS_SUCCESS){ | |
| 560 | + } else { | |
| 556 | 561 | $layer->setfilter($filtro); |
| 557 | 562 | } |
| 558 | 563 | } | ... | ... |
ferramentas/animacao/index.js
ferramentas/filtro/index.js
| ... | ... | @@ -193,11 +193,6 @@ i3GEOF.filtro = { |
| 193 | 193 | i3GEOF.filtro.inicia(divid,modoCalculadora,idRetorno); |
| 194 | 194 | |
| 195 | 195 | }, |
| 196 | - /* | |
| 197 | - Function: adicionaLinhaFiltro | |
| 198 | - | |
| 199 | - Adiciona uma nova linha de filtro | |
| 200 | - */ | |
| 201 | 196 | removeLinha : function(obj,id){ |
| 202 | 197 | var linha = $i("linhaFiltro"+id); |
| 203 | 198 | linha.parentNode.removeChild(linha); | ... | ... |
| ... | ... | @@ -0,0 +1,23 @@ |
| 1 | +<?php | |
| 2 | +include(dirname(__FILE__)."/../blacklist.php"); | |
| 3 | +verificaBlFerramentas(basename(dirname(__FILE__))); | |
| 4 | + | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * Carrega os programas javascript necessarios para a ferramenta | |
| 8 | + * Esse programa e usado na tag <script> ou com a funcao scripttag do i3Geo | |
| 9 | + * Alem de carregar os scripts, carrega tambem o template no formato MUSTACHE, definindo a variavel | |
| 10 | + * javascript i3GEOF.animacao.MUSTACHE | |
| 11 | + * O template e substituido pelos valores definidos em index.js no momento da inicializacao da ferramenta | |
| 12 | + */ | |
| 13 | +if(extension_loaded('zlib')){ | |
| 14 | + ob_start('ob_gzhandler'); | |
| 15 | +} | |
| 16 | +header("Content-type: text/javascript"); | |
| 17 | +include("index.js"); | |
| 18 | +include("dicionario.js"); | |
| 19 | +echo "\n"; | |
| 20 | +if(extension_loaded('zlib')){ | |
| 21 | + ob_end_flush(); | |
| 22 | +} | |
| 23 | +?> | |
| 0 | 24 | \ No newline at end of file | ... | ... |
ferramentas/selecao/dicionario.js
| ... | ... | @@ -170,28 +170,13 @@ i3GEOF.selecao.dicionario = { |
| 170 | 170 | en : "", |
| 171 | 171 | es : "" |
| 172 | 172 | } ], |
| 173 | - 35 : [ { | |
| 174 | - pt : "", | |
| 173 | + "fonte" : [ { | |
| 174 | + pt : "Escolha um ou mais temas que serão alvo da seleção", | |
| 175 | 175 | en : "", |
| 176 | 176 | es : "" |
| 177 | 177 | } ], |
| 178 | - 36 : [ { | |
| 179 | - pt : "", | |
| 180 | - en : "", | |
| 181 | - es : "" | |
| 182 | - } ], | |
| 183 | - 37 : [ { | |
| 184 | - pt : "", | |
| 185 | - en : "", | |
| 186 | - es : "" | |
| 187 | - } ], | |
| 188 | - 38 : [ { | |
| 189 | - pt : "", | |
| 190 | - en : "", | |
| 191 | - es : "" | |
| 192 | - } ], | |
| 193 | - 39 : [ { | |
| 194 | - pt : "", | |
| 178 | + "opsel" : [ { | |
| 179 | + pt : "Opções de seleção. Clique no ícone para ativar.", | |
| 195 | 180 | en : "", |
| 196 | 181 | es : "" |
| 197 | 182 | } ] | ... | ... |
ferramentas/selecao/index.js
| ... | ... | @@ -50,28 +50,26 @@ i3GEOF.selecao = |
| 50 | 50 | * Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela. |
| 51 | 51 | */ |
| 52 | 52 | aguarde : "", |
| 53 | - /* | |
| 54 | - * Para efeitos de compatibilidade antes da versão 4.7 que não tinha dicionário | |
| 53 | + comboTemas: "", | |
| 54 | + /** | |
| 55 | + * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php | |
| 55 | 56 | */ |
| 56 | - criaJanelaFlutuante : function() { | |
| 57 | - i3GEOF.selecao.iniciaDicionario(); | |
| 58 | - }, | |
| 59 | - /* | |
| 60 | - * Function: iniciaDicionario | |
| 61 | - * | |
| 62 | - * Carrega o dicionário e chama a função que inicia a ferramenta | |
| 63 | - * | |
| 64 | - * O Javascript é carregado com o id i3GEOF.nomedaferramenta.dicionario_script | |
| 57 | + MUSTACHE : "", | |
| 58 | + MUSTACHELINHAFILTRO: "", | |
| 59 | + /** | |
| 60 | + * Susbtitutos para o template | |
| 65 | 61 | */ |
| 66 | - iniciaDicionario : function() { | |
| 67 | - if (typeof (i3GEOF.selecao.dicionario) === 'undefined') { | |
| 68 | - i3GEO.util.scriptTag( | |
| 69 | - i3GEO.configura.locaplic + "/ferramentas/selecao/dicionario.js", | |
| 70 | - "i3GEOF.selecao.iniciaJanelaFlutuante()", | |
| 71 | - "i3GEOF.selecao.dicionario_script"); | |
| 72 | - } else { | |
| 73 | - i3GEOF.selecao.iniciaJanelaFlutuante(); | |
| 62 | + mustacheHash : function() { | |
| 63 | + var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.selecao.dicionario); | |
| 64 | + dicionario["locaplic"] = i3GEO.configura.locaplic; | |
| 65 | + if (i3GEO.Interface.ATUAL === "openlayers"){ | |
| 66 | + dicionario["i3GEOselecaoboxHidden"] = "hidden"; | |
| 74 | 67 | } |
| 68 | + else { | |
| 69 | + dicionario["i3GEOselecaoboxHidden"] = ""; | |
| 70 | + } | |
| 71 | + dicionario["p8"] = $trad("p8"); | |
| 72 | + return dicionario; | |
| 75 | 73 | }, |
| 76 | 74 | /* |
| 77 | 75 | * Function: inicia |
| ... | ... | @@ -83,8 +81,21 @@ i3GEOF.selecao = |
| 83 | 81 | * iddiv {String} - id do div que receberá o conteudo HTML da ferramenta |
| 84 | 82 | */ |
| 85 | 83 | inicia : function(iddiv) { |
| 84 | + var t1 = i3GEO.configura.locaplic + "/ferramentas/selecao/template_mst.html", | |
| 85 | + t2 = i3GEO.configura.locaplic + "/ferramentas/selecao/template_linhafiltro_mst.html"; | |
| 86 | + if(i3GEOF.selecao.MUSTACHE == ""){ | |
| 87 | + $.when( $.get(t1),$.get(t2) ).done(function(r1,r2) { | |
| 88 | + i3GEOF.selecao.MUSTACHE = r1[0]; | |
| 89 | + i3GEOF.selecao.MUSTACHELINHAFILTRO = r2[0]; | |
| 90 | + i3GEOF.selecao.inicia(iddiv); | |
| 91 | + }).fail(function() { | |
| 92 | + i3GEO.janela.closeMsg($trad("erroTpl")); | |
| 93 | + return; | |
| 94 | + }); | |
| 95 | + return; | |
| 96 | + } | |
| 86 | 97 | var b, i, n, ics; |
| 87 | - try { | |
| 98 | + | |
| 88 | 99 | $i(iddiv).innerHTML += i3GEOF.selecao.html(); |
| 89 | 100 | i3GEO.guias.mostraGuiaFerramenta("i3GEOselecaoguia1", "i3GEOselecaoguia"); |
| 90 | 101 | // eventos das guias |
| ... | ... | @@ -106,49 +117,45 @@ i3GEOF.selecao = |
| 106 | 117 | $i("i3GEOselecaoparametros").innerHTML = ""; |
| 107 | 118 | } catch (e) { |
| 108 | 119 | } |
| 109 | - i3GEOF.selecao.adicionaLinhaFiltro(); | |
| 120 | + // | |
| 121 | + //pega a lista de itens e chama a função de montagem das opções de criação do filtro | |
| 122 | + // | |
| 123 | + var tema = i3GEOF.selecao.pegaTemasSel(); | |
| 124 | + tema = tema[1][0]; | |
| 125 | + i3GEO.util.comboItens( | |
| 126 | + "", | |
| 127 | + tema, | |
| 128 | + function(retorno){ | |
| 129 | + i3GEOF.selecao.comboTemas = retorno.dados; | |
| 130 | + i3GEOF.selecao.adicionaLinhaFiltro(); | |
| 131 | + }, | |
| 132 | + "", | |
| 133 | + "coluna", | |
| 134 | + "", | |
| 135 | + "", | |
| 136 | + "form-control" | |
| 137 | + ); | |
| 110 | 138 | } |
| 111 | 139 | }; |
| 112 | 140 | $i("i3GEOselecaoguia3").onclick = function() { |
| 113 | 141 | i3GEO.guias.mostraGuiaFerramenta("i3GEOselecaoguia3", "i3GEOselecaoguia"); |
| 114 | - i3GEO.util.comboTemas("i3GEOselecaoTemaoverlay", function(retorno) { | |
| 115 | - $i("i3GEOselecaooverlay").innerHTML = retorno.dados; | |
| 116 | - }, "i3GEOselecaooverlay", "", false, "naolinearSelecionados", "display:block"); | |
| 142 | + i3GEO.util.comboTemas( | |
| 143 | + "i3GEOselecaoTemaoverlay", | |
| 144 | + function(retorno) { | |
| 145 | + $i("i3GEOselecaooverlay").innerHTML = retorno.dados; | |
| 146 | + }, | |
| 147 | + "i3GEOselecaooverlay", | |
| 148 | + "", | |
| 149 | + false, | |
| 150 | + "naolinearSelecionados", | |
| 151 | + "", | |
| 152 | + "", | |
| 153 | + "", | |
| 154 | + "form-control" | |
| 155 | + ); | |
| 117 | 156 | }; |
| 118 | 157 | i3GEOF.selecao.criaCombosTemas(); |
| 119 | - | |
| 120 | - i3GEO.util.mensagemAjuda("i3GEOselecaomen1", $i("i3GEOselecaomen1").innerHTML); | |
| 121 | - i3GEO.util.mensagemAjuda("i3GEOselecaomen2", $i("i3GEOselecaomen2").innerHTML); | |
| 122 | - b = new YAHOO.widget.Button("i3GEOselecaobotao1", { | |
| 123 | - onclick : { | |
| 124 | - fn : i3GEOF.selecao.atributo | |
| 125 | - } | |
| 126 | - }); | |
| 127 | - b.addClass("rodar"); | |
| 128 | - b = new YAHOO.widget.Button("i3GEOselecaobotao2", { | |
| 129 | - onclick : { | |
| 130 | - fn : i3GEOF.selecao.aplicaselecaoTema | |
| 131 | - } | |
| 132 | - }); | |
| 133 | - b.addClass("rodar"); | |
| 134 | - | |
| 135 | - b = new YAHOO.widget.Button("i3GEOFSelecaoQuery", { | |
| 136 | - onclick : { | |
| 137 | - fn : i3GEO.mapa.dialogo.queryMap | |
| 138 | - } | |
| 139 | - }); | |
| 140 | - b.addClass("abrir"); | |
| 141 | - | |
| 142 | 158 | i3GEOF.selecao.ativaFoco(); |
| 143 | - ics = $i("i3GEOselecaoguia1obj").getElementsByTagName("button"); | |
| 144 | - n = ics.length; | |
| 145 | - for (i = 0; i < n; i++) { | |
| 146 | - ics[i].style.backgroundColor = "white"; | |
| 147 | - ics[i].className = "iconeGuiaMovel"; | |
| 148 | - } | |
| 149 | - } catch (erro) { | |
| 150 | - i3GEO.janela.tempoMsg(erro); | |
| 151 | - } | |
| 152 | 159 | }, |
| 153 | 160 | /* |
| 154 | 161 | * Function: html |
| ... | ... | @@ -160,162 +167,7 @@ i3GEOF.selecao = |
| 160 | 167 | * String com o código html |
| 161 | 168 | */ |
| 162 | 169 | html : function() { |
| 163 | - var ins = | |
| 164 | - '' + '<div id=i3GEOselecaoguiasYUI class="yui-navset" style="top:0px;cursor:pointer;left:0px;">' | |
| 165 | - + ' <ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;">' | |
| 166 | - + ' <li><div id="i3GEOselecaoguia4" style="text-align: center; left: 0px;"><a><em><img class="ticPropriedades2" style="height: 14px" src="' + i3GEO.configura.locaplic | |
| 167 | - + '/imagens/branco.gif"></em></a></div></li>' | |
| 168 | - + ' <li><a ><em><div id="i3GEOselecaoguia1" style="text-align:center;left:0px;" >' | |
| 169 | - + $trad('mapa', i3GEOF.selecao.dicionario) | |
| 170 | - + '</div></em></a></li>' | |
| 171 | - + ' <li><a ><em><div id="i3GEOselecaoguia2" style="text-align:center;left:0px;" >' | |
| 172 | - + $trad('atributos', i3GEOF.selecao.dicionario) | |
| 173 | - + '</div></em></a></li>' | |
| 174 | - + ' <li><a ><em><div id="i3GEOselecaoguia3" style="text-align:center;left:0px;" >' | |
| 175 | - + $trad('cruzamento', i3GEOF.selecao.dicionario) | |
| 176 | - + '</div></em></a></li>' | |
| 177 | - + ' </ul>' | |
| 178 | - + '</div><br>' | |
| 179 | - + '<div class=guiaobj id="i3GEOselecaoguia4obj" style="left:1px;display:none;">' | |
| 180 | - + ' <p class="paragrafo">' | |
| 181 | - + ' <input type="checkbox" onclick="" id="i3GEOFselecaoMantemFigura" style="cursor: pointer; border: 0px solid white;" />' | |
| 182 | - + ' <label>' | |
| 183 | - + $trad('mantemfigura', i3GEOF.selecao.dicionario) | |
| 184 | - + '</label>' | |
| 185 | - + ' </p>' | |
| 186 | - + ' <br><p class=paragrafo >' | |
| 187 | - + $trad('distanciaSelecao', i3GEOF.selecao.dicionario) | |
| 188 | - + ' <div class="i3geoForm i3geoFormIconeDistancia">' | |
| 189 | - + ' <input type=number id=i3GEOselecaotoleranciapt value=0 /></div>' | |
| 190 | - + ' <br><p class=paragrafo ><input id=i3GEOFSelecaoQuery type=button value="' | |
| 191 | - + $trad("p8") | |
| 192 | - + '" /></p>' | |
| 193 | - + ' <br><div id=i3GEOselecaomen1 style=left:0px;width:95%; >' | |
| 194 | - + ' <p class=paragrafo >' | |
| 195 | - + $trad('ajuda', i3GEOF.selecao.dicionario) | |
| 196 | - + ' </p></div>' | |
| 197 | - + '</div>' | |
| 198 | - + '<div class=guiaobj id="i3GEOselecaoguia1obj" style="left:1px;display:none;top:-5px">' | |
| 199 | - + ' <p class=paragrafo style=font-size:0px; ><button title="Clique no mapa para selecionar" value="i3GEOselecaopt" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.tiposel(this)"><img id=i3GEOselecaopt src="' | |
| 200 | - + i3GEO.configura.locaplic | |
| 201 | - + '/imagens/gisicons/select-one.png" /></button>'; | |
| 202 | - if (i3GEO.Interface.ATUAL != "googleearth") { | |
| 203 | - ins += | |
| 204 | - ' <button title="' + $trad('desenhaPoligono', i3GEOF.selecao.dicionario) | |
| 205 | - + '" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.tiposel(this)" value="i3GEOselecaopoli"><img id=i3GEOselecaopoli src="' | |
| 206 | - + i3GEO.configura.locaplic | |
| 207 | - + '/imagens/gisicons/select-polygon.png" /></button>'; | |
| 208 | - } | |
| 209 | - ins += | |
| 210 | - ' <button title="' + $trad('selecionaVisivel', i3GEOF.selecao.dicionario) | |
| 211 | - + '" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.tiposel(this)" value="i3GEOselecaoext" ><img id=i3GEOselecaoext src="' | |
| 212 | - + i3GEO.configura.locaplic | |
| 213 | - + '/imagens/gisicons/map.png" /></button>'; | |
| 214 | - ins += | |
| 215 | - ' <button title="' + $trad('utilizaFiguraDesenhada', i3GEOF.selecao.dicionario) | |
| 216 | - + '" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.tiposel(this)" value="i3GEOselecaofigura"><img id=i3GEOselecaoFigura src="' | |
| 217 | - + i3GEO.configura.locaplic | |
| 218 | - + '/imagens/gisicons/select.png" /></button>'; | |
| 219 | - | |
| 220 | - if (i3GEO.Interface.ATUAL === "openlayers") { | |
| 221 | - ins += | |
| 222 | - ' <button title="' + $trad('selecionaRetangulo', i3GEOF.selecao.dicionario) | |
| 223 | - + '" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.tiposel(this)" value="i3GEOselecaobox" ><img id=i3GEOselecaobox src="' | |
| 224 | - + i3GEO.configura.locaplic | |
| 225 | - + '/imagens/gisicons/select-rectangle.png" /></button>'; | |
| 226 | - } | |
| 227 | - ins += | |
| 228 | - ' <button title="' + $trad('inverteSelecao', i3GEOF.selecao.dicionario) | |
| 229 | - + '" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.operacao(\'inverte\')"><img src="' | |
| 230 | - + i3GEO.configura.locaplic | |
| 231 | - + '/imagens/gisicons/selection-invert.png" /></button>' | |
| 232 | - + ' <button title="' | |
| 233 | - + $trad('limpaSelecao', i3GEOF.selecao.dicionario) | |
| 234 | - + '" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.operacao(\'limpa\')"><img src="' | |
| 235 | - + i3GEO.configura.locaplic | |
| 236 | - + '/imagens/gisicons/selected-delete.png" /></button>' | |
| 237 | - + ' <button title="' | |
| 238 | - + $trad('salvaSelecao', i3GEOF.selecao.dicionario) | |
| 239 | - + '" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.criatema()"><img src="' | |
| 240 | - + i3GEO.configura.locaplic | |
| 241 | - + '/imagens/gisicons/save1.png" /></button>' | |
| 242 | - + ' <button title="' | |
| 243 | - + $trad('grafico', i3GEOF.selecao.dicionario) | |
| 244 | - + '" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.grafico()"><img src="' | |
| 245 | - + i3GEO.configura.locaplic | |
| 246 | - + '/imagens/gisicons/layer-vector-chart-add.png" /></button>' | |
| 247 | - + ' <button title="' | |
| 248 | - + $trad('perfil', i3GEOF.selecao.dicionario) | |
| 249 | - + '" onclick="i3GEO.util.animaClique(this);i3GEOF.selecao.graficoPerfil()"><img src="' | |
| 250 | - + i3GEO.configura.locaplic | |
| 251 | - + '/imagens/gisicons/grafico-perfil.png" /></button>' | |
| 252 | - + ' <button title="' | |
| 253 | - + $trad('editor', i3GEOF.selecao.dicionario) | |
| 254 | - + '" onclick="i3GEO.util.animaClique(this);i3GEO.editor.inicia()"><img src="' | |
| 255 | - + i3GEO.configura.locaplic | |
| 256 | - + '/imagens/gisicons/edit.png" /></button>' | |
| 257 | - + ' <div style=margin-left:8px;text-align:left; >' | |
| 258 | - + ' <div class="styled-select">' | |
| 259 | - + ' <select title="' | |
| 260 | - + $trad('tipoOperacao', i3GEOF.selecao.dicionario) | |
| 261 | - + '" id=i3GEOselecaotipoOperacao >' | |
| 262 | - + ' <option value="adiciona" >' | |
| 263 | - + $trad('adicionaASelecao', i3GEOF.selecao.dicionario) | |
| 264 | - + '</option>' | |
| 265 | - + ' <option value="novo" >' | |
| 266 | - + $trad('novaSelecao', i3GEOF.selecao.dicionario) | |
| 267 | - + '</option>' | |
| 268 | - + ' <option value="retira" >' | |
| 269 | - + $trad('retiraDaSelecao', i3GEOF.selecao.dicionario) | |
| 270 | - + '</option>' | |
| 271 | - + ' </select></div>' | |
| 272 | - + ' <span id=i3GEOselecaoNsel class=paragrafo >0</span>' | |
| 273 | - + ' <br><p class=paragrafo >' | |
| 274 | - + $trad('temas', i3GEOF.selecao.dicionario) | |
| 275 | - + '<div id=i3GEOselecaoComboTemas style=text-align:left; ></div>' | |
| 276 | - + ' </div> ' | |
| 277 | - + ' </div>' | |
| 278 | - + '</div>' | |
| 279 | - + '<div class=guiaobj id="i3GEOselecaoguia2obj" style="left:1px;display:none;">' | |
| 280 | - + ' <p class=paragrafo ><input id=i3GEOselecaobotao1 size=18 type="button" value="' | |
| 281 | - + $trad('seleciona', i3GEOF.selecao.dicionario) | |
| 282 | - + '" /></p>' | |
| 283 | - + ' <table summary="" id="i3GEOselecaoparametros" style="width:380px" >' | |
| 284 | - + ' <tbody><tr><td></td><td></td>' | |
| 285 | - + ' <td style=background-color:yellow >' | |
| 286 | - + $trad('item', i3GEOF.selecao.dicionario) | |
| 287 | - + '</td>' | |
| 288 | - + ' <td style=background-color:yellow >' | |
| 289 | - + $trad('operador', i3GEOF.selecao.dicionario) | |
| 290 | - + '</td>' | |
| 291 | - + ' <td style=background-color:yellow >' | |
| 292 | - + $trad('valor', i3GEOF.selecao.dicionario) | |
| 293 | - + '</td>' | |
| 294 | - + ' <td style=background-color:yellow ></td>' | |
| 295 | - + ' <td style=background-color:yellow >' | |
| 296 | - + $trad('conector', i3GEOF.selecao.dicionario) | |
| 297 | - + '</td>' | |
| 298 | - + ' </tr>' | |
| 299 | - + ' <tr><td> </td><td></td><td></td><td></td><td></td><td></td></tr></tbody>' | |
| 300 | - + ' </table>' | |
| 301 | - + ' <div id=i3GEOselecaoresultado style="position:relative;top:5px;left:0px">' | |
| 302 | - + ' </div>' | |
| 303 | - + ' <div id=i3GEOselecaovalores style="position:relative;top:5px;left:0px">' | |
| 304 | - + ' </div>' | |
| 305 | - + ' <div id=i3GEOselecaomen2 style=top:15px;left:0px; ><p class=paragrafo >' | |
| 306 | - + $trad('separaComVirgula', i3GEOF.selecao.dicionario) | |
| 307 | - + '</div>' | |
| 308 | - + '</div> ' | |
| 309 | - + '<div class=guiaobj id="i3GEOselecaoguia3obj" style="left:1px;display:none;">' | |
| 310 | - + ' <p class=paragrafo >' | |
| 311 | - + $trad('temaSelecaoMapa', i3GEOF.selecao.dicionario) | |
| 312 | - + '</p>' | |
| 313 | - + ' <div id="i3GEOselecaooverlay" class="styled-select" >' | |
| 314 | - + ' </div>' | |
| 315 | - + ' <br><p class=paragrafo ><input id=i3GEOselecaobotao2 size=10 type=button value="' | |
| 316 | - + $trad('aplica', i3GEOF.selecao.dicionario) | |
| 317 | - + '">' | |
| 318 | - + '</div>'; | |
| 170 | + var ins = Mustache.render(i3GEOF.selecao.MUSTACHE, i3GEOF.selecao.mustacheHash()); | |
| 319 | 171 | return ins; |
| 320 | 172 | }, |
| 321 | 173 | /* |
| ... | ... | @@ -340,7 +192,25 @@ i3GEOF.selecao = |
| 340 | 192 | + "</div><a class='i3GeoTituloJanelaBs' href='javascript:void(0)' onclick='i3GEO.ajuda.ferramenta(\"48a\")' >" |
| 341 | 193 | + $trad("x51") |
| 342 | 194 | + "</a>"; |
| 343 | - janela = i3GEO.janela.cria("510px", "230px", "", "", "", titulo, "i3GEOF.selecao", false, "hd", cabecalho, minimiza); | |
| 195 | + janela = i3GEO.janela.cria( | |
| 196 | + "510px", | |
| 197 | + "230px", | |
| 198 | + "", | |
| 199 | + "", | |
| 200 | + "", | |
| 201 | + titulo, | |
| 202 | + "i3GEOF.selecao", | |
| 203 | + false, | |
| 204 | + "hd", | |
| 205 | + cabecalho, | |
| 206 | + minimiza, | |
| 207 | + "", | |
| 208 | + true, | |
| 209 | + "", | |
| 210 | + "", | |
| 211 | + "", | |
| 212 | + "" | |
| 213 | + ); | |
| 344 | 214 | divid = janela[2].id; |
| 345 | 215 | i3GEOF.selecao.aguarde = $i("i3GEOF.selecao_imagemCabecalho").style; |
| 346 | 216 | $i("i3GEOF.selecao_corpo").style.backgroundColor = "white"; |
| ... | ... | @@ -359,7 +229,7 @@ i3GEOF.selecao = |
| 359 | 229 | if(i3GEO.Interface["ATUAL"] === "openlayers"){ |
| 360 | 230 | if (typeof OpenLayers.Control == "undefined") { |
| 361 | 231 | api = "ol3"; |
| 362 | - i3GEO.Interface.openlayers.interacoes[0].setActive(true);//duplo clique | |
| 232 | + //i3GEO.Interface.openlayers.interacoes[0].setActive(true);//duplo clique | |
| 363 | 233 | } else { |
| 364 | 234 | api = "openlayers"; |
| 365 | 235 | } |
| ... | ... | @@ -395,25 +265,36 @@ i3GEOF.selecao = |
| 395 | 265 | * Cria os combos de seleção de temas |
| 396 | 266 | */ |
| 397 | 267 | criaCombosTemas : function() { |
| 398 | - i3GEO.util.comboTemas("i3GEOselecaotemasLigados", function(retorno) { | |
| 399 | - var nsel, temp; | |
| 400 | - temp = $i("i3GEOselecaoComboTemas"); | |
| 401 | - if (!temp) { | |
| 402 | - return; | |
| 403 | - } | |
| 404 | - temp.innerHTML = retorno.dados; | |
| 405 | - if ($i("i3GEOselecaotemasLigados")) { | |
| 406 | - $i("i3GEOselecaotemasLigados").value = i3GEO.temaAtivo; | |
| 407 | - // verifica qts elementos selecionados | |
| 408 | - if (i3GEO.temaAtivo != "") { | |
| 409 | - nsel = i3GEO.arvoreDeCamadas.pegaTema(i3GEO.temaAtivo); | |
| 410 | - $i("i3GEOselecaoNsel").innerHTML = $trad('selecionados', i3GEOF.selecao.dicionario) + ": " + (nsel.nsel) + "<br>"; | |
| 411 | - } | |
| 412 | - $i("i3GEOselecaotemasLigados").onchange = function() { | |
| 413 | - i3GEOF.selecao.pegaTemasSel(); | |
| 414 | - }; | |
| 415 | - } | |
| 416 | - }, "i3GEOselecaoComboTemas", "", true, "ligados", "width:440px;font-size:12px"); | |
| 268 | + i3GEO.util.comboTemas( | |
| 269 | + "i3GEOselecaotemasLigados", | |
| 270 | + function(retorno) { | |
| 271 | + var nsel, temp; | |
| 272 | + temp = $i("i3GEOselecaoComboTemas"); | |
| 273 | + if (!temp) { | |
| 274 | + return; | |
| 275 | + } | |
| 276 | + temp.innerHTML = retorno.dados; | |
| 277 | + if ($i("i3GEOselecaotemasLigados")) { | |
| 278 | + $i("i3GEOselecaotemasLigados").value = i3GEO.temaAtivo; | |
| 279 | + // verifica qts elementos selecionados | |
| 280 | + if (i3GEO.temaAtivo != "") { | |
| 281 | + nsel = i3GEO.arvoreDeCamadas.pegaTema(i3GEO.temaAtivo); | |
| 282 | + $i("i3GEOselecaoNsel").innerHTML = $trad('selecionados', i3GEOF.selecao.dicionario) + ": " + (nsel.nsel) + "<br>"; | |
| 283 | + } | |
| 284 | + $i("i3GEOselecaotemasLigados").onchange = function() { | |
| 285 | + i3GEOF.selecao.pegaTemasSel(); | |
| 286 | + }; | |
| 287 | + } | |
| 288 | + }, | |
| 289 | + "i3GEOselecaoComboTemas", | |
| 290 | + "", | |
| 291 | + true, | |
| 292 | + "ligados", | |
| 293 | + "", | |
| 294 | + "", | |
| 295 | + "", | |
| 296 | + "form-control" | |
| 297 | + ); | |
| 417 | 298 | }, |
| 418 | 299 | /* |
| 419 | 300 | * Function: mudaicone |
| ... | ... | @@ -442,7 +323,7 @@ i3GEOF.selecao = |
| 442 | 323 | $i("i3GEOselecaoNsel").innerHTML = $trad('selecionados', i3GEOF.selecao.dicionario) + ": " + (nsel.nsel) + "<br>"; |
| 443 | 324 | } |
| 444 | 325 | } |
| 445 | - return selectedArray.toString(); | |
| 326 | + return [selectedArray.toString(),selectedArray]; | |
| 446 | 327 | }, |
| 447 | 328 | /* |
| 448 | 329 | * Function: fimSelecao |
| ... | ... | @@ -519,6 +400,8 @@ i3GEOF.selecao = |
| 519 | 400 | var api, fim = function(retorno) { |
| 520 | 401 | i3GEOF.selecao.fimSelecao(retorno); |
| 521 | 402 | }, tema = i3GEOF.selecao.pegaTemasSel(); |
| 403 | + tema = tema[0]; | |
| 404 | + | |
| 522 | 405 | if (i3GEO.Interface["ATUAL"] === "openlayers") { |
| 523 | 406 | if (typeof OpenLayers.Control == "undefined") { |
| 524 | 407 | api = "ol3"; |
| ... | ... | @@ -535,25 +418,25 @@ i3GEOF.selecao = |
| 535 | 418 | } |
| 536 | 419 | if (obj.value == "i3GEOselecaobox") { |
| 537 | 420 | i3GEOF.selecao.tipoSel = obj.value; |
| 538 | - obj.style.backgroundColor = "#cedff2"; | |
| 421 | + | |
| 539 | 422 | i3GEO.desenho[i3GEO.Interface["ATUAL"]].inicia(); |
| 540 | 423 | i3GEOF.selecao.box[api].inicia(); |
| 541 | 424 | } |
| 542 | 425 | if (obj.value == "i3GEOselecaopt") { |
| 543 | 426 | i3GEOF.selecao.tipoSel = obj.value; |
| 544 | - obj.style.backgroundColor = "#cedff2"; | |
| 427 | + | |
| 545 | 428 | i3GEO.desenho[i3GEO.Interface["ATUAL"]].inicia(); |
| 546 | 429 | i3GEOF.selecao.clique[api].inicia(); |
| 547 | 430 | } |
| 548 | 431 | if (obj.value == "i3GEOselecaopoli") { |
| 549 | 432 | i3GEOF.selecao.tipoSel = obj.value; |
| 550 | - obj.style.backgroundColor = "#cedff2"; | |
| 433 | + | |
| 551 | 434 | i3GEO.desenho[i3GEO.Interface["ATUAL"]].inicia(); |
| 552 | 435 | i3GEOF.selecao.poligono[api].inicia(); |
| 553 | 436 | } |
| 554 | 437 | if (obj.value == "i3GEOselecaofigura") { |
| 555 | 438 | i3GEOF.selecao.tipoSel = obj.value; |
| 556 | - obj.style.backgroundColor = "#cedff2"; | |
| 439 | + | |
| 557 | 440 | i3GEO.desenho[i3GEO.Interface["ATUAL"]].inicia(); |
| 558 | 441 | i3GEOF.selecao.figura[api].inicia(); |
| 559 | 442 | } |
| ... | ... | @@ -1200,120 +1083,48 @@ i3GEOF.selecao = |
| 1200 | 1083 | i3GEOF.selecao.aguarde.visibility = "hidden"; |
| 1201 | 1084 | } |
| 1202 | 1085 | }, |
| 1086 | + removeLinha : function(obj,id){ | |
| 1087 | + var linha = $i("linhaFiltro"+id); | |
| 1088 | + linha.parentNode.removeChild(linha); | |
| 1089 | + }, | |
| 1090 | + listaValores: function(id){ | |
| 1091 | + var itemTema = $("#linhaFiltro" + id + " [name='coluna']").val(); | |
| 1092 | + i3GEO.util.comboValoresItem( | |
| 1093 | + "i3GEOselecaocbitens", | |
| 1094 | + i3GEOF.selecao.tema, | |
| 1095 | + itemTema, | |
| 1096 | + function(retorno){ | |
| 1097 | + $i("i3GEOselecaovalores").innerHTML = "<label class='control-label'>" + | |
| 1098 | + $trad('selecionaValor',i3GEOF.selecao.dicionario) + | |
| 1099 | + ":</label>" + | |
| 1100 | + retorno.dados; | |
| 1101 | + if ($i("i3GEOselecaocbitens")){ | |
| 1102 | + $i("i3GEOselecaocbitens").onchange = function() { | |
| 1103 | + $("#linhaFiltro" + id + " [name='valor']").val(this.value); | |
| 1104 | + }; | |
| 1105 | + } | |
| 1106 | + }, | |
| 1107 | + "i3GEOselecaovalores", | |
| 1108 | + "form-control" | |
| 1109 | + ); | |
| 1110 | + }, | |
| 1203 | 1111 | /* |
| 1204 | 1112 | * Function: adicionaLinhaFiltro |
| 1205 | 1113 | * |
| 1206 | 1114 | * Adiciona uma nova linha de filtro |
| 1207 | 1115 | */ |
| 1208 | 1116 | adicionaLinhaFiltro : function() { |
| 1209 | - var add, xis, interrogacao, operador, conector, valor, ntr, ntad, ntd, ntd1, ntd2, ntd3, ntd4, ntd5, tabela; | |
| 1210 | - try { | |
| 1211 | - add = document.createElement("img"); | |
| 1212 | - add.src = i3GEO.configura.locaplic + '/imagens/oxygen/16x16/list-add.png'; | |
| 1213 | - add.style.cursor = "pointer"; | |
| 1214 | - add.onclick = function() { | |
| 1215 | - i3GEOF.selecao.adicionaLinhaFiltro(); | |
| 1216 | - }; | |
| 1217 | - | |
| 1218 | - xis = document.createElement("img"); | |
| 1219 | - xis.src = i3GEO.configura.locaplic + '/imagens/oxygen/16x16/edit-delete.png'; | |
| 1220 | - xis.style.cursor = "pointer"; | |
| 1221 | - xis.onclick = function() { | |
| 1222 | - var p = this.parentNode.parentNode.parentNode, i; | |
| 1223 | - for (i = 0; i < p.childNodes.length; i++) { | |
| 1224 | - p.removeChild(p.childNodes[i]); | |
| 1225 | - } | |
| 1226 | - }; | |
| 1227 | - interrogacao = document.createElement("img"); | |
| 1228 | - interrogacao.src = i3GEO.configura.locaplic + '/imagens/oxygen/16x16/format-line-spacing-normal.png'; | |
| 1229 | - interrogacao.title = 'mostra valores'; | |
| 1230 | - interrogacao.style.cursor = "pointer"; | |
| 1231 | - interrogacao.style.margin = "5px"; | |
| 1232 | - interrogacao.onclick = | |
| 1233 | - function() { | |
| 1234 | - var obj = (this.parentNode.parentNode.getElementsByTagName("input"))[0], itemTema = | |
| 1235 | - (this.parentNode.parentNode.getElementsByTagName("select"))[0].value; | |
| 1236 | - i3GEO.util.comboValoresItem("i3GEOselecaocbitens", i3GEO.temaAtivo, itemTema, function(retorno) { | |
| 1237 | - $i("i3GEOselecaovalores").innerHTML = | |
| 1238 | - "<br><p class=paragrafo >" + $trad('selecionaValor', i3GEOF.selecao.dicionario) | |
| 1239 | - + ":</p>" | |
| 1240 | - + "<div class='styled-select' >" | |
| 1241 | - + retorno.dados | |
| 1242 | - + "</div>"; | |
| 1243 | - if ($i("i3GEOselecaocbitens")) { | |
| 1244 | - $i("i3GEOselecaocbitens").onchange = function() { | |
| 1245 | - obj.value = this.value; | |
| 1246 | - }; | |
| 1247 | - } | |
| 1248 | - }, "i3GEOselecaovalores", "display:block"); | |
| 1249 | - }; | |
| 1250 | - operador = "<div class='styled-select' style='width:95px;margin-left:5px;'><select>"; | |
| 1251 | - operador += "<option value='='>=</option>"; | |
| 1252 | - operador += "<option value='!='> != </option>"; | |
| 1253 | - operador += "<option value='<'> < </option>"; | |
| 1254 | - operador += "<option value='>'> > </option>"; | |
| 1255 | - operador += "<option value='<='> <= </option>"; | |
| 1256 | - operador += "<option value='>='> >= </option>"; | |
| 1257 | - operador += "<option value='in'> in </option>"; | |
| 1258 | - operador += "<option value='ilike'>like (Postgis)</option>"; | |
| 1259 | - operador += "<option value='not ilike'>not like (Postgis)</option>"; | |
| 1260 | - operador += "<option value='~='> regExp </option></select></div>"; | |
| 1261 | - | |
| 1262 | - conector = "<div class='styled-select' style='width:95px;margin-left:5px;' ><select>"; | |
| 1263 | - conector += "<option value='and'>and</option>"; | |
| 1264 | - conector += "<option value='or'>or</option>"; | |
| 1265 | - conector += "<option value='not'>not</option></select></div>"; | |
| 1266 | - | |
| 1267 | - valor = document.createElement("div"); | |
| 1268 | - valor.className = 'i3geoForm100 i3geoFormIconeEdita'; | |
| 1269 | - valor.style.marginLeft = "5px"; | |
| 1270 | - valor.innerHTML = "<input type=text value='' />"; | |
| 1271 | - | |
| 1272 | - ntr = document.createElement("tr"); | |
| 1273 | - ntad = document.createElement("td"); | |
| 1274 | - ntad.appendChild(add); | |
| 1275 | - ntr.appendChild(ntad); | |
| 1276 | - | |
| 1277 | - ntd = document.createElement("td"); | |
| 1278 | - ntd.appendChild(xis); | |
| 1279 | - ntr.appendChild(ntd); | |
| 1280 | - | |
| 1281 | - ntd1 = document.createElement("td"); | |
| 1282 | - i3GEO.util.comboItens("i3GEOselecaoItensAtrib", i3GEO.temaAtivo, function(retorno) { | |
| 1283 | - ntd1.innerHTML = "<div class='styled-select' style='width:95px;margin-left:5px;' >" + retorno.dados + "</div>"; | |
| 1284 | - $i("i3GEOselecaoItensAtrib").onchange = function() { | |
| 1285 | - $i("i3GEOselecaovalores").innerHTML = ""; | |
| 1286 | - }; | |
| 1287 | - }); | |
| 1288 | - ntr.appendChild(ntd1); | |
| 1289 | - | |
| 1290 | - ntd2 = document.createElement("td"); | |
| 1291 | - ntd2.innerHTML = operador; | |
| 1292 | - ntr.appendChild(ntd2); | |
| 1293 | - | |
| 1294 | - ntd3 = document.createElement("td"); | |
| 1295 | - ntd3.appendChild(valor); | |
| 1296 | - ntr.appendChild(ntd3); | |
| 1297 | - | |
| 1298 | - ntd4 = document.createElement("td"); | |
| 1299 | - ntd4.appendChild(interrogacao); | |
| 1300 | - ntr.appendChild(ntd4); | |
| 1301 | - | |
| 1302 | - ntd5 = document.createElement("td"); | |
| 1303 | - ntd5.innerHTML = conector; | |
| 1304 | - ntr.appendChild(ntd5); | |
| 1305 | - | |
| 1306 | - // ntb = document.createElement("tbody"); | |
| 1307 | - // ntb.appendChild(ntr); | |
| 1308 | - if (navm) { | |
| 1309 | - tabela = $i("i3GEOselecaoparametros").getElementsByTagName("tbody")[0]; | |
| 1310 | - } else { | |
| 1311 | - tabela = $i("i3GEOselecaoparametros"); | |
| 1312 | - } | |
| 1313 | - tabela.appendChild(ntr); | |
| 1314 | - } catch (e) { | |
| 1315 | - i3GEO.janela.tempoMsg("Erro: " + e); | |
| 1316 | - } | |
| 1117 | + i3GEOF.selecao.CONTADOR++; | |
| 1118 | + var temp,ntr,tabela; | |
| 1119 | + ntr = document.createElement("tr"); | |
| 1120 | + ntr.id = "linhaFiltro"+i3GEOF.selecao.CONTADOR; | |
| 1121 | + temp = Mustache.render( | |
| 1122 | + "{{#data}}" + i3GEOF.selecao.MUSTACHELINHAFILTRO + "{{/data}}", | |
| 1123 | + {"data":{"comboTemas": i3GEOF.selecao.comboTemas,"contador": i3GEOF.selecao.CONTADOR, "escondeGuias": i3GEOF.selecao.dicionario["escondeGuias"]}} | |
| 1124 | + ); | |
| 1125 | + $(ntr).html(temp); | |
| 1126 | + tabela = $i("i3GEOselecaoparametros"); | |
| 1127 | + tabela.appendChild(ntr); | |
| 1317 | 1128 | }, |
| 1318 | 1129 | /* |
| 1319 | 1130 | * Function: atributo | ... | ... |
| ... | ... | @@ -0,0 +1,48 @@ |
| 1 | +<td> | |
| 2 | + <button onclick='i3GEOF.selecao.adicionaLinhaFiltro()' class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
| 3 | + <span class="material-icons">add</span> | |
| 4 | + </button> | |
| 5 | +</td> | |
| 6 | +<td> | |
| 7 | + <button onclick='i3GEOF.selecao.removeLinha(this,{{{contador}}})' class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
| 8 | + <span class="material-icons">clear</span> | |
| 9 | + </button> | |
| 10 | +</td> | |
| 11 | +<td> | |
| 12 | + <div class='form-group condensed' style="padding-left:10px;" >{{{comboTemas}}}</div> | |
| 13 | +</td> | |
| 14 | +<td> | |
| 15 | + <div class='form-group condensed' style="padding-left:10px;"> | |
| 16 | + <select class="form-control" name="operador" > | |
| 17 | + <option value="=">=</option> | |
| 18 | + <option value="!=">!=</option> | |
| 19 | + <option value="<"><</option> | |
| 20 | + <option value=">">></option> | |
| 21 | + <option value="<="><=</option> | |
| 22 | + <option value=">=">>=</option> | |
| 23 | + <option value="in">in</option> | |
| 24 | + <option value="ilike">like (Postgis)</option> | |
| 25 | + <option value="not ilike">not like (Postgis)</option> | |
| 26 | + <option value="~=">regExp</option> | |
| 27 | + </select> | |
| 28 | + </div> | |
| 29 | +</td> | |
| 30 | +<td> | |
| 31 | + <div class='form-group condensed' style="padding-left:10px;"> | |
| 32 | + <input class="form-control input" name="valor" type='text' value='' /> | |
| 33 | + </div> | |
| 34 | +</td> | |
| 35 | +<td> | |
| 36 | + <button onclick='i3GEOF.selecao.listaValores({{{contador}}});' class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
| 37 | + <span class="material-icons">build</span> | |
| 38 | + </button> | |
| 39 | +</td> | |
| 40 | +<td> | |
| 41 | + <div class='form-group condensed' style="padding-left:10px;"> | |
| 42 | + <select name="conector" class="form-control" > | |
| 43 | + <option value="and">and</option> | |
| 44 | + <option value="or">or</option> | |
| 45 | + <option value="not">not</option> | |
| 46 | + </select> | |
| 47 | + </div> | |
| 48 | +</td> | ... | ... |
| ... | ... | @@ -0,0 +1,126 @@ |
| 1 | +<div id=i3GEOselecaoguiasYUI class='yui-navset' style='top: 0px; cursor: pointer; margin-left: 2px;'> | |
| 2 | + <ul class="yui-nav" style="border-width: 0pt 0pt 0px; border-color: rgb(240, 240, 240); border-bottom-color: white;"> | |
| 3 | + <li> | |
| 4 | + <div id='i3GEOselecaoguia4' style='text-align: center; left: 0px;'> | |
| 5 | + <a title='{{{propriedades}}}'> | |
| 6 | + <em><span class="material-icons">settings</span></em> | |
| 7 | + </a> | |
| 8 | + </div> | |
| 9 | + </li> | |
| 10 | + <li> | |
| 11 | + <a> | |
| 12 | + <em><div id="i3GEOselecaoguia1" style="text-align: center; left: 0px;">{{{mapa}}}</div></em> | |
| 13 | + </a> | |
| 14 | + </li> | |
| 15 | + <li> | |
| 16 | + <a> | |
| 17 | + <em><div id="i3GEOselecaoguia2" style="text-align: center; left: 0px;">{{{atributos}}}</div></em> | |
| 18 | + </a> | |
| 19 | + </li> | |
| 20 | + <li> | |
| 21 | + <a> | |
| 22 | + <em><div id="i3GEOselecaoguia3" style="text-align: center; left: 0px;">{{{cruzamento}}}</div></em> | |
| 23 | + </a> | |
| 24 | + </li> | |
| 25 | + </ul> | |
| 26 | +</div> | |
| 27 | +<div id="i3GEOselecaoguia4obj" class="container-fluid"> | |
| 28 | + <div class="checkbox text-left"> | |
| 29 | + <label> | |
| 30 | + <input checked id='i3GEOFselecaoMantemFigura' type="checkbox" onclick=""> | |
| 31 | + <span class="checkbox-material noprint"> | |
| 32 | + <span class="check"></span> | |
| 33 | + </span> | |
| 34 | + {{{mantemfigura}}} | |
| 35 | + </label> | |
| 36 | + </div> | |
| 37 | + <div class='form-group label-fixed condensed'> | |
| 38 | + <label class="control-label" for="">{{{distanciaSelecao}}}</label> | |
| 39 | + <input class="form-control input-lg" type='text' id='i3GEOselecaotoleranciapt' value='2' /> | |
| 40 | + </div> | |
| 41 | + <button onclick="i3GEO.mapa.dialogo.queryMap()" class='btn btn-primary btn-sm btn-raised'>{{{p8}}}</button> | |
| 42 | + <h5 class="alert alert-info">{{{ajuda}}}</h5> | |
| 43 | +</div> | |
| 44 | +<div id="i3GEOselecaoguia1obj" class="container-fluid"> | |
| 45 | + <label class="control-label" for="tipo">{{{opsel}}}</label> | |
| 46 | + <div class="form-group condensed"> | |
| 47 | + <button class='btn btn-primary btn-sm btn-raised' title="Clique no mapa para selecionar" value="i3GEOselecaopt" onclick="i3GEOF.selecao.tiposel(this)"> | |
| 48 | + <img id=i3GEOselecaopt src="{{{locaplic}}}/imagens/gisicons/select-one.png" /> | |
| 49 | + </button> | |
| 50 | + <button class='btn btn-primary btn-sm btn-raised' title="{{{selecionaVisivel}}}" onclick=" i3GEOF.selecao.tiposel(this)" value="i3GEOselecaoext"> | |
| 51 | + <img id=i3GEOselecaoext src="{{{locaplic}}}/imagens/gisicons/map.png" /> | |
| 52 | + </button> | |
| 53 | + <button class='btn btn-primary btn-sm btn-raised' title="{{{utilizaFiguraDesenhada}}}" onclick="i3GEOF.selecao.tiposel(this)" value="i3GEOselecaofigura"> | |
| 54 | + <img id=i3GEOselecaoFigura src="{{{locaplic}}}/imagens/gisicons/select.png" /> | |
| 55 | + </button> | |
| 56 | + <button class='btn btn-primary btn-sm btn-raised {{{i3GEOselecaoboxHidden}}}' title="{{{selecionaRetangulo}}}" onclick="i3GEOF.selecao.tiposel(this)" | |
| 57 | + value="i3GEOselecaobox"> | |
| 58 | + <img id=i3GEOselecaobox src="{{{locaplic}}}/imagens/gisicons/select-rectangle.png" /> | |
| 59 | + </button> | |
| 60 | + <button class='btn btn-primary btn-sm btn-raised' title="{{{inverteSelecao}}}" onclick="i3GEOF.selecao.operacao('inverte')"> | |
| 61 | + <img src="{{{locaplic}}}/imagens/gisicons/selection-invert.png" /> | |
| 62 | + </button> | |
| 63 | + <button class='btn btn-primary btn-sm btn-raised' title="{{{limpaSelecao}}}" onclick="i3GEOF.selecao.operacao('limpa')"> | |
| 64 | + <img src="{{{locaplic}}}/imagens/gisicons/selected-delete.png" /> | |
| 65 | + </button> | |
| 66 | + <button class='btn btn-primary btn-sm btn-raised' title="{{{salvaSelecao}}}" onclick="i3GEOF.selecao.criatema()"> | |
| 67 | + <img src="{{{locaplic}}}/imagens/gisicons/save1.png" /> | |
| 68 | + </button> | |
| 69 | + <button class='btn btn-primary btn-sm btn-raised' title="{{{grafico}}}" onclick="i3GEOF.selecao.grafico()"> | |
| 70 | + <img src="{{{locaplic}}}/imagens/gisicons/layer-vector-chart-add.png" /> | |
| 71 | + </button> | |
| 72 | + <button class='btn btn-primary btn-sm btn-raised' title="{{{perfil}}}" onclick="i3GEOF.selecao.graficoPerfil()"> | |
| 73 | + <img src="{{{locaplic}}}/imagens/gisicons/grafico-perfil.png" /> | |
| 74 | + </button> | |
| 75 | + <button class='btn btn-primary btn-sm btn-raised' title="{{{editor}}}" onclick="i3GEO.editor.inicia()"> | |
| 76 | + <img src="{{{locaplic}}}/imagens/gisicons/edit.png" /> | |
| 77 | + </button> | |
| 78 | + </div> | |
| 79 | + <div class='form-group label-fixed condensed'> | |
| 80 | + <label class="control-label" for="i3GEOselecaotipoOperacao">{{{tipoOperacao}}}</label> | |
| 81 | + <div style="width: 100%;" class="input-group"> | |
| 82 | + <select class="form-control" title="{{{tipoOperacao}}}" id=i3GEOselecaotipoOperacao> | |
| 83 | + <option value="adiciona">{{{adicionaASelecao}}}</option> | |
| 84 | + <option value="novo">{{{novaSelecao}}}</option> | |
| 85 | + <option value="retira">{{{retiraDaSelecao}}}</option> | |
| 86 | + </select> | |
| 87 | + </div> | |
| 88 | + </div> | |
| 89 | + <h5 class="alert alert-info" id=i3GEOselecaoNsel></h5> | |
| 90 | + <div class='form-group label-fixed condensed'> | |
| 91 | + <label class="control-label" for="">{{{fonte}}}</label> | |
| 92 | + <div id=i3GEOselecaoComboTemas style="width: 100%;" class="input-group"></div> | |
| 93 | + </div> | |
| 94 | +</div> | |
| 95 | +</div> | |
| 96 | +<div id="i3GEOselecaoguia2obj" class="container-fluid"> | |
| 97 | + <button onclick="i3GEOF.selecao.atributo()" class='btn btn-primary btn-sm btn-raised'>{{{seleciona}}}</button> | |
| 98 | + | |
| 99 | + <!-- as linhas sao baseadas no template template_linhafiltro_mst.html --> | |
| 100 | + <div> | |
| 101 | + <table id='i3GEOselecaoparametros'> | |
| 102 | + <tr> | |
| 103 | + <td></td> | |
| 104 | + <td></td> | |
| 105 | + <td>{{{item}}}</td> | |
| 106 | + <td>{{{operador}}}</td> | |
| 107 | + <td>{{{valor}}}</td> | |
| 108 | + <td> </td> | |
| 109 | + <td>{{{conector}}}</td> | |
| 110 | + </tr> | |
| 111 | + </table> | |
| 112 | + </div> | |
| 113 | + <div id=i3GEOselecaovalores style="position: relative; top: 5px; left: 0px"></div> | |
| 114 | + <h5 class="alert alert-info"> | |
| 115 | + {{{separaComVirgula}}} | |
| 116 | + </h5> | |
| 117 | +</div> | |
| 118 | +<div id="i3GEOselecaoguia3obj" class="container-fluid"> | |
| 119 | + <h5> | |
| 120 | + {{{temaSelecaoMapa}}} | |
| 121 | + </h5> | |
| 122 | + <div id=i3GEOselecaooverlay style="width: 100%;" class="form-group condensed"></div> | |
| 123 | + | |
| 124 | + <button onclick="i3GEOF.selecao.aplicaselecaoTema()" class='btn btn-primary btn-sm btn-raised'>{{{seleciona}}}</button> | |
| 125 | + | |
| 126 | +</div> | ... | ... |
js/mapa.js
| ... | ... | @@ -888,7 +888,13 @@ i3GEO.mapa = |
| 888 | 888 | * Abre a janela de dialogo da ferramenta selecao |
| 889 | 889 | */ |
| 890 | 890 | selecao : function() { |
| 891 | - i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()", "selecao", "selecao"); | |
| 891 | + i3GEO.util.dialogoFerramenta( | |
| 892 | + "i3GEO.mapa.dialogo.selecao()", | |
| 893 | + "selecao", | |
| 894 | + "selecao", | |
| 895 | + "dependencias.php", | |
| 896 | + "i3GEOF.selecao.iniciaJanelaFlutuante()" | |
| 897 | + ); | |
| 892 | 898 | }, |
| 893 | 899 | /** |
| 894 | 900 | * Function: cliquePonto | ... | ... |