Commit 5e4a272ab194dc941edb52f095c5029210ecb72c

Authored by Edmar Moretti
1 parent fc37fc8d

$1

classesjs/classe_janela.js
... ... @@ -1008,6 +1008,7 @@ i3GEO.janela = {
1008 1008 botao = new YAHOO.widget.Button(idCombo, {
1009 1009 type: "menu",
1010 1010 menu: idCombo+"select"
  1011 + //menuclassname: "yui-button-menu-i3geo"
1011 1012 });
1012 1013  
1013 1014 if(i3GEO.temaAtivo != ""){
... ...
classesjs/classe_mapa.js
... ... @@ -595,6 +595,14 @@ i3GEO.mapa = {
595 595 i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestatListaMapas()","metaestat","listamapas","listamapas.js","i3GEOF.listamapas.iniciaJanelaFlutuante()");
596 596 },
597 597 /*
  598 + Function: preferencias
  599 +
  600 + Preferencias do usuario
  601 + */
  602 + preferencias: function(){
  603 + i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.preferencias()","preferencias","preferencias");
  604 + },
  605 + /*
598 606 Function: locregiao
599 607  
600 608 Abre a janela de dialogo da ferramenta de busca de regiao cadastrada no METAESTAT
... ... @@ -996,4 +1004,4 @@ i3GEO.mapa = {
996 1004 }
997 1005 }
998 1006 };
999   -//YAHOO.log("carregou classe mapa", "Classes i3geo");
1000 1007 \ No newline at end of file
  1008 +//YAHOO.log("carregou classe mapa", "Classes i3geo");
... ...
classesjs/dicionario.js
... ... @@ -2137,6 +2137,13 @@ pt:"Visualizador de WMS da INDE-Br",
2137 2137 en:"",
2138 2138 es:"",
2139 2139 it:""
  2140 +}],
  2141 +"x86":[
  2142 +{
  2143 +pt:"Preferências",
  2144 +en:"",
  2145 +es:"",
  2146 +it:""
2140 2147 }]
2141 2148 };
2142   -//YAHOO.log("carregou dicionario", "Classes i3geo");
2143 2149 \ No newline at end of file
  2150 +//YAHOO.log("carregou dicionario", "Classes i3geo");
... ...
classesjs/dicionario_ajuda.js
... ... @@ -960,6 +960,14 @@ g_traducao_ajuda = {
960 960 pt:"Essa ferramenta apresenta os serviços WMS cadastrados no servidor da Infra-estrutura Nacional de Dados Espaciais do Brasil. O usuário pode escolher diferentes camadas para visualização e consulta.",
961 961 complemento:"",
962 962 apijs: "i3GEO.arvoreDeTemas.dialogo.vinde()"
  963 + },
  964 + "115": {
  965 + titulo: "Preferências",
  966 + diretorio:"i3geo/ferramentas/preferencias",
  967 + categoria:"1",
  968 + pt:"Guarda as preferências do usuário em relação aos parâmetros que controlam a interface do mapa",
  969 + complemento:"",
  970 + apijs: "i3GEO.mapa.dialogo.preferencias()"
963 971 }
964 972 }
965 973 };
... ...
css/black.css
... ... @@ -149,4 +149,9 @@ Menu superior de opcoes
149 149 #menuajudaMenu{
150 150 color: white;
151 151 }
152   -
  152 +.comboTemasCabecalho .yuimenuitemlabel{
  153 + color: black;
  154 +}
  155 +.comboTemasCabecalho .yuimenuitemlabel:visited{
  156 + color: black;
  157 +}
... ...
ferramentas/preferencias/dicionario.js 0 → 100755
... ... @@ -0,0 +1,16 @@
  1 +//+$trad(1,i3GEOF.preferencias.dicionario)+
  2 +i3GEOF.preferencias.dicionario = {
  3 + 1: [{
  4 + pt:"Limpar",
  5 + en:"",
  6 + es:"",
  7 + it:""
  8 + }],
  9 + 2: [{
  10 + pt:"Aplicar",
  11 + en:"",
  12 + es:"",
  13 + it:""
  14 + }]
  15 +
  16 + };
... ...
ferramentas/preferencias/exec.php 0 → 100755
... ... @@ -0,0 +1,18 @@
  1 +<?php
  2 +include_once(dirname(__FILE__)."/../inicia.php");
  3 +//
  4 +//faz a busca da fun&ccedil;&atilde;o que deve ser executada
  5 +//
  6 +$retorno = ""; //string que ser&aacute; retornada ao browser via JSON
  7 +switch (strtoupper($funcao))
  8 +{
  9 +
  10 +}
  11 +if (!connection_aborted()){
  12 + if(isset($map_file) && isset($postgis_mapa) && $map_file != "")
  13 + restauraCon($map_file,$postgis_mapa);
  14 + cpjson($retorno);
  15 +}
  16 +else
  17 +{exit();}
  18 +?>
... ...
ferramentas/preferencias/index.js 0 → 100755
... ... @@ -0,0 +1,159 @@
  1 +/*
  2 +Title: Preferencias
  3 +
  4 +Gerencia as preferencias do usuario
  5 +
  6 +Veja:
  7 +
  8 +<i3GEO.mapa.dialogo.preferencias>
  9 +
  10 +Arquivo:
  11 +
  12 +i3geo/ferramentas/preferencias/index.js
  13 +
  14 +Licenca:
  15 +
  16 +GPL2
  17 +
  18 +i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet
  19 +
  20 +Direitos Autorais Reservados (c) 2006 Minist&eacute;rio do Meio Ambiente Brasil
  21 +Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com
  22 +
  23 +Este programa &eacute; software livre; voc&ecirc; pode redistribu&iacute;-lo
  24 +e/ou modific&aacute;-lo sob os termos da Licen&ccedil;a P&uacute;blica Geral
  25 +GNU conforme publicada pela Free Software Foundation;
  26 +
  27 +Este programa &eacute; distribu&iacute;do na expectativa de que seja &uacute;til,
  28 +por&eacute;m, SEM NENHUMA GARANTIA; nem mesmo a garantia impl&iacute;cita
  29 +de COMERCIABILIDADE OU ADEQUA&Ccedil;&Atilde;O A UMA FINALIDADE ESPEC&Iacute;FICA.
  30 +Consulte a Licen&ccedil;a P&uacute;blica Geral do GNU para mais detalhes.
  31 +Voc&ecirc; deve ter recebido uma c&oacute;pia da Licen&ccedil;a P&uacute;blica Geral do
  32 +GNU junto com este programa; se n&atilde;o, escreva para a
  33 +Free Software Foundation, Inc., no endere&ccedil;o
  34 +59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
  35 +*/
  36 +if(typeof(i3GEOF) === 'undefined'){
  37 + var i3GEOF = {};
  38 +}
  39 +/*
  40 +Classe: i3GEOF.preferencias
  41 +
  42 +*/
  43 +i3GEOF.preferencias = {
  44 + /*
  45 + Variavel: aguarde
  46 +
  47 + Estilo do objeto DOM com a imagem de aguarde existente no cabe&ccedil;alho da janela.
  48 + */
  49 + aguarde: "",
  50 + /*
  51 + Para efeitos de compatibilidade antes da vers&atilde;o 4.7 que n&atilde;o tinha dicion&aacute;rio
  52 + */
  53 + criaJanelaFlutuante: function(){
  54 + i3GEOF.preferencias.iniciaDicionario();
  55 + },
  56 + /*
  57 + Function: iniciaDicionario
  58 +
  59 + Carrega o dicion&aacute;rio e chama a fun&ccedil;&atilde;o que inicia a ferramenta
  60 +
  61 + O Javascript &eacute; carregado com o id i3GEOF.nomedaferramenta.dicionario_script
  62 + */
  63 + iniciaDicionario: function(){
  64 + if(typeof(i3GEOF.preferencias.dicionario) === 'undefined'){
  65 + i3GEO.util.scriptTag(
  66 + i3GEO.configura.locaplic+"/ferramentas/preferencias/dicionario.js",
  67 + "i3GEOF.preferencias.iniciaJanelaFlutuante()",
  68 + "i3GEOF.preferencias.dicionario_script"
  69 + );
  70 + }
  71 + else{
  72 + i3GEOF.preferencias.iniciaJanelaFlutuante();
  73 + }
  74 + },
  75 + /*
  76 + Function: inicia
  77 +
  78 + Inicia a ferramenta. &Eacute; chamado por criaJanelaFlutuante
  79 +
  80 + Parametro:
  81 +
  82 + iddiv {String} - id do div que receber&aacute; o conteudo HTML da ferramenta
  83 + */
  84 + inicia: function(iddiv){
  85 + try{
  86 + $i(iddiv).innerHTML += i3GEOF.preferencias.html();
  87 + new YAHOO.widget.Button(
  88 + "i3GEOpreferenciasbotao1",
  89 + {onclick:{fn: i3GEOF.preferencias.limpa}}
  90 + );
  91 + new YAHOO.widget.Button(
  92 + "i3GEOpreferenciasbotao2",
  93 + {onclick:{fn: i3GEOF.preferencias.salva}}
  94 + );
  95 + i3GEOF.preferencias.carrega();
  96 + }
  97 + catch(erro){i3GEO.janela.tempoMsg(erro);}
  98 + if(i3GEO.Interface.ATUAL !== "padrao")
  99 + {i3GEO.janela.tempoMsg($trad(1,i3GEOF.preferencias.dicionario));}
  100 + },
  101 + /*
  102 + Function: html
  103 +
  104 + Gera o c&oacute;digo html para apresenta&ccedil;&atilde;o das op&ccedil;&otilde;es da ferramenta
  105 +
  106 + Retorno:
  107 +
  108 + String com o c&oacute;digo html
  109 + */
  110 + html:function(){
  111 + return "";
  112 + },
  113 + /*
  114 + Function: iniciaJanelaFlutuante
  115 +
  116 + Cria a janela flutuante para controle da ferramenta.
  117 + */
  118 + iniciaJanelaFlutuante: function(){
  119 + var janela,divid,titulo,cabecalho,minimiza;
  120 + cabecalho = function(){};
  121 + minimiza = function(){
  122 + i3GEO.janela.minimiza("i3GEOF.preferencias");
  123 + };
  124 + //cria a janela flutuante
  125 + titulo = $trad("x86")+" <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=1&idajuda=3' >&nbsp;&nbsp;&nbsp;</a>";
  126 + janela = i3GEO.janela.cria(
  127 + "400px",
  128 + "500px",
  129 + "",
  130 + "",
  131 + "",
  132 + titulo,
  133 + "i3GEOF.preferencias",
  134 + false,
  135 + "hd",
  136 + cabecalho,
  137 + minimiza
  138 + );
  139 + divid = janela[2].id;
  140 + var rodape = '' +
  141 + '<input id=i3GEOpreferenciasbotao1 size=20 type=button value="'+$trad(1,i3GEOF.preferencias.dicionario)+'" />' +
  142 + '<input id=i3GEOpreferenciasbotao2 size=20 type=button value="'+$trad(2,i3GEOF.preferencias.dicionario)+'" />' ;
  143 + janela[0].setFooter("<div style=background-color:#F2F2F2; >"+rodape+"</div>");
  144 +
  145 + $i("i3GEOF.preferencias_corpo").style.backgroundColor = "white";
  146 + $i("i3GEOF.preferencias_corpo").style.textAlign = "left";
  147 + i3GEOF.preferencias.aguarde = $i("i3GEOF.preferencias_imagemCabecalho").style;
  148 + i3GEOF.preferencias.inicia(divid);
  149 + },
  150 + limpa: function(){
  151 +
  152 + },
  153 + salva: function(){
  154 +
  155 + }
  156 + carrega: function(){
  157 +
  158 + }
  159 +};
... ...