Commit 807a530374a5891847ffd5e3b8fe22c9d545d3ad

Authored by Edmar Moretti
1 parent b3a21992

Inclusão do form de parâmetros de conexão para o novo sistema de admin

admin/admin.db
No preview for this file type
admin1/catalogo/mapfile/comportamento/index.js
... ... @@ -34,12 +34,6 @@ i3GEOadmin.comportamento = {
34 34 function(data, status){
35 35 i3GEOadmin.core.modalAguarde(false);
36 36 var json = jQuery.parseJSON(data);
37   - var hash = {
38   - "sim": i3GEOadmin.comportamento.dicionario.sim,
39   - "nao": i3GEOadmin.comportamento.dicionario.nao,
40   - "NAO-sel" : "",
41   - "SIM-sel": ""
42   - };
43 37 $("#corpo").html(
44 38 Mustache.to_html(
45 39 $("#templateFormComportamento").html(),
... ... @@ -52,6 +46,12 @@ i3GEOadmin.comportamento = {
52 46 "id_tema": id_tema,
53 47 "onSalvar": "i3GEOadmin.comportamento.salvar",
54 48 "aplicaextensao": function(){
  49 + var hash = {
  50 + "sim": i3GEOadmin.comportamento.dicionario.sim,
  51 + "nao": i3GEOadmin.comportamento.dicionario.nao,
  52 + "NAO-sel" : "",
  53 + "SIM-sel": ""
  54 + };
55 55 hash[json.dados.aplicaextensao + "-sel"] = "selected";
56 56 return Mustache.to_html(
57 57 $("#templateOpcoesPublicado").html(),
... ... @@ -59,6 +59,12 @@ i3GEOadmin.comportamento = {
59 59 );
60 60 },
61 61 "permitecomentario": function(){
  62 + var hash = {
  63 + "sim": i3GEOadmin.comportamento.dicionario.sim,
  64 + "nao": i3GEOadmin.comportamento.dicionario.nao,
  65 + "NAO-sel" : "",
  66 + "SIM-sel": ""
  67 + };
62 68 hash[json.dados.permitecomentario + "-sel"] = "selected";
63 69 return Mustache.to_html(
64 70 $("#templateOpcoesPublicado").html(),
... ... @@ -66,6 +72,12 @@ i3GEOadmin.comportamento = {
66 72 );
67 73 },
68 74 "escondido": function(){
  75 + var hash = {
  76 + "sim": i3GEOadmin.comportamento.dicionario.sim,
  77 + "nao": i3GEOadmin.comportamento.dicionario.nao,
  78 + "NAO-sel" : "",
  79 + "SIM-sel": ""
  80 + };
69 81 hash[json.dados.escondido + "-sel"] = "selected";
70 82 return Mustache.to_html(
71 83 $("#templateOpcoesPublicado").html(),
... ... @@ -73,6 +85,12 @@ i3GEOadmin.comportamento = {
73 85 );
74 86 },
75 87 "transitioneffect": function(){
  88 + var hash = {
  89 + "sim": i3GEOadmin.comportamento.dicionario.sim,
  90 + "nao": i3GEOadmin.comportamento.dicionario.nao,
  91 + "NAO-sel" : "",
  92 + "SIM-sel": ""
  93 + };
76 94 hash[json.dados.transitioneffect + "-sel"] = "selected";
77 95 return Mustache.to_html(
78 96 $("#templateOpcoesPublicado").html(),
... ... @@ -80,6 +98,12 @@ i3GEOadmin.comportamento = {
80 98 );
81 99 },
82 100 "status": function(){
  101 + var hash = {
  102 + "sim": i3GEOadmin.comportamento.dicionario.sim,
  103 + "nao": i3GEOadmin.comportamento.dicionario.nao,
  104 + "NAO-sel" : "",
  105 + "SIM-sel": ""
  106 + };
83 107 hash[json.dados.status + "-sel"] = "selected";
84 108 return Mustache.to_html(
85 109 $("#templateMsStatus").html(),
... ...
admin1/catalogo/mapfile/conexao/local/exec.php
... ... @@ -47,7 +47,7 @@ $id_tema = ( int ) $_POST ["id_tema"];
47 47 $funcao = strtoupper ( $funcao );
48 48 switch ($funcao) {
49 49 case "ALTERAR" :
50   - $dados = \admin\catalogo\mapfile\conexao\local\alterar ( $locaplic, $id_tema, $codigo, $_POST["editavel"], $_POST["esquematabelaeditavel"], $_POST["tabelaeditavel"], $_POST["colunaidunico"], $_POST["colunageometria"] );
  50 + $dados = \admin\catalogo\mapfile\conexao\local\alterar ($locaplic,$codigo,$_POST["connection"],$_POST["connectiontype"],$_POST["data"],$_POST["tileindex"],$_POST["tileitem"],$_POST["type"],$_POST["projection"],$_POST["convcaracter"],$_POST["metaestat"],$_POST["metaestat_id_medida_variavel"],$dbhw);
51 51 if ($dados === false) {
52 52 header ( "HTTP/1.1 500 erro ao definir as propriedades" );
53 53 }
... ...
admin1/catalogo/mapfile/conexao/local/funcoes.php
... ... @@ -35,15 +35,21 @@ function listar($locaplic, $codigo) {
35 35 }
36 36 $dados ["projection"] = str_replace ( "+i", "i", $dados ["projection"] );
37 37 $dados ["convcaracter"] = $layer->getmetadata ( "convcaracter" );
  38 + if(empty($dados ["convcaracter"])){
  39 + $dados ["convcaracter"] = "NAO";
  40 + }
  41 + $dados ["convcaracter"] = strtoupper($dados ["convcaracter"]);
38 42 // informacoes sobre a integracao com o sistema de metadados estatisticos
39 43 $dados ["metaestat"] = $layer->getmetadata ( "metaestat" );
40 44 if ($dados ["metaestat"] == "") {
41 45 $dados ["metaestat"] = "NAO";
42 46 }
  47 + $dados ["metaestat"] = strtoupper($dados ["metaestat"]);
43 48 $dados ["metaestat_id_medida_variavel"] = $layer->getmetadata ( "metaestat_id_medida_variavel" );
44 49 return $dados;
45 50 }
46   -function alterar($locaplic, $id_tema, $codigo, $editavel, $esquematabelaeditavel, $tabelaeditavel, $colunaidunico, $colunageometria) {
  51 +function alterar($locaplic,$codigo,$connection,$connectiontype,$data,$tileindex,$tileitem,$type,$projection,$convcaracter,$metaestat,$metaestat_id_medida_variavel,$dbhw) {
  52 + global $esquemaadmin;
47 53 $arq = $locaplic . "/temas/" . $codigo . ".map";
48 54 if ($codigo == "" || ! file_exists ( $arq )) {
49 55 header ( "HTTP/1.1 400 arquivo nao existe" );
... ... @@ -54,14 +60,74 @@ function alterar($locaplic, $id_tema, $codigo, $editavel, $esquematabelaeditavel
54 60 if ($layer == "") {
55 61 return false;
56 62 }
57   - $layer->setmetadata ( "editavel", $editavel );
58   - $layer->setmetadata ( "esquematabelaeditavel", $esquematabelaeditavel );
59   - $layer->setmetadata ( "tabelaeditavel", $tabelaeditavel );
60   - $layer->setmetadata ( "colunaidunico", $colunaidunico );
61   - $layer->setmetadata ( "colunageometria", $colunageometria );
  63 + if(strtoupper($metaestat) == "SIM"){
  64 + if(empty($metaestat_id_medida_variavel)){
  65 + header ( "HTTP/1.1 400 id da medida esta vazio" );
  66 + exit ();
  67 + }
  68 + $connectiontype = 6;
  69 + $filteritem = "";
  70 + $filter = "";
  71 + $data = "";
  72 + $connection = "";
  73 + $dataCol = array(
  74 + "tipoa_tema" => "META"
  75 + );
  76 + i3GeoAdminUpdate($dbhw,"i3geoadmin_temas",$dataCol,"WHERE codigo_tema = '$codigo'");
  77 + $layer->setmetadata("metaestat","SIM");
  78 + $layer->setmetadata("METAESTAT_ID_MEDIDA_VARIAVEL",$metaestat_id_medida_variavel);
  79 + }
  80 + else{
  81 + $layer->setmetadata("METAESTAT_CODIGO_TIPO_REGIAO","");
  82 + $layer->setmetadata("METAESTAT_ID_MEDIDA_VARIAVEL","");
  83 + $layer->setmetadata("metaestat","");
  84 + $dataCol = array(
  85 + "tipoa_tema" => ""
  86 + );
  87 + i3GeoAdminUpdate($dbhw,"i3geoadmin_temas",$dataCol,"WHERE codigo_tema = '$codigo'");
  88 + }
  89 + //verifica a simbologia
  90 + //evita que o LAYER falhe ao ser testado por nao ter o simbolo definido
  91 + if($type == 0){
  92 + $c = $layer->getClass(0);
  93 + $e = $c->getStyle(0);
  94 + if($e->symbolname == ""){
  95 + $e->set("symbolname","ponto");
  96 + }
  97 + }
  98 + if($type == 1){
  99 + $c = $layer->getClass(0);
  100 + $e = $c->getStyle(0);
  101 + if($e->symbolname == "" || $e->symbolname == "ponto"){
  102 + $e->set("symbolname","linha");
  103 + }
  104 + }
  105 + if($type == 2){
  106 + $c = $layer->getClass(0);
  107 + $e = $c->getStyle(0);
  108 + if($e->symbolname == "linha" || $e->symbolname == "ponto"){
  109 + $e->set("symbolname"," ");
  110 + }
  111 + }
  112 + $layer->setmetadata("convcaracter",$convcaracter);
  113 + $layer->set("connection",$connection);
  114 + $layer->setconnectiontype($connectiontype);
  115 + $layer->set("data",$data);
  116 + $layer->set("tileitem",$tileitem);
  117 + $layer->set("tileindex",$tileindex);
  118 + $layer->set("type",$type);
  119 + $layer->setfilter($filter);
  120 + $layer->set("filteritem",$filteritem);
  121 + if($layer->getprojection() == MS_TRUE){
  122 + $layer->setprojection($projection);
  123 + if($layer->getprojection() == MS_FALSE && $projection != ""){
  124 + $layer->setprojection($projection);
  125 + }
  126 + }
  127 +
62 128 try {
63 129 $mapa->save ( $arq );
64   - include (dirname ( __FILE__ ) . "/../../../php/removeCabecalhoMapfile.php");
  130 + include (dirname ( __FILE__ ) . "/../../../../php/removeCabecalhoMapfile.php");
65 131 removeCabecalhoMapfile ( $arq );
66 132 return true;
67 133 } catch ( Exception $e ) {
... ...
admin1/catalogo/mapfile/conexao/local/index.js
... ... @@ -34,12 +34,7 @@ i3GEOadmin.conexaolocal = {
34 34 function(data, status){
35 35 i3GEOadmin.core.modalAguarde(false);
36 36 var json = jQuery.parseJSON(data);
37   - var hash = {
38   - "sim": i3GEOadmin.conexaolocal.dicionario.sim,
39   - "nao": i3GEOadmin.conexaolocal.dicionario.nao,
40   - "NAO-sel" : "",
41   - "SIM-sel": ""
42   - };
  37 +
43 38 $("#corpo").html(
44 39 Mustache.to_html(
45 40 $("#templateFormConexaoLocal").html(),
... ... @@ -51,14 +46,47 @@ i3GEOadmin.conexaolocal = {
51 46 "codigo": codigo,
52 47 "id_tema": id_tema,
53 48 "onSalvar": "i3GEOadmin.conexaolocal.salvar",
54   - "editavel": function(){
55   - hash["NAO-sel"] = "";
56   - hash["SIM-sel"] = "";
57   - hash[json.dados.conexaolocal + "-sel"] = "selected";
  49 + "convcaracter": function(){
  50 + var hash = {
  51 + "sim": i3GEOadmin.conexaolocal.dicionario.sim,
  52 + "nao": i3GEOadmin.conexaolocal.dicionario.nao,
  53 + "NAO-sel" : "",
  54 + "SIM-sel": ""
  55 + };
  56 + hash[json.dados.convcaracter + "-sel"] = "selected";
  57 + return Mustache.to_html(
  58 + $("#templateOpcoesPublicado").html(),
  59 + hash
  60 + );
  61 + },
  62 + "metaestat": function(){
  63 + var hash = {
  64 + "sim": i3GEOadmin.conexaolocal.dicionario.sim,
  65 + "nao": i3GEOadmin.conexaolocal.dicionario.nao,
  66 + "NAO-sel" : "",
  67 + "SIM-sel": ""
  68 + };
  69 + hash[json.dados.metaestat + "-sel"] = "selected";
58 70 return Mustache.to_html(
59 71 $("#templateOpcoesPublicado").html(),
60 72 hash
61 73 );
  74 + },
  75 + "type": function(){
  76 + var hash = {};
  77 + hash[json.dados.type + "-sel"] = "selected";
  78 + return Mustache.to_html(
  79 + $("#templateTiposLayer").html(),
  80 + hash
  81 + );
  82 + },
  83 + "connectiontype": function(){
  84 + var hash = {};
  85 + hash[json.dados.connectiontype + "-sel"] = "selected";
  86 + return Mustache.to_html(
  87 + $("#templateTiposConexao").html(),
  88 + hash
  89 + );
62 90 }
63 91 }
64 92 )
... ...
admin1/catalogo/mapfile/conexao/local/index.php
1 1 <?php
  2 +//TODO incluir opcao para listar os arquivos no servidor
  3 +//TODO incluir construtor de sql
2 4 define ( "ONDEI3GEO", "../../../../.." );
3 5 include (dirname ( __FILE__ ) . "/../../../../../ms_configura.php");
4 6 error_reporting ( 0 );
... ... @@ -50,7 +52,9 @@ $id_tema = (int) $_GET [&quot;id_tema&quot;];
50 52 </div>
51 53 <?php
52 54 include("templates/templateFormConexaoLocal.php");
53   -//include("../../../templates/templateOpcoesPublicado.php");
  55 +include("../../templates/templateTiposLayer.php");
  56 +include("../../templates/templateTiposConexao.php");
  57 +include("../../../../templates/templateOpcoesPublicado.php");
54 58 ?>
55 59 <script type="text/javascript" src="index.js"></script>
56 60 <script type="text/javascript" src="../../../../dicionario/editormapfile.js"></script>
... ...
admin1/catalogo/mapfile/conexao/local/templates/templateFormConexaoLocal.php
  1 +<?php
  2 +//combo com os alias de conexao
  3 +if(!isset($postgis_mapa)){
  4 + include (dirname ( __FILE__ ) . "/../../../../../../ms_configura.php");
  5 +}
  6 +$_chaves = array_keys($postgis_mapa);
  7 +$_combo = "";
  8 +foreach ($_chaves as $_chave){
  9 + $_combo .= "<li><a href='javascript:formConexaoLocalSelCon(\"".$_chave."\");void(0);'>$_chave</a></li>";
  10 +}
  11 +?>
  12 +<script>
  13 +function formConexaoLocalSelCon(valor){
  14 + $("[name='connection']").val(valor);
  15 +}
  16 +</script>
1 17 <script id="templateFormConexaoLocal" type="x-tmpl-mustache">
2 18 <form id="form-edicao-conexaolocal" style="" action="#" onsubmit="{{onSalvar}}('{{codigo}}','{{id_tema}}');return false;" class="form-horizontal" role="form"
3 19 method="post" >
4   -
5 20 <div class="col-md-12">
6 21 <div class="form-group form-group-lg">
7 22 <div class="col-md-6">
8 23 <label class="control-label" for="type">
9 24 {{{typeTitulo}}}
10 25 </label>
11   - <p class="small">
12   - {{{Type}}}
13   - </p>
  26 + <div id="typeAjuda" class="collapse leiaMais">
  27 + <p class="small" >{{{Type}}}</p>
  28 + </div>
  29 + <a href="#typeAjuda" data-toggle="collapse" class="collapsed">
  30 + <span class="text-primary readMore"><i class="material-icons">keyboard_arrow_down</i></span>
  31 + <span class="text-primary readLess"><i class="material-icons">keyboard_arrow_up</i></span>
  32 + </a>
14 33 </div>
15 34 <div class="col-md-6">
16   - <input title="{{{typeTitulo}}}" type="text" value="{{{type}}}" class="form-control" name="type" >
  35 + <select title="{{{typeTitulo}}}" name="type" class="form-control">
  36 + {{{type}}}
  37 + </select>
17 38 </div>
18 39 </div>
19 40 </div>
... ... @@ -23,9 +44,13 @@
23 44 <label class="control-label" for="projection">
24 45 {{{projecao}}}
25 46 </label>
26   - <p class="small">
27   - {{{projecaoTitulo}}}
28   - </p>
  47 + <div id="projectionAjuda" class="collapse leiaMais">
  48 + <p class="small" >{{{projecaoTitulo}}}</p>
  49 + </div>
  50 + <a href="#projectionAjuda" data-toggle="collapse" class="collapsed">
  51 + <span class="text-primary readMore"><i class="material-icons">keyboard_arrow_down</i></span>
  52 + <span class="text-primary readLess"><i class="material-icons">keyboard_arrow_up</i></span>
  53 + </a>
29 54 </div>
30 55 <div class="col-md-6">
31 56 <input title="{{{projecao}}}" type="text" value="{{{projection}}}" class="form-control" name="projection" >
... ... @@ -38,12 +63,12 @@
38 63 <label class="control-label" for="connectiontype">
39 64 {{{connectiontypeTitulo}}}
40 65 </label>
41   - <p class="small">
42   - {{{Connectiontype}}}
43   - </p>
  66 + <p class="small" >{{{Connectiontype}}}</p>
44 67 </div>
45 68 <div class="col-md-6">
46   - <input title="{{{connectiontypeTitulo}}}" type="text" value="{{{connectiontype}}}" class="form-control" name="connectiontype" >
  69 + <select title="{{{connectiontypeTitulo}}}" name="connectiontype" class="form-control">
  70 + {{{connectiontype}}}
  71 + </select>
47 72 </div>
48 73 </div>
49 74 </div>
... ... @@ -53,28 +78,44 @@
53 78 <label class="control-label" for="connection">
54 79 {{{connectionTitulo}}}
55 80 </label>
56   - <p class="small">
57   - {{{Connection}}}
58   - </p>
  81 + <div id="connectionAjuda" class="collapse leiaMais">
  82 + <p class="small" >{{{Connection}}}</p>
  83 + </div>
  84 + <a href="#connectionAjuda" data-toggle="collapse" class="collapsed">
  85 + <span class="text-primary readMore"><i class="material-icons">keyboard_arrow_down</i></span>
  86 + <span class="text-primary readLess"><i class="material-icons">keyboard_arrow_up</i></span>
  87 + </a>
59 88 </div>
60 89 <div class="col-md-6">
61   - <input title="{{{connectionTitulo}}}" type="text" value="{{{connection}}}" class="form-control" name="connection" >
  90 + <input title="{{{connectionTitulo}}}" type="text" value="{{{connection}}}" class="form-control" name="connection" id="connection">
  91 + </div>
  92 + <div class="col-md-6">
  93 + <label class="control-label" for="listaConnection"></label>
  94 + <div class="btn-group">
  95 + <a href="javascript:void(0)" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">{{{escolhaDalista}}} <span class="caret"></span></a>
  96 + <ul class="dropdown-menu">
  97 + <?php echo $_combo;?>
  98 + </ul>
  99 + </div>
62 100 </div>
63 101 </div>
64 102 </div>
65   -
66 103 <div class="col-md-12">
67 104 <div class="form-group form-group-lg">
68 105 <div class="col-md-6">
69 106 <label class="control-label" for="data">
70 107 {{{dataTitulo}}}
71 108 </label>
72   - <p class="small">
73   - {{{Data}}}
74   - </p>
  109 + <div id="dataAjuda" class="collapse leiaMais">
  110 + <p class="small" >{{{Data}}}</p>
  111 + </div>
  112 + <a href="#dataAjuda" data-toggle="collapse" class="collapsed">
  113 + <span class="text-primary readMore"><i class="material-icons">keyboard_arrow_down</i></span>
  114 + <span class="text-primary readLess"><i class="material-icons">keyboard_arrow_up</i></span>
  115 + </a>
75 116 </div>
76 117 <div class="col-md-6">
77   - <input title="{{{dataTitulo}}}" type="text" value="{{{data}}}" class="form-control" name="data" >
  118 + <textarea style="resize: both;" title="{{{dataTitulo}}}" rows="8" class="form-control" name="data" >{{{data}}}</textarea>
78 119 </div>
79 120 </div>
80 121 </div>
... ... @@ -84,12 +125,12 @@
84 125 <label class="control-label text-left" for="metaestat">
85 126 {{{metaestatTitulo}}}
86 127 </label>
87   - <p class="small">
88   - {{{Metaestat}}}
89   - </p>
  128 + <p class="small" >{{{Metaestat}}}</p>
90 129 </div>
91 130 <div class="col-md-6">
92   - <input title="{{{metaestatTitulo}}}" type="text" value="{{{metaestat}}}" class="form-control" name="metaestat" >
  131 + <select title="{{{metaestatTitulo}}}" name="metaestat" class="form-control">
  132 + {{{metaestat}}}
  133 + </select>
93 134 </div>
94 135 </div>
95 136 </div>
... ... @@ -99,9 +140,7 @@
99 140 <label class="control-label text-left" for="metaestat_id_medida_variavel">
100 141 {{{medidaVariavelTitulo}}}
101 142 </label>
102   - <p class="small">
103   - {{{medidaVariavel}}}
104   - </p>
  143 + <p class="small" >{{{medidaVariavel}}}</p>
105 144 </div>
106 145 <div class="col-md-6">
107 146 <input title="{{{medidaVariavelTitulo}}}" type="text" value="{{{metaestat_id_medida_variavel}}}" class="form-control" name="metaestat_id_medida_variavel" >
... ... @@ -114,9 +153,13 @@
114 153 <label class="control-label" for="tileindex">
115 154 tileIndex
116 155 </label>
117   - <p class="small">
118   - {{{tileIndex}}}
119   - </p>
  156 + <div id="tileindexAjuda" class="collapse leiaMais">
  157 + <p class="small" >{{{tileIndex}}}</p>
  158 + </div>
  159 + <a href="#tileindexAjuda" data-toggle="collapse" class="collapsed">
  160 + <span class="text-primary readMore"><i class="material-icons">keyboard_arrow_down</i></span>
  161 + <span class="text-primary readLess"><i class="material-icons">keyboard_arrow_up</i></span>
  162 + </a>
120 163 </div>
121 164 <div class="col-md-6">
122 165 <input title="tileIndex" type="text" value="{{{tileindex}}}" class="form-control" name="tileindex" >
... ... @@ -129,9 +172,7 @@
129 172 <label class="control-label" for="tileitem">
130 173 tileItem
131 174 </label>
132   - <p class="small">
133   - {{{tileItem}}}
134   - </p>
  175 + <p class="small" >{{{tileItem}}}</p>
135 176 </div>
136 177 <div class="col-md-6">
137 178 <input title="tileItem" type="text" value="{{{tileitem}}}" class="form-control" name="tileitem" >
... ... @@ -144,12 +185,18 @@
144 185 <label class="control-label" for="convcaracter">
145 186 {{{convCaracterTitulo}}}
146 187 </label>
147   - <p class="small">
148   - {{{convCaracter}}}
149   - </p>
150   - </div>
151   - <div class="col-md-6">
152   - <input title="{{{convCaracterTitulo}}}" type="text" value="{{{convcaracter}}}" class="form-control" name="convcaracter" >
  188 + <div id="convcaracterAjuda" class="collapse leiaMais">
  189 + <p class="small" >{{{convCaracter}}}</p>
  190 + </div>
  191 + <a href="#convcaracterAjuda" data-toggle="collapse" class="collapsed">
  192 + <span class="text-primary readMore"><i class="material-icons">keyboard_arrow_down</i></span>
  193 + <span class="text-primary readLess"><i class="material-icons">keyboard_arrow_up</i></span>
  194 + </a>
  195 + </div>
  196 + <div class="col-md-6">
  197 + <select title="{{{convCaracterTitulo}}}" name="convcaracter" class="form-control">
  198 + {{{convcaracter}}}
  199 + </select>
153 200 </div>
154 201 </div>
155 202 </div>
... ...
admin1/catalogo/mapfile/disponibilidade/index.js
... ... @@ -34,12 +34,6 @@ i3GEOadmin.disponibilidade = {
34 34 function(data, status){
35 35 i3GEOadmin.core.modalAguarde(false);
36 36 var json = jQuery.parseJSON(data);
37   - var hash = {
38   - "sim": i3GEOadmin.disponibilidade.dicionario.sim,
39   - "nao": i3GEOadmin.disponibilidade.dicionario.nao,
40   - "NAO-sel" : "",
41   - "SIM-sel": ""
42   - };
43 37 $("#corpo").html(
44 38 Mustache.to_html(
45 39 $("#templateFormDisponibilidade").html(),
... ... @@ -52,6 +46,12 @@ i3GEOadmin.disponibilidade = {
52 46 "id_tema": id_tema,
53 47 "onSalvar": "i3GEOadmin.disponibilidade.salvar",
54 48 "download": function(){
  49 + var hash = {
  50 + "sim": i3GEOadmin.comportamento.dicionario.sim,
  51 + "nao": i3GEOadmin.comportamento.dicionario.nao,
  52 + "NAO-sel" : "",
  53 + "SIM-sel": ""
  54 + };
55 55 hash[json.dados.download + "-sel"] = "selected";
56 56 return Mustache.to_html(
57 57 $("#templateOpcoesPublicado").html(),
... ... @@ -59,8 +59,12 @@ i3GEOadmin.disponibilidade = {
59 59 );
60 60 },
61 61 "permitedownload": function(){
62   - hash["NAO-sel"] = "";
63   - hash["SIM-sel"] = "";
  62 + var hash = {
  63 + "sim": i3GEOadmin.comportamento.dicionario.sim,
  64 + "nao": i3GEOadmin.comportamento.dicionario.nao,
  65 + "NAO-sel" : "",
  66 + "SIM-sel": ""
  67 + };
64 68 hash[json.dados.permitedownload + "-sel"] = "selected";
65 69 return Mustache.to_html(
66 70 $("#templateOpcoesPublicado").html(),
... ... @@ -68,8 +72,12 @@ i3GEOadmin.disponibilidade = {
68 72 );
69 73 },
70 74 "permiteogc": function(){
71   - hash["NAO-sel"] = "";
72   - hash["SIM-sel"] = "";
  75 + var hash = {
  76 + "sim": i3GEOadmin.comportamento.dicionario.sim,
  77 + "nao": i3GEOadmin.comportamento.dicionario.nao,
  78 + "NAO-sel" : "",
  79 + "SIM-sel": ""
  80 + };
73 81 hash[json.dados.permiteogc + "-sel"] = "selected";
74 82 return Mustache.to_html(
75 83 $("#templateOpcoesPublicado").html(),
... ... @@ -77,8 +85,12 @@ i3GEOadmin.disponibilidade = {
77 85 );
78 86 },
79 87 "permitekml": function(){
80   - hash["NAO-sel"] = "";
81   - hash["SIM-sel"] = "";
  88 + var hash = {
  89 + "sim": i3GEOadmin.comportamento.dicionario.sim,
  90 + "nao": i3GEOadmin.comportamento.dicionario.nao,
  91 + "NAO-sel" : "",
  92 + "SIM-sel": ""
  93 + };
82 94 hash[json.dados.permitekml + "-sel"] = "selected";
83 95 return Mustache.to_html(
84 96 $("#templateOpcoesPublicado").html(),
... ... @@ -86,8 +98,12 @@ i3GEOadmin.disponibilidade = {
86 98 );
87 99 },
88 100 "permitekmz": function(){
89   - hash["NAO-sel"] = "";
90   - hash["SIM-sel"] = "";
  101 + var hash = {
  102 + "sim": i3GEOadmin.comportamento.dicionario.sim,
  103 + "nao": i3GEOadmin.comportamento.dicionario.nao,
  104 + "NAO-sel" : "",
  105 + "SIM-sel": ""
  106 + };
91 107 hash[json.dados.permitekmz + "-sel"] = "selected";
92 108 return Mustache.to_html(
93 109 $("#templateOpcoesPublicado").html(),
... ...
admin1/catalogo/mapfile/editavel/funcoes.php
... ... @@ -17,6 +17,7 @@ function listar($locaplic,$codigo){
17 17 if($dados["editavel"] == ""){
18 18 $dados["editavel"] = "NAO";
19 19 }
  20 + $dados["editavel"] = strtoupper($dados["editavel"]);
20 21 $dados["esquematabelaeditavel"] = $layer->getmetadata("esquematabelaeditavel");
21 22 $dados["tabelaeditavel"] = $layer->getmetadata("tabelaeditavel");
22 23 $dados["colunaidunico"] = $layer->getmetadata("colunaidunico");
... ...
admin1/catalogo/mapfile/editavel/index.js
... ... @@ -34,12 +34,6 @@ i3GEOadmin.editavel = {
34 34 function(data, status){
35 35 i3GEOadmin.core.modalAguarde(false);
36 36 var json = jQuery.parseJSON(data);
37   - var hash = {
38   - "sim": i3GEOadmin.editavel.dicionario.sim,
39   - "nao": i3GEOadmin.editavel.dicionario.nao,
40   - "NAO-sel" : "",
41   - "SIM-sel": ""
42   - };
43 37 $("#corpo").html(
44 38 Mustache.to_html(
45 39 $("#templateFormEditavel").html(),
... ... @@ -52,8 +46,12 @@ i3GEOadmin.editavel = {
52 46 "id_tema": id_tema,
53 47 "onSalvar": "i3GEOadmin.editavel.salvar",
54 48 "editavel": function(){
55   - hash["NAO-sel"] = "";
56   - hash["SIM-sel"] = "";
  49 + var hash = {
  50 + "sim": i3GEOadmin.comportamento.dicionario.sim,
  51 + "nao": i3GEOadmin.comportamento.dicionario.nao,
  52 + "NAO-sel" : "",
  53 + "SIM-sel": ""
  54 + };
57 55 hash[json.dados.editavel + "-sel"] = "selected";
58 56 return Mustache.to_html(
59 57 $("#templateOpcoesPublicado").html(),
... ...
admin1/catalogo/mapfile/renderizacao/index.js
... ... @@ -34,12 +34,6 @@ i3GEOadmin.renderizacao = {
34 34 function(data, status){
35 35 i3GEOadmin.core.modalAguarde(false);
36 36 var json = jQuery.parseJSON(data);
37   - var hash = {
38   - "sim": i3GEOadmin.renderizacao.dicionario.sim,
39   - "nao": i3GEOadmin.renderizacao.dicionario.nao,
40   - "NAO-sel" : "",
41   - "SIM-sel": ""
42   - };
43 37 $("#corpo").html(
44 38 Mustache.to_html(
45 39 $("#templateFormRenderizacao").html(),
... ... @@ -52,8 +46,12 @@ i3GEOadmin.renderizacao = {
52 46 "id_tema": id_tema,
53 47 "onSalvar": "i3GEOadmin.renderizacao.salvar",
54 48 "cache": function(){
55   - hash["NAO-sel"] = "";
56   - hash["SIM-sel"] = "";
  49 + var hash = {
  50 + "sim": i3GEOadmin.comportamento.dicionario.sim,
  51 + "nao": i3GEOadmin.comportamento.dicionario.nao,
  52 + "NAO-sel" : "",
  53 + "SIM-sel": ""
  54 + };
57 55 hash[json.dados.cache + "-sel"] = "selected";
58 56 return Mustache.to_html(
59 57 $("#templateOpcoesPublicado").html(),
... ... @@ -61,8 +59,12 @@ i3GEOadmin.renderizacao = {
61 59 );
62 60 },
63 61 "tiles": function(){
64   - hash["NAO-sel"] = "";
65   - hash["SIM-sel"] = "";
  62 + var hash = {
  63 + "sim": i3GEOadmin.comportamento.dicionario.sim,
  64 + "nao": i3GEOadmin.comportamento.dicionario.nao,
  65 + "NAO-sel" : "",
  66 + "SIM-sel": ""
  67 + };
66 68 hash[json.dados.tiles + "-sel"] = "selected";
67 69 return Mustache.to_html(
68 70 $("#templateOpcoesPublicado").html(),
... ...
admin1/catalogo/mapfile/templates/templateTiposConexao.php 0 → 100644
... ... @@ -0,0 +1,15 @@
  1 +<script id="templateTiposConexao" type="x-tmpl-mustache">
  2 +<option value="0" {{0-sel}} >INLINE</option>
  3 +<option value="1" {{1-sel}} >SHAPEFILE</option>
  4 +<option value="2" {{2-sel}} >TILED_SHAPEFILE</option>
  5 +<option value="3" {{3-sel}} >SDE</option>
  6 +<option value="4" {{4-sel}} >OGR</option>
  7 +<option value="5" {{5-sel}} >TILED_OGR</option>
  8 +<option value="6" {{6-sel}} >POSTGIS</option>
  9 +<option value="7" {{7-sel}} >WMS</option>
  10 +<option value="8" {{8-sel}} >ORACLESPATIAL</option>
  11 +<option value="9" {{9-sel}} >WFS</option>
  12 +<option value="10" {{10-sel}} >GRATICULE</option>
  13 +<option value="12" {{12-sel}} >RASTER</option>
  14 +<option value="13" {{13-sel}} >PLUGIN</option>
  15 +</script>
0 16 \ No newline at end of file
... ...
admin1/catalogo/mapfile/templates/templateTiposLayer.php 0 → 100644
... ... @@ -0,0 +1,11 @@
  1 +<script id="templateTiposLayer" type="x-tmpl-mustache">
  2 +<option value="0" {{0-sel}} >POINT</option>
  3 +<option value="1" {{1-sel}} >LINE</option>
  4 +<option value="2" {{2-sel}} >POLYGON</option>
  5 +<option value="3" {{3-sel}} >RASTER</option>
  6 +<option value="4" {{4-sel}} >ANNOTATION</option>
  7 +<option value="5" {{5-sel}} >QUERY</option>
  8 +<option value="6" {{6-sel}} >CIRCLE</option>
  9 +<option value="7" {{7-sel}} >TILEINDEX</option>
  10 +<option value="8" {{8-sel}} >CHART</option>
  11 +</script>
... ...
admin1/dicionario/core.js
... ... @@ -424,5 +424,11 @@ i3GEOadmin.core.dicionario = {
424 424 pt : "Calcular",
425 425 en : "",
426 426 es : ""
  427 + } ],
  428 + 'escolhaDalista' : [ {
  429 + pt : "Escolha da lista",
  430 + en : "",
  431 + es : ""
427 432 } ]
  433 +
428 434 };
... ...
admin1/dicionario/editormapfile.js
... ... @@ -96,7 +96,7 @@ i3GEOadmin.mapfile.dicionario = {
96 96 es : ""
97 97 } ],
98 98 'metaestatTxt' : [ {
99   - pt : "Esse mapfile baseia-se no sistema de metadados estat&iacute;sticos? Caso escolha sim, a conex&atilde;o com o banco e o sql de acesso aos dados ser&atilde;o constru&iacute;dos de forma din&acirc;mica",
  99 + pt : "Esse mapfile baseia-se no sistema de metadados estat&iacute;sticos? Caso escolha sim, a conex&atilde;o com o banco e o sql de acesso aos dados ser&atilde;o constru&iacute;dos de forma din&acirc;mica quando a camada for adicionada ao mapa",
100 100 en : "",
101 101 es : ""
102 102 } ],
... ... @@ -546,7 +546,7 @@ i3GEOadmin.mapfile.dicionario = {
546 546 es : ""
547 547 } ],
548 548 'Metaestat' : [ {
549   - pt : "Indica se as defini&ccedil;&otilde;es da camada est&atilde;o relacionadas ao sistema de metadados estat&iacute;sticos. Se estiver, alguns par&acirc;metros s&atilde;o obtidos de forma autom&aacute;tica, como a conex&atilde;o e o SQL de acesso aos dados.",
  549 + pt : "Indica se as defini&ccedil;&otilde;es da camada est&atilde;o relacionadas ao sistema de metadados estat&iacute;sticos. Se estiver, alguns par&acirc;metros s&atilde;o obtidos de forma autom&aacute;tica quando a camada for adicionada ao mapa.",
550 550 en : "",
551 551 es : ""
552 552 } ],
... ...
admin1/head.php
... ... @@ -323,6 +323,30 @@ h2 small {
323 323 .btn-breadcrumb > *:nth-child(n+2) {
324 324 display:none;
325 325 }
  326 +
  327 +/* botoes de expandir textos do tipo leia-mais */
  328 +a .readMore {
  329 + display: none;
  330 +}
  331 +
  332 +a .readLess {
  333 + display: inline;
  334 +}
  335 +
  336 +a.collapsed .readMore {
  337 + display: inline;
  338 +}
  339 +
  340 +a.collapsed .readLess {
  341 + display: none;
  342 +}
  343 +.leiaMais:not(.in) {
  344 + min-height: 2.25em;
  345 + height: 2.25em;
  346 + display: block;
  347 + overflow: hidden;
  348 +
  349 +}
326 350 /* === For phones =================================== */
327 351 @media ( max-width : 767px) {
328 352 .btn-breadcrumb>*:nth-last-child(-n+2) {
... ...
temas/_lbiomashp.map
... ... @@ -5,35 +5,39 @@ MAP
5 5 CONNECTION ""
6 6 DATA "/var/www/i3geo/aplicmap/dados/biomas.shp"
7 7 METADATA
8   - "TIP" "CD_LEGENDA"
  8 + "METAESTAT_ID_MEDIDA_VARIAVEL" ""
9 9 "cache" "SIM"
  10 + "TIP" "CD_LEGENDA"
10 11 "CLASSE" "sim"
11   - "temporizador" ""
12 12 "permitekmz" "SIM"
13   - "iconetema" ""
  13 + "temporizador" ""
14 14 "ITENSDESC" "Teste de acentuação"
15   - "TILES" "SIM"
  15 + "iconetema" ""
  16 + "editavel" ""
16 17 "ESCALA" "250000"
17   - "editavel" "NAO"
  18 + "TILES" "SIM"
  19 + "METAESTAT_CODIGO_TIPO_REGIAO" ""
18 20 "extensao" "-73.990940816816 -33.74827031115 -34.822855820777 5.272224303909"
19 21 "permitedownload" "SIM"
20 22 "permitecomentario" "NAO"
  23 + "metaestat" ""
21 24 "escondido" "NAO"
22   - "download" "SIM"
23 25 "esquematabelaeditavel" ""
  26 + "download" "SIM"
24 27 "itembuscarapida" "CD_LEGENDA"
25   - "ITENS" "CD_LEGENDA"
26   - "arquivodownload" ""
27 28 "arquivokmz" ""
28   - "permitekml" "SIM"
29   - "permiteogc" "SIM"
  29 + "arquivodownload" ""
  30 + "ITENS" "CD_LEGENDA"
30 31 "transitioneffect" "NAO"
  32 + "permiteogc" "SIM"
  33 + "permitekml" "SIM"
31 34 "TEMA" "Biomas shapefile (acentuação)"
32   - "cortepixels" ""
33   - "colunaidunico" ""
  35 + "convcaracter" "SIM"
34 36 "colunageometria" ""
35   - "identifica" "sim"
  37 + "colunaidunico" ""
  38 + "cortepixels" ""
36 39 "aplicaextensao" "NAO"
  40 + "identifica" "sim"
37 41 "tabelaeditavel" ""
38 42 END # METADATA
39 43 NAME "_lbiomashp"
... ... @@ -42,7 +46,6 @@ MAP
42 46 PROCESSING "POLYLINE_NO_CLIP=True"
43 47 STATUS DEFAULT
44 48 TEMPLATE "none.htm"
45   - TILEITEM "location"
46 49 OPACITY 90
47 50 TYPE POLYGON
48 51 UNITS METERS
... ...