From d97b1a46c654771a58499efe9877c652a721fc2b Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Wed, 15 Jul 2015 21:11:45 +0000 Subject: [PATCH] --- admin/admin.db | Bin 286720 -> 0 bytes aplicmap/.htaccess | 4 ++++ ferramentas/gradecoord/index.js | 11 ++++++----- ferramentas/opcoes_fundo/index.js | 280 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------------------------------------------------------- js/ini_i3geo.js | 1 - js/interface.js | 7 ++++--- js/mapa.js | 2 +- temas/.htaccess | 4 ++++ 8 files changed, 162 insertions(+), 147 deletions(-) create mode 100644 aplicmap/.htaccess create mode 100644 temas/.htaccess diff --git a/admin/admin.db b/admin/admin.db index 1c2cc97..7e25eef 100644 Binary files a/admin/admin.db and b/admin/admin.db differ diff --git a/aplicmap/.htaccess b/aplicmap/.htaccess new file mode 100644 index 0000000..332707b --- /dev/null +++ b/aplicmap/.htaccess @@ -0,0 +1,4 @@ + + Order Deny,Allow + Deny from all + diff --git a/ferramentas/gradecoord/index.js b/ferramentas/gradecoord/index.js index 53b978f..d0222ec 100644 --- a/ferramentas/gradecoord/index.js +++ b/ferramentas/gradecoord/index.js @@ -26,7 +26,6 @@ i3GEOF.gradeCoord = { dicionario["asp"] = '"'; return dicionario; }, - /* Function: inicia @@ -100,12 +99,14 @@ i3GEOF.gradeCoord = { */ executa: function(){ - if (($i("i3GEOgradeCoordintervalo").value == 0) || ($i("i3GEOgradeCoordintervalo").value == "")) - {i3GEO.janela.tempoMsg($trad('distLinhas',i3GEOF.gradeCoord.dicionario));} + if (($i("i3GEOgradeCoordintervalo").value == 0) || ($i("i3GEOgradeCoordintervalo").value == "")){ + i3GEO.janela.tempoMsg($trad('distLinhas',i3GEOF.gradeCoord.dicionario)); + } else { - if(i3GEOF.gradeCoord.aguarde.visibility === "visible") - {return;} + if(i3GEOF.gradeCoord.aguarde.visibility === "visible"){ + return; + } i3GEOF.gradeCoord.aguarde.visibility = "visible"; var temp = function(){ i3GEO.atualiza(); diff --git a/ferramentas/opcoes_fundo/index.js b/ferramentas/opcoes_fundo/index.js index 1960a99..210cdf2 100644 --- a/ferramentas/opcoes_fundo/index.js +++ b/ferramentas/opcoes_fundo/index.js @@ -1,151 +1,157 @@ -if(typeof(i3GEOF) === 'undefined'){ +if (typeof (i3GEOF) === 'undefined') { var i3GEOF = {}; } /* -Classe: i3GEOF.opcoesFundo -*/ -i3GEOF.opcoesFundo = { - /* - Variavel: aguarde - - Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela. - */ - aguarde: "", - /** - * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php - */ - MUSTACHE : "", - /** - * Susbtitutos para o template - */ - mustacheHash : function() { - var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.opcoesFundo.dicionario); - dicionario["locaplic"] = i3GEO.configura.locaplic; - dicionario["asp"] = '"'; - return dicionario; - }, - /* - Function: inicia - - Inicia a ferramenta. É chamado por criaJanelaFlutuante - - Parametro: - - iddiv {String} - id do div que receberá o conteudo HTML da ferramenta - */ - inicia: function(iddiv){ - try{ - i3GEOF.opcoesFundo.aguarde.visibility = "visible"; - $i(iddiv).innerHTML += i3GEOF.opcoesFundo.html(); - var b = new YAHOO.widget.Button( - "i3GEOopcoesFundobotao1", - {onclick:{fn: i3GEOF.opcoesFundo.executa}} - ); - b.addClass("rodar150"); - i3GEO.util.aplicaAquarela("i3GEOF.opcoesFundo_corpo"); - var p = i3GEO.configura.locaplic+"/ferramentas/opcoes_fundo/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=pegacorfundo", - cp = new cpaint(), - retorno = function(retorno){ + * Classe: i3GEOF.opcoesFundo + */ +i3GEOF.opcoesFundo = + { + /* + * Variavel: aguarde + * + * Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela. + */ + aguarde : "", + /** + * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php + */ + MUSTACHE : "", + /** + * Susbtitutos para o template + */ + mustacheHash : function() { + var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.opcoesFundo.dicionario); + dicionario["locaplic"] = i3GEO.configura.locaplic; + dicionario["asp"] = '"'; + return dicionario; + }, + /* + * Function: inicia + * + * Inicia a ferramenta. É chamado por criaJanelaFlutuante + * + * Parametro: + * + * iddiv {String} - id do div que receberá o conteudo HTML da ferramenta + */ + inicia : function(iddiv) { + try { + i3GEOF.opcoesFundo.aguarde.visibility = "visible"; + $i(iddiv).innerHTML += i3GEOF.opcoesFundo.html(); + var b = new YAHOO.widget.Button("i3GEOopcoesFundobotao1", { + onclick : { + fn : i3GEOF.opcoesFundo.executa + } + }); + b.addClass("rodar150"); + i3GEO.util.aplicaAquarela("i3GEOF.opcoesFundo_corpo"); + var p = + i3GEO.configura.locaplic + "/ferramentas/opcoes_fundo/exec.php?g_sid=" + i3GEO.configura.sid + "&funcao=pegacorfundo", cp = + new cpaint(), retorno = function(retorno) { i3GEOF.opcoesFundo.aguarde.visibility = "hidden"; - if(retorno.data.erro){i3GEO.janela.tempoMsg("Erro");return;} + if (retorno.data.erro) { + i3GEO.janela.tempoMsg("Erro"); + return; + } $i("i3GEOopcoesFundocor").value = retorno.data; }; - cp.set_response_type("JSON"); - cp.call(p,"corQM",retorno); - } - catch(erro){i3GEO.janela.tempoMsg(erro);} - if(i3GEO.Interface.ATUAL === "googlemaps" || i3GEO.Interface.ATUAL === "googleearth") - {i3GEO.janela.tempoMsg($trad('ajuda',i3GEOF.opcoesFundo.dicionario));} - }, - /* - Function: html - - Gera o código html para apresentação das opções da ferramenta - - Retorno: - - String com o código html - */ - html:function() { - var ins = Mustache.render(i3GEOF.opcoesFundo.MUSTACHE, i3GEOF.opcoesFundo.mustacheHash()); - return ins; - }, - /* - Function: iniciaJanelaFlutuante - - Cria a janela flutuante para controle da ferramenta. - */ - iniciaJanelaFlutuante: function(){ - var janela,divid,titulo,cabecalho,minimiza; - if ($i("i3GEOF.opcoesFundo")) { - return; - } - cabecalho = function(){}; - minimiza = function(){ - i3GEO.janela.minimiza("i3GEOF.opcoesFundo"); - }; - //cria a janela flutuante - titulo = "
" + $trad("p9")+"
"; - janela = i3GEO.janela.cria( - "210px", - "80px", - "", - "", - "", - titulo, - "i3GEOF.opcoesFundo", - false, - "hd", - cabecalho, - "" - ); - divid = janela[2].id; - $i("i3GEOF.opcoesFundo_corpo").style.backgroundColor = "white"; - $i("i3GEOF.opcoesFundo_corpo").style.textAlign = "left"; - i3GEOF.opcoesFundo.aguarde = $i("i3GEOF.opcoesFundo_imagemCabecalho").style; - i3GEOF.opcoesFundo.inicia(divid); - }, - /* - Function: corj - - Abre a janela para o usuário selecionar uma cor interativamente - */ - corj: function(obj) - {i3GEO.util.abreCor("",obj);}, - /* - Function: executa - - Aplica a nova cor - - A cor do fundo na interface Openlayers é definida por meio de estilo, mas é necessário persistir a cor no mapfile existente no servidor. - */ - executa: function(){ - if(i3GEOF.opcoesFundo.aguarde.visibility === "visible") - {return;} - i3GEOF.opcoesFundo.aguarde.visibility = "visible"; - var temp = function(){ + cp.set_response_type("JSON"); + cp.call(p, "corQM", retorno); + } catch (erro) { + i3GEO.janela.tempoMsg(erro); + } + if (i3GEO.Interface.ATUAL === "googlemaps" || i3GEO.Interface.ATUAL === "googleearth") { + i3GEO.janela.tempoMsg($trad('ajuda', i3GEOF.opcoesFundo.dicionario)); + } + }, + /* + * Function: html + * + * Gera o código html para apresentação das opções da ferramenta + * + * Retorno: + * + * String com o código html + */ + html : function() { + var ins = Mustache.render(i3GEOF.opcoesFundo.MUSTACHE, i3GEOF.opcoesFundo.mustacheHash()); + return ins; + }, + /* + * Function: iniciaJanelaFlutuante + * + * Cria a janela flutuante para controle da ferramenta. + */ + iniciaJanelaFlutuante : function() { + var janela, divid, titulo, cabecalho, minimiza; + if ($i("i3GEOF.opcoesFundo")) { + return; + } + cabecalho = function() { + }; + minimiza = function() { + i3GEO.janela.minimiza("i3GEOF.opcoesFundo"); + }; + // cria a janela flutuante + titulo = + "
" + $trad("p9") + + "
"; + janela = i3GEO.janela.cria("210px", "80px", "", "", "", titulo, "i3GEOF.opcoesFundo", false, "hd", cabecalho, ""); + divid = janela[2].id; + $i("i3GEOF.opcoesFundo_corpo").style.backgroundColor = "white"; + $i("i3GEOF.opcoesFundo_corpo").style.textAlign = "left"; + i3GEOF.opcoesFundo.aguarde = $i("i3GEOF.opcoesFundo_imagemCabecalho").style; + i3GEOF.opcoesFundo.inicia(divid); + }, + /* + * Function: corj + * + * Abre a janela para o usuário selecionar uma cor interativamente + */ + corj : function(obj) { + i3GEO.util.abreCor("", obj); + }, + /* + * Function: executa + * + * Aplica a nova cor + * + * A cor do fundo na interface Openlayers é definida por meio de estilo, mas é necessário persistir a cor no + * mapfile existente no servidor. + */ + executa : function() { + if (i3GEOF.opcoesFundo.aguarde.visibility === "visible") { + return; + } + i3GEOF.opcoesFundo.aguarde.visibility = "visible"; + var temp, cor, p, cp; + temp = function() { i3GEOF.opcoesFundo.aguarde.visibility = "hidden"; - if(i3GEO.Interface.ATUAL === "openlayers"){ - //var layer = i3geoOL.getLayersByName("Nenhum")[0]; - //layer.mergeNewParams({"DESLIGACACHE":"sim"}); - //layer.mergeNewParams({r:Math.random()}); - if($i(i3geoOL.id+"_events")){ - $i(i3geoOL.id+"_events").style.backgroundColor = "rgb("+$i("i3GEOopcoesFundocor").value+")"; + if (i3GEO.Interface.ATUAL === "openlayers") { + if (i3geoOL.id && $i(i3geoOL.id + "_events")) { + $i(i3geoOL.id + "_events").style.backgroundColor = "rgb(" + $i("i3GEOopcoesFundocor").value + ")"; } - if ($i(i3geoOL.id + "_OpenLayers_ViewPort")) { - $i(i3geoOL.id + "_OpenLayers_ViewPort").style.backgroundColor = "rgb("+$i("i3GEOopcoesFundocor").value+")"; + if (i3geoOL.id && $i(i3geoOL.id + "_OpenLayers_ViewPort")) { + $i(i3geoOL.id + "_OpenLayers_ViewPort").style.backgroundColor = "rgb(" + $i("i3GEOopcoesFundocor").value + ")"; } - //para OL3 - if($i("openlayers")){ + // para OL3 + if ($i("openlayers")) { $i("openlayers").style.backgroundColor = "rgb(" + $i("i3GEOopcoesFundocor").value + ")"; + i3GEO.parametros.cordefundo = $i("i3GEOopcoesFundocor").value; } } i3GEO.atualiza(); - }, - cor = $i("i3GEOopcoesFundocor").value, - p = i3GEO.configura.locaplic+"/ferramentas/opcoes_fundo/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=corfundo&cor="+cor, + }; + cor = $i("i3GEOopcoesFundocor").value; + p = + i3GEO.configura.locaplic + "/ferramentas/opcoes_fundo/exec.php?g_sid=" + + i3GEO.configura.sid + + "&funcao=corfundo&cor=" + + cor; cp = new cpaint(); - cp.set_response_type("JSON"); - cp.call(p,"corQM",temp); - } -}; \ No newline at end of file + cp.set_response_type("JSON"); + cp.call(p, "corQM", temp); + } + }; \ No newline at end of file diff --git a/js/ini_i3geo.js b/js/ini_i3geo.js index 80a087d..dfa01d5 100644 --- a/js/ini_i3geo.js +++ b/js/ini_i3geo.js @@ -778,7 +778,6 @@ var i3GEO = { if ($i("mensagemt")) { $i("mensagemt").value = i3GEO.parametros.mapexten; } - i3GEO.eventos.navegaMapa(); // // verifica se deve ser feito o zoom em algum tema diff --git a/js/interface.js b/js/interface.js index 23deb36..be381fc 100755 --- a/js/interface.js +++ b/js/interface.js @@ -1373,13 +1373,12 @@ i3GEO.Interface = // layers marcados com o metadata wmstile com valor // 1 sao inseridos com Layer.TileCache // i3GEO.Interface.openlayers.googleLike === false - // && // FIXME testar isso if (i3GEO.Interface.openlayers.googleLike === false && camada.connectiontype === 7 && camada.wmsurl !== "" && camada.usasld.toLowerCase() != "sim") { urllayer = camada.wmsurl; - if (camada.wmstile == 10) { + if (camada.wmstile == 10){ // TODO testar isso source = new ol.source.WMTS({ url : urllayer, @@ -1414,6 +1413,7 @@ i3GEO.Interface = opcoes.visible = true; } else { // verifica se havera apenas um tile + // 10 e do tipo grid de coordenadas if (camada.tiles === "nao" || camada.escondido.toLowerCase() === "sim" || camada.connectiontype === 10 || (camada.type === 0 && camada.cache === "nao") @@ -1447,7 +1447,8 @@ i3GEO.Interface = 'LAYERS' : camada.name, 'VERSION' : '1.1.0' }, - projection : opcoes.projection + projection : opcoes.projection, + ratio : 1 }); source.set("tipoServico", "ImageWMS"); } else { diff --git a/js/mapa.js b/js/mapa.js index d867d4d..354a1de 100644 --- a/js/mapa.js +++ b/js/mapa.js @@ -773,7 +773,7 @@ i3GEO.mapa = + "
" + $trad("p3") + "
"; - janela = i3GEO.janela.cria(largura + "px", altura + "px", "", "", "", titulo, "wlegenda", false, "hd", cabecalho, minimiza); + janela = i3GEO.janela.cria(largura + "px", altura + "px", "", "", "", titulo, "wlegenda", false, "hd", cabecalho, minimiza,"","","","","nao"); $i("wlegenda_corpo").style.backgroundColor = "white"; i3GEO.mapa.legendaHTML.ID = "wlegenda_corpo"; i3GEO.eventos.adicionaEventos("NAVEGAMAPA", [ diff --git a/temas/.htaccess b/temas/.htaccess new file mode 100644 index 0000000..332707b --- /dev/null +++ b/temas/.htaccess @@ -0,0 +1,4 @@ + + Order Deny,Allow + Deny from all + -- libgit2 0.21.2